Skip to content
Snippets Groups Projects
Commit b9b754a6 authored by John Grossman's avatar John Grossman Committed by CQ bot account: commit-bot@chromium.org
Browse files

[tests][futex] Update futex core tests.

In particular, remove the assumption that futexes will be released
from their wait_queue in the same order that they joined the
wait_queue.  This used to be true when the kernel maintained it's own
independent list of thread who were waiting in a futex along with a
dedicated wait_queue for each waiting futex, but AFAICT we were not
making this guarantee in the documentation.

Furthermore, we probably don't want to make this guarantee.
Particularly as we add the concept of priority inheritance to Zircon
futexes, we probably would like to make no promises here so as to
allow the scheduler the ability to control which futexes are selected
for wake/requeue operations when the time comes.

In addition to this, generally update the tests to conform a bit more
to the modern Zircon C++ style.  Specifically, make more use of
fbl::atomics, fbl::AutoCalls, libzx, and other helpers that we have
developed since these tests were originally written.

Test: Build x64 QEMU and run updated tests.
Change-Id: I9f837bdceba2badb1be7fe5e9ca9da18f052a6d1
parent 73c6330a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment