Changes in kernel/generic/src/synch/futex.c [82cbf8c6:b7fd2a0] in mainline
- File:
-
- 1 edited
-
kernel/generic/src/synch/futex.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/synch/futex.c
r82cbf8c6 rb7fd2a0 395 395 * 396 396 * @return If there is no physical mapping for uaddr ENOENT is 397 * returned. Otherwise returns a wait result as defined in398 * synch.h.399 */ 400 sys arg_t sys_futex_sleep(uintptr_t uaddr)397 * returned. Otherwise returns the return value of 398 * waitq_sleep_timeout(). 399 */ 400 sys_errno_t sys_futex_sleep(uintptr_t uaddr) 401 401 { 402 402 futex_t *futex = get_futex(uaddr); 403 403 404 404 if (!futex) 405 return (sys arg_t) ENOENT;405 return (sys_errno_t) ENOENT; 406 406 407 407 #ifdef CONFIG_UDEBUG … … 409 409 #endif 410 410 411 int rc = waitq_sleep_timeout(&futex->wq, 0, SYNCH_FLAGS_INTERRUPTIBLE); 411 errno_t rc = waitq_sleep_timeout( 412 &futex->wq, 0, SYNCH_FLAGS_INTERRUPTIBLE, NULL); 412 413 413 414 #ifdef CONFIG_UDEBUG … … 415 416 #endif 416 417 417 return (sys arg_t) rc;418 return (sys_errno_t) rc; 418 419 } 419 420 … … 424 425 * @return ENOENT if there is no physical mapping for uaddr. 425 426 */ 426 sys arg_t sys_futex_wakeup(uintptr_t uaddr)427 sys_errno_t sys_futex_wakeup(uintptr_t uaddr) 427 428 { 428 429 futex_t *futex = get_futex(uaddr); … … 430 431 if (futex) { 431 432 waitq_wakeup(&futex->wq, WAKEUP_FIRST); 432 return 0;433 return EOK; 433 434 } else { 434 return (sys arg_t) ENOENT;435 return (sys_errno_t) ENOENT; 435 436 } 436 437 }
Note:
See TracChangeset
for help on using the changeset viewer.
