Files
esp-idf/components/bt/common/ble_log/include
Zhou Xiao 22812d893a fix(ble_log): harden the pool waiter handshake and claim ordering
Consolidates the concurrency review fixes for the unified pool:

- the shared ESP Timer task never waits for a transport: its identity
  is checked on the would-wait path only, so its callbacks always
  return and dispatch can progress (this also bounds claim()'s
  backpressure);
- transports accepted from the FREE bitmap are ACQUIRE-loaded: the
  recycler publishes pos/pending_seal with a STORE_RELEASE(FREE)
  without holding the candidate lock, and the acceptance load pairs
  with that publication;
- a waiter whose scan bounced off a candidate lock is re-advertised:
  the releasing side re-checks availability after the lock release,
  inside the same seq_cst window as the waiter-count read, so a
  transport that became claimable while locked cannot strand its wake;
- waiters never self-wake on an unpublished FREE transport:
  notification for a FREE transport fires only when its free-bitmap
  hint is already published, so a registered waiter cannot mint and
  consume its own wake tokens in a self-sustaining spin;
- flush and deinit drains re-check writer references after observing a
  zero waiter count: a writer waking between the two loads re-acquires
  its reference before unregistering, and the seq_cst-fenced re-read
  must observe it before the drain concludes.
2026-09-10 15:39:56 +08:00
..