Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 436a8a9f authored by Shai Barack's avatar Shai Barack
Browse files

Message tracing: use plain long, not AtomicLong

Ensure that the value is written before the reader thread can read it.
Replace the Atomic with a volatile value to avoid the extra allocation.

Also fix a narrow pre-existing race where a Message could be pushed to the
stack, then the enqueuing thread is interrupted immediately until that
Message is dispatched, then the enqueuing thread increments the Message count
and sets a flow ID (after it's already been handled).

Fixes: 424307660
Test: PerfettoTraceMessageQueueTest
Flag: EXEMPT bugfix
Change-Id: I72c99b34660c32829af440290ce35cb132bee4d1
parent d8f15d31
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment