Increase size of bootstrap bytes as some Linux distributions need more space.
[satcheck.git] / test / ms-queue.h
1 typedef struct node {
2         unsigned int value;
3         struct node * next;
4 } node_t;
5
6 typedef struct {
7         struct node * head;
8         struct node * tail;
9 } queue_t;
10
11 //void init_queue(queue_t *q, int num_threads);
12 //void enqueue(queue_t *q, unsigned int val);
13 //bool dequeue(queue_t *q, unsigned int *retVal);
14 int get_thread_num();
15
16 #define MAKE_POINTER(ptr, count)        (struct node *) (((count) << 48) | (uintptr_t)(ptr))
17 #define PTR_MASK 0xffffffffffffLL
18 #define COUNT_MASK (0xffffLL << 48)
19 #define GET_PTR(x) ((struct node *)(((uintptr_t) x) & PTR_MASK))
20 #define GET_COUNT(x) (((uintptr_t) x) >> 48)