8

Add support for FUTEX_{WAIT,WAKE}_BITSET by m-ou-se · Pull Request #2054 · rust-...

 2 years ago
source link: https://github.com/rust-lang/miri/pull/2054
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Copy link

Member

@m-ou-se m-ou-se commented 11 days ago

edited

FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET are extensions of FUTEX_WAIT and FUTEX_WAKE that allow tagging each waiting thread with up to 32 'labels', and then only wake up threads that match certain labels. The non-bitset operations behave like their bitset was fully set (u32::MAX), meaning that they'll wait for anything, and wake up anything.

The only other difference is that FUTEX_WAIT_BITSET uses an absolute timeout instead of an relative timeout like FUTEX_WAIT.

Often, FUTEX_WAIT_BITSET is used not for its bitset functionality, but only for its absolute timeout functionality. It is then used with a bitset of u32::MAX.

This adds support for only that use case to Miri, as that's all std currently needs. Any other bitset is still unsupported.

Update: This adds full support for both these syscalls.

RalfJung reacted with heart emoji

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK