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/hal/tsar_mips32/drivers/soclib_tty.c

    r436 r438  
    3030#include <hal_special.h>
    3131
    32 #if (CONFIG_DEBUG_SYS_READ & 1)
     32#if (DEBUG_SYS_READ & 1)
    3333extern uint32_t  enter_tty_cmd_read;
    3434extern uint32_t  exit_tty_cmd_read;
     
    3838#endif
    3939
    40 #if (CONFIG_DEBUG_SYS_WRITE & 1)
     40#if (DEBUG_SYS_WRITE & 1)
    4141extern uint32_t  enter_tty_cmd_write;
    4242extern uint32_t  exit_tty_cmd_write;
     
    115115    xptr_t   error_xp = XPTR( th_cxy , &th_ptr->txt_cmd.error );
    116116
    117 #if (CONFIG_DEBUG_SYS_READ & 1)
     117#if (DEBUG_SYS_READ & 1)
    118118if( type == TXT_READ) enter_tty_cmd_read = (uint32_t)hal_get_cycles();
    119119#endif
    120120
    121 #if (CONFIG_DEBUG_SYS_WRITE & 1)
     121#if (DEBUG_SYS_WRITE & 1)
    122122if( type == TXT_WRITE) enter_tty_cmd_write = (uint32_t)hal_get_cycles();
    123123#endif
    124124
    125 #if CONFIG_DEBUG_HAL_TXT_RX
     125#if DEBUG_HAL_TXT_RX
    126126uint32_t cycle = (uint32_t)hal_get_cycles();
    127 if( (CONFIG_DEBUG_HAL_TXT_RX < cycle) && (type == TXT_READ) )
     127if( (DEBUG_HAL_TXT_RX < cycle) && (type == TXT_READ) )
    128128printk("\n[DBG] %s : thread %x enter for RX / cycle %d\n",
    129129__FUNCTION__ , CURRENT_THREAD , cycle );
    130130#endif
    131131
    132 #if CONFIG_DEBUG_HAL_TXT_TX
     132#if DEBUG_HAL_TXT_TX
    133133uint32_t cycle = (uint32_t)hal_get_cycles();
    134 if( (CONFIG_DEBUG_HAL_TXT_TX < cycle) && (type == TXT_WRITE) )
     134if( (DEBUG_HAL_TXT_TX < cycle) && (type == TXT_WRITE) )
    135135printk("\n[DBG] %s : thread %x enter for TX / cycle %d\n",
    136136__FUNCTION__ , CURRENT_THREAD , cycle );
     
    238238    }
    239239
    240 #if CONFIG_DEBUG_HAL_TXT_RX
     240#if DEBUG_HAL_TXT_RX
    241241cycle = (uint32_t)hal_get_cycles();
    242 if( (CONFIG_DEBUG_HAL_TXT_RX < cycle) && (type == TXT_READ) )
     242if( (DEBUG_HAL_TXT_RX < cycle) && (type == TXT_READ) )
    243243printk("\n[DBG] %s : thread %x exit after RX / cycle %d\n",
    244244__FUNCTION__ , CURRENT_THREAD , cycle );
    245245#endif
    246246
    247 #if CONFIG_DEBUG_HAL_TXT_TX
     247#if DEBUG_HAL_TXT_TX
    248248cycle = (uint32_t)hal_get_cycles();
    249 if( (CONFIG_DEBUG_HAL_TXT_TX < cycle) && (type == TXT_WRITE) )
     249if( (DEBUG_HAL_TXT_TX < cycle) && (type == TXT_WRITE) )
    250250printk("\n[DBG] %s : thread %x exit after TX / cycle %d\n",
    251251__FUNCTION__ , CURRENT_THREAD , cycle );
    252252#endif
    253253
    254 #if (CONFIG_DEBUG_SYS_READ & 1)
     254#if (DEBUG_SYS_READ & 1)
    255255if( type == TXT_READ ) exit_tty_cmd_read = (uint32_t)hal_get_cycles();
    256256#endif
    257257
    258 #if (CONFIG_DEBUG_SYS_WRITE & 1)
     258#if (DEBUG_SYS_WRITE & 1)
    259259if( type == TXT_WRITE ) exit_tty_cmd_write = (uint32_t)hal_get_cycles();
    260260#endif
     
    288288    server_lid = server->core->lid;
    289289
    290 #if (CONFIG_DEBUG_SYS_READ & 1)
     290#if (DEBUG_SYS_READ & 1)
    291291if( is_rx ) enter_tty_isr_read = (uint32_t)hal_get_cycles();
    292292#endif
    293293
    294 #if (CONFIG_DEBUG_SYS_WRITE & 1)
     294#if (DEBUG_SYS_WRITE & 1)
    295295if( is_rx == 0 ) enter_tty_isr_write = (uint32_t)hal_get_cycles();
    296296#endif
    297297
    298 #if CONFIG_DEBUG_HAL_TXT_RX
     298#if DEBUG_HAL_TXT_RX
    299299uint32_t cycle = (uint32_t)hal_get_cycles();
    300 if( (CONFIG_DEBUG_HAL_TXT_RX < cycle) && is_rx )
     300if( (DEBUG_HAL_TXT_RX < cycle) && is_rx )
    301301printk("\n[DBG] %s : enter for RX / cycle %d\n", __FUNCTION__ , cycle );
    302302#endif
    303303
    304 #if CONFIG_DEBUG_HAL_TXT_TX
     304#if DEBUG_HAL_TXT_TX
    305305uint32_t cycle = (uint32_t)hal_get_cycles();
    306 if( (CONFIG_DEBUG_HAL_TXT_TX < cycle) && (is_rx == 0) )
     306if( (DEBUG_HAL_TXT_TX < cycle) && (is_rx == 0) )
    307307printk("\n[DBG] %s : enter for TX / cycle %d\n", __FUNCTION__ , cycle );
    308308#endif
     
    459459    hal_fence();
    460460
    461 #if CONFIG_DEBUG_HAL_TXT_RX
     461#if DEBUG_HAL_TXT_RX
    462462cycle = (uint32_t)hal_get_cycles();
    463 if( (CONFIG_DEBUG_HAL_TXT_RX < cycle) && is_rx )
     463if( (DEBUG_HAL_TXT_RX < cycle) && is_rx )
    464464printk("\n[DBG] %s : exit after RX / cycle %d\n", __FUNCTION__, cycle );
    465465#endif
    466466
    467 #if CONFIG_DEBUG_HAL_TXT_TX
     467#if DEBUG_HAL_TXT_TX
    468468cycle = (uint32_t)hal_get_cycles();
    469 if( (CONFIG_DEBUG_HAL_TXT_TX < cycle) && (is_rx == 0) )
     469if( (DEBUG_HAL_TXT_TX < cycle) && (is_rx == 0) )
    470470printk("\n[DBG] %s : exit after TX / cycle %d\n", __FUNCTION__, cycle );
    471471#endif
    472472
    473 #if (CONFIG_DEBUG_SYS_READ & 1)
     473#if (DEBUG_SYS_READ & 1)
    474474if( is_rx ) exit_tty_isr_read = (uint32_t)hal_get_cycles();
    475475#endif
    476476
    477 #if (CONFIG_DEBUG_SYS_WRITE & 1)
     477#if (DEBUG_SYS_WRITE & 1)
    478478if( is_rx == 0 ) exit_tty_isr_write = (uint32_t)hal_get_cycles();
    479479#endif
Note: See TracChangeset for help on using the changeset viewer.