Changeset 0b8fad2 in mainline
- Timestamp:
- 2018-11-11T15:47:39Z (6 years ago)
- 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)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/synch/syswaitq.h
r25f6bddb r0b8fad2 44 44 45 45 extern sys_errno_t sys_waitq_create(cap_waitq_handle_t *); 46 extern sys_errno_t sys_waitq_sleep(cap_waitq_handle_t, uint ptr_t);46 extern sys_errno_t sys_waitq_sleep(cap_waitq_handle_t, uint32_t, unsigned int); 47 47 extern sys_errno_t sys_waitq_wakeup(cap_waitq_handle_t); 48 48 extern sys_errno_t sys_waitq_destroy(cap_waitq_handle_t); -
kernel/generic/src/synch/syswaitq.c
r25f6bddb r0b8fad2 143 143 * @param whandle Waitq capability handle of the waitq in which to sleep. 144 144 * @param timeout Timeout in microseconds. 145 * @param flags Flags from SYNCH_FLAGS_* family. SYNCH_FLAGS_INTERRUPTIBLE is 146 * always implied. 145 147 * 146 148 * @return Error code. 147 149 */ 148 sys_errno_t sys_waitq_sleep(cap_waitq_handle_t whandle, uintptr_t timeout) 150 sys_errno_t sys_waitq_sleep(cap_waitq_handle_t whandle, uint32_t timeout, 151 unsigned int flags) 149 152 { 150 153 kobject_t *kobj = kobject_get(TASK, whandle, KOBJECT_TYPE_WAITQ); … … 157 160 158 161 errno_t rc = waitq_sleep_timeout(kobj->waitq, timeout, 159 SYNCH_FLAGS_INTERRUPTIBLE | SYNCH_FLAGS_FUTEX, NULL);162 SYNCH_FLAGS_INTERRUPTIBLE | flags, NULL); 160 163 161 164 #ifdef CONFIG_UDEBUG -
uspace/lib/c/generic/private/futex.h
r25f6bddb r0b8fad2 43 43 #include <fibril.h> 44 44 #include <abi/cap.h> 45 #include <abi/synch.h> 45 46 46 47 typedef struct futex { … … 147 148 } 148 149 149 return __SYSCALL 2(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); 151 152 } 152 153
Note:
See TracChangeset
for help on using the changeset viewer.