Changeset 408 for trunk/kernel/libk


Ignore:
Timestamp:
Dec 5, 2017, 4:20:07 PM (7 years ago)
Author:
alain
Message:

Fix several bugs in the fork() syscall.

Location:
trunk/kernel/libk
Files:
7 edited

Legend:

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

    r407 r408  
    274274        // block & deschedule the calling thread
    275275        thread_block( thread_ptr , THREAD_BLOCKED_USERSYNC );
    276         sched_yield();
     276        sched_yield("blocked on barrier");
    277277
    278278        // restore interrupts
  • trunk/kernel/libk/remote_condvar.c

    r407 r408  
    189189    // block the calling thread
    190190    thread_block( CURRENT_THREAD , THREAD_BLOCKED_USERSYNC );
    191     sched_yield();
     191    sched_yield("blocked on condvar");
    192192
    193193    // lock the mutex before return
  • trunk/kernel/libk/remote_fifo.c

    r407 r408  
    8989        // - deschedule without blocking if possible
    9090        // - wait ~1000 cycles otherwise
    91         if( thread_can_yield() ) sched_yield();
     91        if( thread_can_yield() ) sched_yield( "wait RPC fifo" );
    9292        else                     hal_fixed_delay( 1000 );
    9393
  • trunk/kernel/libk/remote_mutex.c

    r407 r408  
    208208        // block & deschedule the calling thread   
    209209        thread_block( thread_ptr , THREAD_BLOCKED_USERSYNC );
    210         sched_yield();
     210        sched_yield("blocked on mutex");
    211211
    212212        // restore interrupts
  • trunk/kernel/libk/remote_sem.c

    r407 r408  
    219219        // block and deschedule
    220220        thread_block( this , THREAD_BLOCKED_SEM ); 
    221         sched_yield();
     221        sched_yield("blocked on semaphore");
    222222        }
    223223}  // end remote_sem_wait()
  • trunk/kernel/libk/remote_spinlock.c

    r407 r408  
    179179                {
    180180                        hal_restore_irq( mode );
    181                         if( thread_can_yield() ) sched_yield();
     181                        if( thread_can_yield() ) sched_yield("waiting spinlock");
    182182                        hal_disable_irq( &mode );
    183183                        continue;
  • trunk/kernel/libk/spinlock.c

    r407 r408  
    111111        {
    112112            hal_restore_irq( mode );
    113             if( thread_can_yield() ) sched_yield();
     113            if( thread_can_yield() ) sched_yield("waiting spinlock");
    114114            hal_disable_irq( &mode );
    115115            continue;
Note: See TracChangeset for help on using the changeset viewer.