• Re: Ordering of sem_wait waiters

    From Tseng ZH@21:1/5 to All on Wed Mar 9 19:27:46 2022
    Kaz Kylheku 在 2017年2月24日 星期五上午11:20:10 [UTC+8] 的信中寫道:
    On 2017-02-24, zhan...@conew.com <zhan...@conew.com> wrote:
    在 2012年4月25日星期三 UTC+8下午11:17:09,Noob写道:
    ^^^^^
    Hello everyone,

    The (proprietary) OS I've been working with provides two "types"
    of semaphores: fifo or prio.

    This discussion is useful.

    It's also almost five years old and not going on any more.

    According to below link, I think it doesn't guarantee any order. https://man7.org/linux/man-pages/man2/futex.2.html

    FUTEX_WAKE (since Linux 2.6.0)
    This operation wakes at most val of the waiters that are
    waiting (e.g., inside FUTEX_WAIT) on the futex word at the
    address uaddr. Most commonly, val is specified as either
    1 (wake up a single waiter) or INT_MAX (wake up all
    waiters). No guarantee is provided about which waiters
    are awoken (e.g., a waiter with a higher scheduling
    priority is not guaranteed to be awoken in preference to a
    waiter with a lower priority).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)