Ignore:
Timestamp:
Feb 20, 2018, 5:32:17 PM (4 years ago)
Author:
alain
Message:

Fix a bad bug in scheduler...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/fs/devfs.c

    r433 r435  
    4242extern chdev_directory_t    chdev_dir;      // allocated in kernel_init.c
    4343
    44 #if CONFIG_READ_DEBUG
    45 extern uint32_t  enter_devfs_move;
    46 extern uint32_t  exit_devfs_move;
     44#if (CONFIG_DEBUG_SYS_READ & 1)
     45extern uint32_t  enter_devfs_read;
     46extern uint32_t  exit_devfs_read;
     47#endif
     48
     49#if (CONFIG_DEBUG_SYS_WRITE & 1)
     50extern uint32_t  enter_devfs_write;
     51extern uint32_t  exit_devfs_write;
    4752#endif
    4853
     
    375380    char               k_buf[CONFIG_TXT_KBUF_SIZE];  // local kernel buffer
    376381
     382#if (CONFIG_DEBUG_SYS_READ & 1)
     383enter_devfs_read = hal_time_stamp();
     384#endif
     385
     386#if (CONFIG_DEBUG_SYS_WRITE & 1)
     387enter_devfs_write = hal_time_stamp();
     388#endif
     389
    377390#if CONFIG_DEBUG_DEVFS_MOVE
    378391uint32_t cycle = (uint32_t)hal_get_cycles();
     
    380393printk("\n[DBG] %s : thread %x enter / to_mem %d / cycle %d\n",
    381394__FUNCTION__ , CURRENT_THREAD , to_buffer , cycle );
    382 #endif
    383 
    384 #if CONFIG_READ_DEBUG
    385 enter_devfs_move = hal_time_stamp();
    386395#endif
    387396
     
    424433#endif
    425434
    426 #if CONFIG_READ_DEBUG
    427 exit_devfs_move = hal_time_stamp();
     435#if (CONFIG_DEBUG_SYS_READ & 1)
     436exit_devfs_read = hal_time_stamp();
    428437#endif
    429438            return size;
     
    448457#endif
    449458
     459#if (CONFIG_DEBUG_SYS_WRITE & 1)
     460exit_devfs_write = hal_time_stamp();
     461#endif
    450462                return size;
    451463            }
Note: See TracChangeset for help on using the changeset viewer.