Changes in kernel/generic/src/proc/thread.c [22e6802:b60c582] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/thread.c
r22e6802 rb60c582 501 501 void thread_sleep(uint32_t sec) 502 502 { 503 /* Sleep in 1000 second steps to support 504 full argument range */ 505 while (sec > 0) { 506 uint32_t period = (sec > 1000) ? 1000 : sec; 507 508 thread_usleep(period * 1000000); 509 sec -= period; 510 } 503 thread_usleep(sec * 1000000); 511 504 } 512 505 … … 582 575 { 583 576 waitq_t wq; 584 577 585 578 waitq_initialize(&wq); 586 579 587 580 (void) waitq_sleep_timeout(&wq, usec, SYNCH_FLAGS_NON_BLOCKING); 588 581 } … … 819 812 } 820 813 821 /** Syscall wrapper for sleeping. */822 unative_t sys_thread_usleep(uint32_t usec)823 {824 thread_usleep(usec);825 return 0;826 }827 828 814 /** @} 829 815 */
Note:
See TracChangeset
for help on using the changeset viewer.