|
|
Log in / Subscribe / Register

Rethinking the futex API

Rethinking the futex API

Posted Jun 19, 2020 14:57 UTC (Fri) by sbaugh (guest, #103291)
In reply to: Rethinking the futex API by ras
Parent article: Rethinking the futex API

>Association with a fd can be done with a userspace library writing a byte to a fifo on wakeup.

As far as I'm aware, this can only be done by dedicating a thread to each futex you want to wait on - not exactly cheap.


to post comments

Rethinking the futex API

Posted Jun 19, 2020 19:59 UTC (Fri) by itsmycpu (guest, #139639) [Link]

> As far as I'm aware, this can only be done by dedicating a thread to each futex you want to wait on - not exactly cheap.

Conceptually, a futex is not something you wait on. It is something that you use to wait. It is a consumer, not a producer. The wake call is the producer.

You can use a single futex to wait for many things at the same time (using user space utility functions to establish the necessary connections).


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds