Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

headers moved inside include guards

This commit fixes #8 as reported by jwakely.
  • Loading branch information...
commit a59096b90743293452b74e29b41bafd7d7f5428a 1 parent 52201bf
@fsaintjacques authored
View
4 disruptor/batch_descriptor.h
@@ -23,11 +23,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "disruptor/sequence.h"
-
#ifndef DISRUPTOR_BATCH_DESCRIPTOR_H_ // NOLINT
#define DISRUPTOR_BATCH_DESCRIPTOR_H_ // NOLINT
+#include "disruptor/sequence.h"
+
namespace disruptor {
// Used to record the batch of sequences claimed via {@link Sequencer}.
View
8 disruptor/claim_strategy.h
@@ -23,14 +23,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#ifndef DISRUPTOR_CLAIM_STRATEGY_H_ // NOLINT
+#define DISRUPTOR_CLAIM_STRATEGY_H_ // NOLINT
+
#include <thread>
#include <vector>
#include "disruptor/interface.h"
-#ifndef DISRUPTOR_CLAIM_STRATEGY_H_ // NOLINT
-#define DISRUPTOR_CLAIM_STRATEGY_H_ // NOLINT
-
namespace disruptor {
enum ClaimStrategyOption {
@@ -86,7 +86,7 @@ class SingleThreadedStrategy : public ClaimStrategyInterface {
private:
SingleThreadedStrategy();
- void WaitForFreeSlotAt(const int64_t& sequence,
+ void WaitForFreeSlotAt(const int64_t& sequence,
const std::vector<Sequence*>& dependent_sequences) {
int64_t wrap_point = sequence - buffer_size_;
if (wrap_point > min_gating_sequence_.sequence()) {
View
6 disruptor/event_processor.h
@@ -23,13 +23,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#ifndef DISRUPTOR_EVENT_PROCESSOR_H_ // NOLINT
+#define DISRUPTOR_EVENT_PROCESSOR_H_ // NOLINT
+
#include <exception>
#include "disruptor/ring_buffer.h"
-#ifndef DISRUPTOR_EVENT_PROCESSOR_H_ // NOLINT
-#define DISRUPTOR_EVENT_PROCESSOR_H_ // NOLINT
-
namespace disruptor {
template <typename T>
View
4 disruptor/event_publisher.h
@@ -23,11 +23,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "disruptor/ring_buffer.h"
-
#ifndef DISRUPTOR_EVENT_PUBLISHER_H_ // NOLINT
#define DISRUPTOR_EVENT_PUBLISHER_H_ // NOLINT
+#include "disruptor/ring_buffer.h"
+
namespace disruptor {
template<typename T>
View
6 disruptor/exception_handler.h
@@ -23,13 +23,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#ifndef DISRUPTOR_EXCEPTION_HANDLER_H_ // NOLINT
+#define DISRUPTOR_EXCEPTION_HANDLER_H_ // NOLINT
+
#include <exception>
#include "disruptor/interface.h"
-#ifndef DISRUPTOR_EXCEPTION_HANDLER_H_ // NOLINT
-#define DISRUPTOR_EXCEPTION_HANDLER_H_ // NOLINT
-
namespace disruptor {
template<typename T>
View
4 disruptor/exceptions.h
@@ -23,11 +23,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <exception>
-
#ifndef DISRUPTOR_EXCEPTIONS_H_ // NOLINT
#define DISRUPTOR_EXCEPTIONS_H_ // NOLINT
+#include <exception>
+
namespace disruptor {
class AlertException : public std::exception {
View
6 disruptor/interface.h
@@ -23,15 +23,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#ifndef DISRUPTOR_INTERFACE_H_ // NOLINT
+#define DISRUPTOR_INTERFACE_H_ // NOLINT
+
#include <climits>
#include <vector>
#include "disruptor/sequence.h"
#include "disruptor/batch_descriptor.h"
-#ifndef DISRUPTOR_INTERFACE_H_ // NOLINT
-#define DISRUPTOR_INTERFACE_H_ // NOLINT
-
namespace disruptor {
// Strategies employed for claiming the sequence of events in the
View
6 disruptor/ring_buffer.h
@@ -23,6 +23,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#ifndef DISRUPTOR_RING_BUFFER_H_ // NOLINT
+#define DISRUPTOR_RING_BUFFER_H_ // NOLINT
+
#include <array>
#include <vector>
@@ -32,9 +35,6 @@
#include "disruptor/sequencer.h"
#include "disruptor/sequence_barrier.h"
-#ifndef DISRUPTOR_RING_BUFFER_H_ // NOLINT
-#define DISRUPTOR_RING_BUFFER_H_ // NOLINT
-
namespace disruptor {
// Ring based store of reusable entries containing the data representing an
View
8 disruptor/sequence.h
@@ -23,10 +23,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <atomic>
-
-#include "disruptor/utils.h"
-
#ifndef CACHE_LINE_SIZE_IN_BYTES // NOLINT
#define CACHE_LINE_SIZE_IN_BYTES 64 // NOLINT
#endif // NOLINT
@@ -38,6 +34,10 @@
#ifndef DISRUPTOR_SEQUENCE_H_ // NOLINT
#define DISRUPTOR_SEQUENCE_H_ // NOLINT
+#include <atomic>
+
+#include "disruptor/utils.h"
+
namespace disruptor {
const int64_t kInitialCursorValue = -1L;
View
6 disruptor/sequence_barrier.h
@@ -23,15 +23,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#ifndef DISRUPTOR_SEQUENCE_BARRIER_H_ // NOLINT
+#define DISRUPTOR_SEQUENCE_BARRIER_H_ // NOLINT
+
#include <memory>
#include <vector>
#include "disruptor/exceptions.h"
#include "disruptor/interface.h"
-#ifndef DISRUPTOR_SEQUENCE_BARRIER_H_ // NOLINT
-#define DISRUPTOR_SEQUENCE_BARRIER_H_ // NOLINT
-
namespace disruptor {
class ProcessingSequenceBarrier : SequenceBarrierInterface {
View
6 disruptor/sequencer.h
@@ -23,6 +23,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#ifndef DISRUPTOR_SEQUENCER_H_ // NOLINT
+#define DISRUPTOR_SEQUENCER_H_ // NOLINT
+
#include <vector>
#include "disruptor/batch_descriptor.h"
@@ -31,9 +34,6 @@
#include "disruptor/sequence_barrier.h"
#include "disruptor/wait_strategy.h"
-#ifndef DISRUPTOR_SEQUENCER_H_ // NOLINT
-#define DISRUPTOR_SEQUENCER_H_ // NOLINT
-
namespace disruptor {
// Coordinator for claiming sequences for access to a data structures while
View
6 disruptor/wait_strategy.h
@@ -23,6 +23,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#ifndef DISRUPTOR_WAITSTRATEGY_H_ // NOLINT
+#define DISRUPTOR_WAITSTRATEGY_H_ // NOLINT
+
#include <sys/time.h>
#include <chrono>
@@ -33,9 +36,6 @@
#include "disruptor/interface.h"
#include "disruptor/sequence.h"
-#ifndef DISRUPTOR_WAITSTRATEGY_H_ // NOLINT
-#define DISRUPTOR_WAITSTRATEGY_H_ // NOLINT
-
namespace disruptor {
// Strategy options which are available to those waiting on a
Please sign in to comment.
Something went wrong with that request. Please try again.