X-Git-Url: http://plrg.eecs.uci.edu/git/?p=model-checker-benchmarks.git;a=blobdiff_plain;f=ms-queue%2Fmy_queue.h;h=c92e420657c1847ec3575156be8e6a7b133e2dae;hp=5877a680b7c634b636af7d0b1d994b0004ce3387;hb=d3c94c5b4370fc71d1c12272af29b3a95178f4bd;hpb=4f919e0a75b2bbc708bee3d109349fe24e4b264c diff --git a/ms-queue/my_queue.h b/ms-queue/my_queue.h index 5877a68..c92e420 100644 --- a/ms-queue/my_queue.h +++ b/ms-queue/my_queue.h @@ -11,8 +11,8 @@ typedef atomic_ullong pointer_t; static inline void set_count(pointer *p, unsigned int val) { *p = (*p & ~COUNT_MASK) | ((pointer)val << 32); } static inline void set_ptr(pointer *p, unsigned int val) { *p = (*p & ~PTR_MASK) | val; } -static inline unsigned int get_count(pointer p) { return p & PTR_MASK; } -static inline unsigned int get_ptr(pointer p) { return (p & COUNT_MASK) >> 32; } +static inline unsigned int get_count(pointer p) { return (p & COUNT_MASK) >> 32; } +static inline unsigned int get_ptr(pointer p) { return p & PTR_MASK; } typedef struct node { unsigned int value;