MCPcopy Create free account
hub / github.com/cameron314/readerwriterqueue / enqueue

Method enqueue

benchmarks/ext/1024cores/spscqueue.h:68–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66 }
67
68 void enqueue(T v)
69 {
70 node* n = alloc_node();
71 n->next_ = 0;
72 n->value_ = v;
73 store_release(&head_->next_, n);
74 head_ = n;
75 }
76
77 // returns 'false' if queue is empty
78 bool try_dequeue(T& v)

Callers 12

mainFunction · 0.45
enqueue_oneMethod · 0.45
enqueue_manyMethod · 0.45
nonempty_destroyMethod · 0.45
threadedMethod · 0.45
peekMethod · 0.45
popMethod · 0.45
size_approxMethod · 0.45
max_capacityMethod · 0.45
blockingMethod · 0.45
vectorMethod · 0.45

Calls 1

store_releaseFunction · 0.85

Tested by 11

mainFunction · 0.36
enqueue_oneMethod · 0.36
enqueue_manyMethod · 0.36
nonempty_destroyMethod · 0.36
threadedMethod · 0.36
peekMethod · 0.36
popMethod · 0.36
size_approxMethod · 0.36
max_capacityMethod · 0.36
blockingMethod · 0.36
vectorMethod · 0.36