From a6c7c8542f59757824bede08281a6eb521af07ca Mon Sep 17 00:00:00 2001 From: johnwongx <1290773033@qq.com> Date: Wed, 23 Apr 2025 11:12:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=9E=E6=8E=A5=E6=A7=BD?= =?UTF-8?q?=E6=BB=A1=E5=88=A4=E6=96=AD=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libipc/circ/elem_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libipc/circ/elem_def.h b/src/libipc/circ/elem_def.h index 40039480..24e49402 100755 --- a/src/libipc/circ/elem_def.h +++ b/src/libipc/circ/elem_def.h @@ -60,7 +60,7 @@ class conn_head : public conn_head_base { for (unsigned k = 0;; ipc::yield(k)) { cc_t curr = this->cc_.load(std::memory_order_acquire); cc_t next = curr | (curr + 1); // find the first 0, and set it to 1. - if (next == 0) { + if (next == curr) { // connection-slot is full. return 0; }