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

Commit 3f40ee59 authored by Mark Fasheh's avatar Mark Fasheh
Browse files

Add WaitState class for new MessageQueue

This encapsulates our logic for manipulating an atomic bitfield.

WaitState can be a counter or a deadline.

When it's a counter, the bit WAIT_STATE_IS_COUNTER is set and
the lower 63 bits are used as a long.

When WaitState is a deadline, we reserve bit 62 to indicate a
sync barrier. The middle 42 bits are used for the millisecond
resolution timestamp and the remaining 20 bits are used as a
counter.

Test: atest android.os.WaitStateTest
Bug: 421623328
Flag: EXEMPT new data structure isn't used yet; usages will be flagged.
Change-Id: I9f1a49378ce4c2cfda0f50d4febc57b050e55aef
parent ab70951a
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