We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fdcc934 + a6c7c85 commit 120d85aCopy full SHA for 120d85a
src/libipc/circ/elem_def.h
@@ -60,7 +60,7 @@ class conn_head<P, true> : public conn_head_base {
60
for (unsigned k = 0;; ipc::yield(k)) {
61
cc_t curr = this->cc_.load(std::memory_order_acquire);
62
cc_t next = curr | (curr + 1); // find the first 0, and set it to 1.
63
- if (next == 0) {
+ if (next == curr) {
64
// connection-slot is full.
65
return 0;
66
}
0 commit comments