Changeset 22e6802 in mainline for kernel/generic/src/proc/thread.c
- Timestamp:
- 2009-12-03T17:49:01Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 65c1778, fbcfc4da
- Parents:
- 4924675
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/thread.c
r4924675 r22e6802 501 501 void thread_sleep(uint32_t sec) 502 502 { 503 thread_usleep(sec * 1000000); 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 } 504 511 } 505 512 … … 575 582 { 576 583 waitq_t wq; 577 584 578 585 waitq_initialize(&wq); 579 586 580 587 (void) waitq_sleep_timeout(&wq, usec, SYNCH_FLAGS_NON_BLOCKING); 581 588 } … … 815 822 unative_t sys_thread_usleep(uint32_t usec) 816 823 { 817 thread_usleep(usec); 824 thread_usleep(usec); 818 825 return 0; 819 826 }
Note:
See TracChangeset
for help on using the changeset viewer.