|
|
Log in / Subscribe / Register

Rethinking the futex API

Rethinking the futex API

Posted Jun 19, 2020 9:58 UTC (Fri) by bno1 (guest, #138051)
In reply to: Rethinking the futex API by ras
Parent article: Rethinking the futex API

>Waiting on multiple values can be done in user space. Association with a fd can be done with a userspace library writing a byte to a fifo on wakeup.

Wine already has this. The esync patchset uses eventfd to wait on multiple winapi mutexes [1]. But some Windows programs run out of file descriptors because they leak mutexes. File descriptors are a much more limited resource than memory. Also, the patch for wait for multiple futexes (called fsync in the wine community) has slightly better performance [2].

[1] https://github.com/zfigura/wine/blob/esync/README.esync
[2] https://github.com/ValveSoftware/Proton/issues/2966


to post comments

Rethinking the futex API

Posted Jun 23, 2020 7:04 UTC (Tue) by ncm (guest, #165) [Link]

> "But some Windows programs run out of file descriptors because they leak mutexes."

See, this is why W(in)e can't have nice things.


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