Changeset 296 for trunk/kernel/libk


Ignore:
Timestamp:
Jul 31, 2017, 1:59:52 PM (7 years ago)
Author:
alain
Message:

Several modifs in the generic scheduler and in the hal_context to
fix the context switch mechanism.

Location:
trunk/kernel/libk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/libk/remote_barrier.c

    r104 r296  
    274274        // block & deschedule the calling thread
    275275        thread_block( thread_ptr , THREAD_BLOCKED_USERSYNC );
    276         sched_yield();
     276        sched_yield( NULL );
    277277
    278278        // restore interrupts
  • trunk/kernel/libk/remote_condvar.c

    r60 r296  
    189189    // block the calling thread
    190190    thread_block( CURRENT_THREAD , THREAD_BLOCKED_USERSYNC );
    191     sched_yield();
     191    sched_yield( NULL );
    192192
    193193    // lock the mutex before return
  • trunk/kernel/libk/remote_fifo.c

    r279 r296  
    9999
    100100        // deschedule without blocking
    101         if( thread_can_yield() ) sched_yield();
     101        if( thread_can_yield() ) sched_yield( NULL );
    102102
    103103        // disable interrupts
  • trunk/kernel/libk/remote_mutex.c

    r124 r296  
    208208        // block & deschedule the calling thread   
    209209        thread_block( thread_ptr , THREAD_BLOCKED_USERSYNC );
    210         sched_yield();
     210        sched_yield( NULL );
    211211
    212212        // restore interrupts
  • trunk/kernel/libk/remote_sem.c

    r23 r296  
    219219        // block and deschedule
    220220        thread_block( this , THREAD_BLOCKED_SEM ); 
    221         sched_yield();
     221        sched_yield( NULL );
    222222        }
    223223}  // end remote_sem_wait()
  • trunk/kernel/libk/remote_spinlock.c

    r101 r296  
    178178                {
    179179                        hal_restore_irq( mode );
    180                         if( thread_can_yield() ) sched_yield();
     180                        if( thread_can_yield() ) sched_yield( NULL );
    181181                        hal_disable_irq( &mode );
    182182                        continue;
  • trunk/kernel/libk/spinlock.c

    r60 r296  
    107107        {
    108108            hal_restore_irq( mode );
    109             if( thread_can_yield() ) sched_yield();
     109            if( thread_can_yield() ) sched_yield( NULL );
    110110            hal_disable_irq( &mode );
    111111            continue;
Note: See TracChangeset for help on using the changeset viewer.