Ignore:
Timestamp:
Apr 4, 2018, 2:49:02 PM (6 years ago)
Author:
alain
Message:

Fix a bug in scheduler related to RPC blocking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_exit.c

    r436 r438  
    4343    trdid_t     trdid   = this->trdid;
    4444
    45 #if CONFIG_DEBUG_SYS_EXIT
     45#if DEBUG_SYS_EXIT
    4646uint64_t    tm_start;
    4747uint64_t    tm_end;
    4848tm_start = hal_get_cycles();
    49 if( CONFIG_DEBUG_SYS_EXIT < tm_start )
     49if( DEBUG_SYS_EXIT < tm_start )
    5050printk("\n[DBG] %s : thread %x enter / process %x / status %x / cycle %d\n",
    5151__FUNCTION__ , this, pid , status , (uint32_t)tm_start );
     
    5959    {
    6060
    61 #if CONFIG_DEBUG_SYSCALLS_ERROR
     61#if DEBUG_SYSCALLS_ERROR
    6262printk("\n[ERROR] in %s : calling thread %x is not thread 0 in owner cluster %x\n",
    6363__FUNCTION__, trdid, owner_cxy );
     
    7373    process->term_state = status;
    7474
    75 #if( CONFIG_DEBUG_SYS_EXIT & 1)
     75#if( DEBUG_SYS_EXIT & 1)
    7676printk("\n[DBG] %s : set exit status in process term_state\n", __FUNCTION__);
    7777#endif
     
    8080    process_txt_detach( XPTR( local_cxy , process ) );
    8181
    82 #if( CONFIG_DEBUG_SYS_EXIT & 1)
     82#if( DEBUG_SYS_EXIT & 1)
    8383printk("\n[DBG] %s : removed from TXT list\n", __FUNCTION__);
    8484#endif
     
    8787    process_sigaction( pid , DELETE_ALL_THREADS );
    8888
    89 #if( CONFIG_DEBUG_SYS_EXIT & 1)
     89#if( DEBUG_SYS_EXIT & 1)
    9090printk("\n[DBG] %s : deleted all other threads than main\n", __FUNCTION__);
    9191#endif
     
    9797    thread_block( XPTR( local_cxy , this ) , THREAD_BLOCKED_GLOBAL );
    9898
    99 #if( CONFIG_DEBUG_SYS_EXIT & 1)
     99#if( DEBUG_SYS_EXIT & 1)
    100100printk("\n[DBG] %s : blocked the main thread\n", __FUNCTION__);
    101101#endif
     
    106106                          PROCESS_TERM_EXIT );
    107107
    108 #if( CONFIG_DEBUG_SYS_EXIT & 1)
     108#if( DEBUG_SYS_EXIT & 1)
    109109printk("\n[DBG] %s : set EXIT flag in process term_state\n", __FUNCTION__);
    110110#endif
     
    112112    hal_fence();
    113113
    114 #if CONFIG_DEBUG_SYS_EXIT
     114#if DEBUG_SYS_EXIT
    115115tm_end = hal_get_cycles();
    116 if( CONFIG_DEBUG_SYS_EXIT < tm_end )
     116if( DEBUG_SYS_EXIT < tm_end )
    117117printk("\n[DBG] %s : thread %x exit / process %x / status %x / cost = %d / cycle %d\n",
    118118__FUNCTION__, this, pid, status, (uint32_t)(tm_end - tm_start), (uint32_t)tm_end );
Note: See TracChangeset for help on using the changeset viewer.