Changeset 435 for trunk/kernel/kern/scheduler.c
- Timestamp:
- Feb 20, 2018, 5:32:17 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/scheduler.c
r433 r435 280 280 } 281 281 282 // enter critical section / save SR in current thread context283 hal_disable_irq( & current->save_sr );282 // enter critical section / save SR in current thread descriptor 283 hal_disable_irq( &CURRENT_THREAD->save_sr ); 284 284 285 285 // loop on threads to select next thread … … 321 321 } 322 322 323 // switch CPU from c allingthread context to new thread context323 // switch CPU from current thread context to new thread context 324 324 hal_do_cpu_switch( current->cpu_context, next->cpu_context ); 325 325 } … … 330 330 uint32_t cycle = (uint32_t)hal_get_cycles(); 331 331 if( CONFIG_DEBUG_SCHED_YIELD < cycle ) 332 printk("\n[DBG] %s : core[%x,%d] / cause = %s / thread %x (%s) (%x,%x) continue / cycle %d\n", 332 printk("\n[DBG] %s : core[%x,%d] / cause = %s\n" 333 " thread %x (%s) (%x,%x) continue / cycle %d\n", 333 334 __FUNCTION__, local_cxy, core->lid, cause, 334 335 current, thread_type_str(current->type), current->process->pid, current->trdid, cycle ); … … 340 341 sched_handle_signals( core ); 341 342 342 // exit critical section / restore SR from next thread context343 hal_restore_irq( next->save_sr );343 // exit critical section / restore SR from current thread descriptor 344 hal_restore_irq( CURRENT_THREAD->save_sr ); 344 345 345 346 } // end sched_yield()
Note: See TracChangeset
for help on using the changeset viewer.