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/fs/devfs.c

    r437 r438  
    4242extern chdev_directory_t    chdev_dir;      // allocated in kernel_init.c
    4343
    44 #if (CONFIG_DEBUG_SYS_READ & 1)
     44#if (DEBUG_SYS_READ & 1)
    4545extern uint32_t  enter_devfs_read;
    4646extern uint32_t  exit_devfs_read;
    4747#endif
    4848
    49 #if (CONFIG_DEBUG_SYS_WRITE & 1)
     49#if (DEBUG_SYS_WRITE & 1)
    5050extern uint32_t  enter_devfs_write;
    5151extern uint32_t  exit_devfs_write;
     
    9292    error_t  error;
    9393
    94 #if CONFIG_DEBUG_DEVFS_INIT
     94#if DEBUG_DEVFS_INIT
    9595uint32_t cycle = (uint32_t)hal_get_cycles();
    96 if( CONFIG_DEBUG_DEVFS_INIT < cycle )
     96if( DEBUG_DEVFS_INIT < cycle )
    9797printk("\n[DBG] %s : thread %x enter at cycle %d\n",
    9898__FUNCTION__ , CURRENT_THREAD , cycle );
     
    110110    assert( (error == 0) , __FUNCTION__ , "cannot create <dev>\n" );
    111111
    112 #if( CONFIG_DEBUG_DEVFS_INIT & 1 )
    113 if( CONFIG_DEBUG_DEVFS_INIT < cycle )
     112#if( DEBUG_DEVFS_INIT & 1 )
     113if( DEBUG_DEVFS_INIT < cycle )
    114114printk("\n[DBG] %s : created <dev> inode at cycle %d\n", __FUNCTION__, cycle );
    115115#endif
     
    126126    assert( (error == 0) , __FUNCTION__ , "cannot create <external>\n" );
    127127
    128 #if CONFIG_DEBUG_DEVFS_INIT
     128#if DEBUG_DEVFS_INIT
    129129cycle = (uint32_t)hal_get_cycles();
    130 if( CONFIG_DEBUG_DEVFS_INIT < cycle )
     130if( DEBUG_DEVFS_INIT < cycle )
    131131printk("\n[DBG] %s : thread %x exit at cycle %d\n",
    132132__FUNCTION__ , CURRENT_THREAD , cycle );
     
    147147    uint32_t      channel;
    148148
    149 #if CONFIG_DEBUG_DEVFS_INIT
     149#if DEBUG_DEVFS_INIT
    150150uint32_t cycle = (uint32_t)hal_get_cycles();
    151 if( CONFIG_DEBUG_DEVFS_INIT < cycle )
     151if( DEBUG_DEVFS_INIT < cycle )
    152152printk("\n[DBG] %s : thread %x enter at cycle %d\n",
    153153__FUNCTION__ , CURRENT_THREAD , cycle );
     
    357357    }
    358358
    359 #if CONFIG_DEBUG_DEVFS_INIT
     359#if DEBUG_DEVFS_INIT
    360360cycle = (uint32_t)hal_get_cycles();
    361 if( CONFIG_DEBUG_DEVFS_INIT < cycle )
     361if( DEBUG_DEVFS_INIT < cycle )
    362362printk("\n[DBG] %s : thread %x exit at cycle %d\n",
    363363__FUNCTION__ , CURRENT_THREAD , cycle );
     
    385385    char               k_buf[CONFIG_TXT_KBUF_SIZE];  // local kernel buffer
    386386
    387 #if (CONFIG_DEBUG_SYS_READ & 1)
     387#if (DEBUG_SYS_READ & 1)
    388388enter_devfs_read = hal_time_stamp();
    389389#endif
    390390
    391 #if (CONFIG_DEBUG_SYS_WRITE & 1)
     391#if (DEBUG_SYS_WRITE & 1)
    392392enter_devfs_write = hal_time_stamp();
    393393#endif
    394394
    395 #if CONFIG_DEBUG_DEVFS_MOVE
     395#if DEBUG_DEVFS_MOVE
    396396uint32_t cycle = (uint32_t)hal_get_cycles();
    397 if( CONFIG_DEBUG_DEVFS_MOVE < cycle )
     397if( DEBUG_DEVFS_MOVE < cycle )
    398398printk("\n[DBG] %s : thread %x enter / to_mem %d / cycle %d\n",
    399399__FUNCTION__ , CURRENT_THREAD , to_buffer , cycle );
     
    431431             }
    432432
    433 #if CONFIG_DEBUG_DEVFS_MOVE
     433#if DEBUG_DEVFS_MOVE
    434434cycle = (uint32_t)hal_get_cycles();
    435 if( CONFIG_DEBUG_DEVFS_MOVE < cycle )
     435if( DEBUG_DEVFS_MOVE < cycle )
    436436printk("\n[DBG] %s : thread %x exit / to_mem %d / cycle %d\n",
    437437__FUNCTION__ , CURRENT_THREAD , to_buffer / cycle );
    438438#endif
    439439
    440 #if (CONFIG_DEBUG_SYS_READ & 1)
     440#if (DEBUG_SYS_READ & 1)
    441441exit_devfs_read = hal_time_stamp();
    442442#endif
     
    455455            {
    456456
    457 #if CONFIG_DEBUG_DEVFS_MOVE
     457#if DEBUG_DEVFS_MOVE
    458458cycle = (uint32_t)hal_get_cycles();
    459 if( CONFIG_DEBUG_DEVFS_MOVE < cycle )
     459if( DEBUG_DEVFS_MOVE < cycle )
    460460printk("\n[DBG] %s : thread %x exit / to_mem %d / cycle %d\n",
    461461__FUNCTION__ , CURRENT_THREAD , to_buffer / cycle );
    462462#endif
    463463
    464 #if (CONFIG_DEBUG_SYS_WRITE & 1)
     464#if (DEBUG_SYS_WRITE & 1)
    465465exit_devfs_write = hal_time_stamp();
    466466#endif
Note: See TracChangeset for help on using the changeset viewer.