Changeset 296 for trunk/kernel/devices


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/devices
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_dma.c

    r279 r296  
    7676   
    7777    // start server thread
     78    thread_block( new_thread , THREAD_BLOCKED_DEV_QUEUE );
    7879    thread_unblock( XPTR( local_cxy , new_thread ) , THREAD_BLOCKED_GLOBAL );
    7980
  • trunk/kernel/devices/dev_ioc.c

    r279 r296  
    8181
    8282    // start server thread
     83    thread_block( new_thread , THREAD_BLOCKED_DEV_QUEUE );
    8384    thread_unblock( XPTR( local_cxy , new_thread ) , THREAD_BLOCKED_GLOBAL );
    8485
     
    192193    dev_pic_disable_irq( lid , ioc_xp );
    193194
    194     ioc_dmsg("\n[INFO] %s : coucou 3\n",
    195              __FUNCTION__ );
    196 
    197195    // call driver function
    198196    cmd( XPTR( local_cxy , this ) );
  • trunk/kernel/devices/dev_nic.c

    r279 r296  
    8080   
    8181    // start server thread
     82    thread_block( new_thread , THREAD_BLOCKED_DEV_QUEUE );
    8283    thread_unblock( XPTR( local_cxy , new_thread ) , THREAD_BLOCKED_GLOBAL );
    8384
     
    128129        // block on THREAD_BLOCKED_IO condition and deschedule
    129130        thread_block( thread_ptr , THREAD_BLOCKED_IO );
    130         sched_yield();
     131        sched_yield( NULL );
    131132
    132133        // disable NIC-RX IRQ
     
    198199        // block on THREAD_BLOCKED I/O condition and deschedule
    199200        thread_block( thread_ptr , THREAD_BLOCKED_IO );
    200         sched_yield();
     201        sched_yield( NULL );
    201202
    202203        // disable NIC-TX IRQ
  • trunk/kernel/devices/dev_txt.c

    r279 r296  
    8686
    8787        // start server thread
     88        thread_block( new_thread , THREAD_BLOCKED_DEV_QUEUE );
    8889        thread_unblock( XPTR( local_cxy , new_thread ) , THREAD_BLOCKED_GLOBAL );
    8990    }
Note: See TracChangeset for help on using the changeset viewer.