Changeset 337 for trunk/hal


Ignore:
Timestamp:
Aug 7, 2017, 12:50:17 PM (7 years ago)
Author:
alain
Message:

Introduce the delayed context switch if current thread has a lock.

Location:
trunk/hal
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/generic/hal_context.h

    r311 r337  
    3131// and hal_fpu_context_t, defined in hal_context.c file, that are accessed with generic
    3232// void* pointers stored in the thread descriptor.
    33 // - the "hal_context_t" structure is used to store the CPU registers values that
    34 //   have not been saved in the kernel stack by the interrupt handler.
    35 // - the "hal_fpu_context_t" structure is used to save the FPU registers when required.
     33// - the "hal_context_t" struct is used for the CPU registers values at context switch.
     34// - the "hal_fpu_context_t" struct is used for the FPU registers when required.
    3635//////////////////////////////////////////////////////////////////////////////////////////
    3736
  • trunk/hal/tsar_mips32/core/hal_interrupt.c

    r279 r337  
    3535                               reg_t    * regs_tbl )
    3636{
    37     irq_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     37    irq_dmsg("\n[INFO] %s : enter / core[%x,%d] / cycle %d\n",
     38    __FUNCTION__ , local_cxy , this->core->lid , hal_time_stamp() );
    3839
    3940        // update user time     
     
    4344    soclib_pic_irq_handler();
    4445           
    45     // handle pending signals for interrupted thread
    46     thread_signals_handle( this );
    47 
    4846        // update kernel time
    4947        thread_kernel_time_update( this );
    5048
    51     irq_dmsg("\n[INFO] %s : exit at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     49    irq_dmsg("\n[INFO] %s : exit / core[%x,%d] / cycle %d\n",
     50    __FUNCTION__ , local_cxy , this->core->lid , hal_time_stamp() );
    5251}
  • trunk/hal/tsar_mips32/drivers/soclib_pic.c

    r296 r337  
    139139            assert( (index == core->lid) , __FUNCTION__ , "illegal IPI index" );
    140140
    141             // acknowledge WTI
     141            // read mailbox content to acknowledge WTI,
    142142            uint32_t * base = soclib_pic_xcu_base();
    143143            ack = base[(XCU_WTI_REG << 5) | core->lid];
    144 
     144           
    145145            // check RPC FIFO,  and activate or create a RPC thread
    146             // it there is a pending RPC request
    147             rpc_check();
     146            // condition is always true, but we must use the ack value
     147            if( ack + 1 ) rpc_check();
    148148        }
    149149        else                                    // it is an external device
Note: See TracChangeset for help on using the changeset viewer.