Changeset 5f97ef44 in mainline for uspace/lib/c
- Timestamp:
- 2018-07-13T14:10:15Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e3787a0
- Parents:
- 9912f49
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-13 14:08:57)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-13 14:10:15)
- Location:
- uspace/lib/c
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async/client.c
r9912f49 r5f97ef44 515 515 * 516 516 */ 517 void async_usleep(suseconds_t timeout)517 void fibril_usleep(suseconds_t timeout) 518 518 { 519 519 awaiter_t awaiter; … … 538 538 * @param sec Number of seconds to sleep 539 539 */ 540 void async_sleep(unsigned int sec)540 void fibril_sleep(unsigned int sec) 541 541 { 542 542 /* … … 548 548 unsigned int period = (sec > 1000) ? 1000 : sec; 549 549 550 async_usleep(period * 1000000);550 fibril_usleep(period * 1000000); 551 551 sec -= period; 552 552 } -
uspace/lib/c/generic/irc.c
r9912f49 r5f97ef44 72 72 73 73 // XXX This is just a temporary hack 74 async_usleep(500 * 1000);74 fibril_usleep(500 * 1000); 75 75 } 76 76 -
uspace/lib/c/generic/rcu.c
r9912f49 r5f97ef44 423 423 */ 424 424 futex_unlock(&rcu.sync_lock.futex); 425 async_usleep(RCU_SLEEP_MS * 1000);425 fibril_usleep(RCU_SLEEP_MS * 1000); 426 426 futex_lock(&rcu.sync_lock.futex); 427 427 } -
uspace/lib/c/include/async.h
r9912f49 r5f97ef44 143 143 extern errno_t async_wait_timeout(aid_t, errno_t *, suseconds_t); 144 144 extern void async_forget(aid_t); 145 146 extern void async_usleep(suseconds_t);147 extern void async_sleep(unsigned int);148 145 149 146 extern void async_create_manager(void); -
uspace/lib/c/include/fibril.h
r9912f49 r5f97ef44 37 37 38 38 #include <types/common.h> 39 #include <time.h> 39 40 40 41 typedef struct fibril fibril_t; … … 57 58 extern void fibril_yield(void); 58 59 60 extern void fibril_usleep(suseconds_t); 61 extern void fibril_sleep(unsigned int); 62 59 63 static inline fid_t fibril_create(errno_t (*func)(void *), void *arg) 60 64 { -
uspace/lib/c/test/fibril/timer.c
r9912f49 r5f97ef44 78 78 79 79 fibril_timer_set_locked(t, 100 * 1000 * 1000, test_timeout_fn, &cnt); 80 async_usleep(1000);80 fibril_usleep(1000); 81 81 fts = fibril_timer_clear_locked(t); 82 82 PCUT_ASSERT_INT_EQUALS(fts_active, fts); … … 101 101 cnt = 0; 102 102 fibril_timer_set(t, 100 * 1000 * 1000, test_timeout_fn, &cnt); 103 async_usleep(1000);103 fibril_usleep(1000); 104 104 fts = fibril_timer_clear(t); 105 105 PCUT_ASSERT_INT_EQUALS(fts_active, fts); … … 127 127 fibril_mutex_unlock(&lock); 128 128 129 async_usleep(1000);129 fibril_usleep(1000); 130 130 131 131 fibril_mutex_lock(&lock);
Note:
See TracChangeset
for help on using the changeset viewer.