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/hal/tsar_mips32/drivers
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/drivers/soclib_bdv.c

    r279 r296  
    131131    {
    132132        thread_block( CURRENT_THREAD , THREAD_BLOCKED_DEV_ISR );
    133         sched_yield();
     133        sched_yield( NULL );
    134134    }
    135135   
  • trunk/hal/tsar_mips32/drivers/soclib_dma.c

    r279 r296  
    9191    // Block and deschedule server thread
    9292    thread_block( CURRENT_THREAD , THREAD_BLOCKED_DEV_ISR );
    93     sched_yield();
     93    sched_yield( NULL );
    9494   
    9595} // soclib_dma_cmd()
  • trunk/hal/tsar_mips32/drivers/soclib_hba.c

    r279 r296  
    197197            else                                // retry if asynchronous access.
    198198            {
    199                 sched_yield();
     199                sched_yield( NULL );
    200200            }
    201201        }
     
    240240    {
    241241        thread_block( CURRENT_THREAD , THREAD_BLOCKED_DEV_ISR );
    242         sched_yield();
     242        sched_yield( NULL );
    243243    }
    244244           
  • trunk/hal/tsar_mips32/drivers/soclib_pic.c

    r279 r296  
    2828#include <string.h>
    2929#include <vfs.h>
     30#include <rpc.h>
    3031#include <cluster.h>
    3132#include <printk.h>
     
    125126                           &pti_status );
    126127
    127     irq_dmsg("\n[INFO] %s : enter / WTI_STS = %x / HWI_STS = %x / WTI_STS = %x\n",
    128              __FUNCTION__ , wti_status , hwi_status , pti_status );
     128    irq_dmsg("\n[INFO] %s : enter for core[%x,%d] / WTI = %x / HWI = %x / WTI = %x\n",
     129             __FUNCTION__ , local_cxy , core->lid , wti_status , hwi_status , pti_status );
    129130
    130131    // analyse status and handle up to 3 pending IRQ (one WTI, one HWI, one PTI)
     
    142143            ack = base[(XCU_WTI_REG << 5) | core->lid];
    143144
    144             // force scheduling
    145             sched_yield();
     145            // check RPC FIFO,  and activate or create a RPC thread
     146            // it there is a pending RPC request
     147            rpc_check();
    146148        }
    147149        else                                    // it is an external device
  • trunk/hal/tsar_mips32/drivers/soclib_tty.c

    r279 r296  
    8282        // Block and deschedule server thread
    8383        thread_block( CURRENT_THREAD , THREAD_BLOCKED_DEV_ISR );
    84         sched_yield();
     84        sched_yield( NULL );
    8585    }
    8686    else if( type == TXT_WRITE )        // descheduling strategy for calling thread
     
    9494        // Block and deschedule server thread
    9595        thread_block( CURRENT_THREAD , THREAD_BLOCKED_DEV_ISR );
    96         sched_yield();
     96        sched_yield( NULL );
    9797    }
    9898    else if( type == TXT_SYNC_WRITE )  // busy waiting strategy for calling thread
Note: See TracChangeset for help on using the changeset viewer.