Changeset 296 for trunk/kernel/syscalls/sys_thread_sleep.c
- Timestamp:
- Jul 31, 2017, 1:59:52 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_thread_sleep.c
r101 r296 30 30 int sys_thread_sleep() 31 31 { 32 thread_t * this = CURRENT_THREAD; 33 32 34 thread_dmsg("\n[INFO] %s : thread %x in process %x goes to sleep at cycle %d\n", 33 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_PROCESS->pid, hal_get_cycles() );35 __FUNCTION__, this->trdid, this->process->pid, hal_get_cycles() ); 34 36 35 thread_block( CURRENT_THREAD, THREAD_BLOCKED_GLOBAL );36 sched_yield( );37 thread_block( this , THREAD_BLOCKED_GLOBAL ); 38 sched_yield( NULL ); 37 39 38 40 thread_dmsg("\n[INFO] %s : thread %x in process %x resume at cycle\n", 39 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_PROCESS->pid, hal_get_cycles() );41 __FUNCTION__, this->trdid, this->process->pid, hal_get_cycles() ); 40 42 41 43 return 0;
Note: See TracChangeset
for help on using the changeset viewer.