[esp32_ble] Fix EventPool/LockFreeQueue sizing off-by-one (#14892)
This commit is contained in:
1 parent
a94bb74d04
commit
1adf05e2d5
2 files changed
+9
-2
No files matched your search
@@ -575,8 +575,9 @@ template<typename... Args> void enqueue_ble_event(Args... args) {
|
||||
load_ble_event(event, args...);
|
||||
|
||||
// Push the event to the queue
|
||||
// Push always succeeds: pool is sized to queue capacity (N-1), so if
|
||||
// allocate() returned non-null, the queue is guaranteed to have room.
|
||||
global_ble->ble_events_.push(event);
|
||||
// Push always succeeds because we're the only producer and the pool ensures we never exceed queue size
|
||||
}
|
||||
|
||||
// Explicit template instantiations for the friend function
|
||||
|
||||
Reference in new issue
Block a user