Changeset 231b3fd in mainline for uspace/lib/c/generic/thread/fibril_synch.c
- Timestamp:
- 2018-08-25T21:35:26Z (6 years ago)
- Parents:
- e2625b1a (diff), 3c45353 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jakub Jermář <jakub@…> (2018-08-25 21:35:26)
- git-committer:
- GitHub <noreply@…> (2018-08-25 21:35:26)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/thread/fibril_synch.c
re2625b1a r231b3fd 37 37 #include <async.h> 38 38 #include <adt/list.h> 39 #include < sys/time.h>39 #include <time.h> 40 40 #include <errno.h> 41 41 #include <assert.h> … … 390 390 errno_t 391 391 fibril_condvar_wait_timeout(fibril_condvar_t *fcv, fibril_mutex_t *fm, 392 suseconds_t timeout)392 usec_t timeout) 393 393 { 394 394 assert(fibril_mutex_is_locked(fm)); … … 400 400 wdata.mutex = fm; 401 401 402 struct time val tv;403 struct time val*expires = NULL;402 struct timespec ts; 403 struct timespec *expires = NULL; 404 404 if (timeout) { 405 getuptime(&t v);406 t v_add_diff(&tv, timeout);407 expires = &t v;405 getuptime(&ts); 406 ts_add_diff(&ts, USEC2NSEC(timeout)); 407 expires = &ts; 408 408 } 409 409 … … 557 557 * @param arg Argument for @a fun 558 558 */ 559 void fibril_timer_set(fibril_timer_t *timer, suseconds_t delay,559 void fibril_timer_set(fibril_timer_t *timer, usec_t delay, 560 560 fibril_timer_fun_t fun, void *arg) 561 561 { … … 575 575 * @param arg Argument for @a fun 576 576 */ 577 void fibril_timer_set_locked(fibril_timer_t *timer, suseconds_t delay,577 void fibril_timer_set_locked(fibril_timer_t *timer, usec_t delay, 578 578 fibril_timer_fun_t fun, void *arg) 579 579 { … … 728 728 } 729 729 730 errno_t fibril_semaphore_down_timeout(fibril_semaphore_t *sem, suseconds_t timeout)730 errno_t fibril_semaphore_down_timeout(fibril_semaphore_t *sem, usec_t timeout) 731 731 { 732 732 if (timeout < 0) … … 751 751 futex_unlock(&fibril_synch_futex); 752 752 753 struct time val tv;754 struct time val*expires = NULL;753 struct timespec ts; 754 struct timespec *expires = NULL; 755 755 if (timeout) { 756 getuptime(&t v);757 t v_add_diff(&tv, timeout);758 expires = &t v;756 getuptime(&ts); 757 ts_add_diff(&ts, USEC2NSEC(timeout)); 758 expires = &ts; 759 759 } 760 760
Note:
See TracChangeset
for help on using the changeset viewer.