Changeset b59318e in mainline for kernel/generic/include


Ignore:
Timestamp:
2018-06-26T17:34:48Z (7 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ab6edb6
Parents:
f6372be9
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-26 17:01:43)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-26 17:34:48)
Message:

Make futex able to time out.

Location:
kernel/generic/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/proc/thread.h

    rf6372be9 rb59318e  
    112112        /** If true, the thread can be interrupted from sleep. */
    113113        bool sleep_interruptible;
     114
     115        /**
     116         * If true, and this thread's sleep returns without a wakeup
     117         * (timed out or interrupted), waitq ignores the next wakeup.
     118         * This is necessary for futex to be able to handle those conditions.
     119         */
     120        bool sleep_composable;
     121
    114122        /** Wait queue in which this thread sleeps. */
    115123        waitq_t *sleep_queue;
  • kernel/generic/include/synch/futex.h

    rf6372be9 rb59318e  
    5353
    5454extern void futex_init(void);
    55 extern sys_errno_t sys_futex_sleep(uintptr_t);
     55extern sys_errno_t sys_futex_sleep(uintptr_t, uintptr_t);
    5656extern sys_errno_t sys_futex_wakeup(uintptr_t);
    5757
  • kernel/generic/include/synch/waitq.h

    rf6372be9 rb59318e  
    6262        int missed_wakeups;
    6363
     64        /** Number of wakeups that need to be ignored due to futex timeout. */
     65        int ignore_wakeups;
     66
    6467        /** List of sleeping threads for which there was no missed_wakeup. */
    6568        list_t sleepers;
Note: See TracChangeset for help on using the changeset viewer.