equal
deleted
inserted
replaced
85 void enqueue_known_active(void* ptr); |
85 void enqueue_known_active(void* ptr); |
86 |
86 |
87 size_t size() { |
87 size_t size() { |
88 assert(_sz >= _index, "Invariant."); |
88 assert(_sz >= _index, "Invariant."); |
89 return _buf == NULL ? 0 : _sz - _index; |
89 return _buf == NULL ? 0 : _sz - _index; |
|
90 } |
|
91 |
|
92 bool is_empty() { |
|
93 return _buf == NULL || _sz == _index; |
90 } |
94 } |
91 |
95 |
92 // Set the "active" property of the queue to "b". An enqueue to an |
96 // Set the "active" property of the queue to "b". An enqueue to an |
93 // inactive thread is a no-op. Setting a queue to inactive resets its |
97 // inactive thread is a no-op. Setting a queue to inactive resets its |
94 // log to the empty state. |
98 // log to the empty state. |