Changeset 0b8fad2 in mainline for uspace/lib/c/generic/private/futex.h


Ignore:
Timestamp:
2018-11-11T15:47:39Z (5 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6874bd2
Parents:
25f6bddb
git-author:
Jakub Jermar <jakub@…> (2018-11-11 11:08:58)
git-committer:
Jakub Jermar <jakub@…> (2018-11-11 15:47:39)
Message:

Make user waitq more generic

By allowing SYS_WAITQ_SLEEP to specify flags, the implementation needn't
hardcode the use of SYNCH_FLAGS_FUTEX, resulting in a more generic
synchronization primitive usable from userspace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/private/futex.h

    r25f6bddb r0b8fad2  
    4343#include <fibril.h>
    4444#include <abi/cap.h>
     45#include <abi/synch.h>
    4546
    4647typedef struct futex {
     
    147148        }
    148149
    149         return __SYSCALL2(SYS_WAITQ_SLEEP, (sysarg_t) futex->whandle,
    150             (sysarg_t) timeout);
     150        return __SYSCALL3(SYS_WAITQ_SLEEP, (sysarg_t) futex->whandle,
     151            (sysarg_t) timeout, (sysarg_t) SYNCH_FLAGS_FUTEX);
    151152}
    152153
Note: See TracChangeset for help on using the changeset viewer.