Changeset 438 for trunk/kernel/fs/devfs.c
- Timestamp:
- Apr 4, 2018, 2:49:02 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/devfs.c
r437 r438 42 42 extern chdev_directory_t chdev_dir; // allocated in kernel_init.c 43 43 44 #if ( CONFIG_DEBUG_SYS_READ & 1)44 #if (DEBUG_SYS_READ & 1) 45 45 extern uint32_t enter_devfs_read; 46 46 extern uint32_t exit_devfs_read; 47 47 #endif 48 48 49 #if ( CONFIG_DEBUG_SYS_WRITE & 1)49 #if (DEBUG_SYS_WRITE & 1) 50 50 extern uint32_t enter_devfs_write; 51 51 extern uint32_t exit_devfs_write; … … 92 92 error_t error; 93 93 94 #if CONFIG_DEBUG_DEVFS_INIT94 #if DEBUG_DEVFS_INIT 95 95 uint32_t cycle = (uint32_t)hal_get_cycles(); 96 if( CONFIG_DEBUG_DEVFS_INIT < cycle )96 if( DEBUG_DEVFS_INIT < cycle ) 97 97 printk("\n[DBG] %s : thread %x enter at cycle %d\n", 98 98 __FUNCTION__ , CURRENT_THREAD , cycle ); … … 110 110 assert( (error == 0) , __FUNCTION__ , "cannot create <dev>\n" ); 111 111 112 #if( CONFIG_DEBUG_DEVFS_INIT & 1 )113 if( CONFIG_DEBUG_DEVFS_INIT < cycle )112 #if( DEBUG_DEVFS_INIT & 1 ) 113 if( DEBUG_DEVFS_INIT < cycle ) 114 114 printk("\n[DBG] %s : created <dev> inode at cycle %d\n", __FUNCTION__, cycle ); 115 115 #endif … … 126 126 assert( (error == 0) , __FUNCTION__ , "cannot create <external>\n" ); 127 127 128 #if CONFIG_DEBUG_DEVFS_INIT128 #if DEBUG_DEVFS_INIT 129 129 cycle = (uint32_t)hal_get_cycles(); 130 if( CONFIG_DEBUG_DEVFS_INIT < cycle )130 if( DEBUG_DEVFS_INIT < cycle ) 131 131 printk("\n[DBG] %s : thread %x exit at cycle %d\n", 132 132 __FUNCTION__ , CURRENT_THREAD , cycle ); … … 147 147 uint32_t channel; 148 148 149 #if CONFIG_DEBUG_DEVFS_INIT149 #if DEBUG_DEVFS_INIT 150 150 uint32_t cycle = (uint32_t)hal_get_cycles(); 151 if( CONFIG_DEBUG_DEVFS_INIT < cycle )151 if( DEBUG_DEVFS_INIT < cycle ) 152 152 printk("\n[DBG] %s : thread %x enter at cycle %d\n", 153 153 __FUNCTION__ , CURRENT_THREAD , cycle ); … … 357 357 } 358 358 359 #if CONFIG_DEBUG_DEVFS_INIT359 #if DEBUG_DEVFS_INIT 360 360 cycle = (uint32_t)hal_get_cycles(); 361 if( CONFIG_DEBUG_DEVFS_INIT < cycle )361 if( DEBUG_DEVFS_INIT < cycle ) 362 362 printk("\n[DBG] %s : thread %x exit at cycle %d\n", 363 363 __FUNCTION__ , CURRENT_THREAD , cycle ); … … 385 385 char k_buf[CONFIG_TXT_KBUF_SIZE]; // local kernel buffer 386 386 387 #if ( CONFIG_DEBUG_SYS_READ & 1)387 #if (DEBUG_SYS_READ & 1) 388 388 enter_devfs_read = hal_time_stamp(); 389 389 #endif 390 390 391 #if ( CONFIG_DEBUG_SYS_WRITE & 1)391 #if (DEBUG_SYS_WRITE & 1) 392 392 enter_devfs_write = hal_time_stamp(); 393 393 #endif 394 394 395 #if CONFIG_DEBUG_DEVFS_MOVE395 #if DEBUG_DEVFS_MOVE 396 396 uint32_t cycle = (uint32_t)hal_get_cycles(); 397 if( CONFIG_DEBUG_DEVFS_MOVE < cycle )397 if( DEBUG_DEVFS_MOVE < cycle ) 398 398 printk("\n[DBG] %s : thread %x enter / to_mem %d / cycle %d\n", 399 399 __FUNCTION__ , CURRENT_THREAD , to_buffer , cycle ); … … 431 431 } 432 432 433 #if CONFIG_DEBUG_DEVFS_MOVE433 #if DEBUG_DEVFS_MOVE 434 434 cycle = (uint32_t)hal_get_cycles(); 435 if( CONFIG_DEBUG_DEVFS_MOVE < cycle )435 if( DEBUG_DEVFS_MOVE < cycle ) 436 436 printk("\n[DBG] %s : thread %x exit / to_mem %d / cycle %d\n", 437 437 __FUNCTION__ , CURRENT_THREAD , to_buffer / cycle ); 438 438 #endif 439 439 440 #if ( CONFIG_DEBUG_SYS_READ & 1)440 #if (DEBUG_SYS_READ & 1) 441 441 exit_devfs_read = hal_time_stamp(); 442 442 #endif … … 455 455 { 456 456 457 #if CONFIG_DEBUG_DEVFS_MOVE457 #if DEBUG_DEVFS_MOVE 458 458 cycle = (uint32_t)hal_get_cycles(); 459 if( CONFIG_DEBUG_DEVFS_MOVE < cycle )459 if( DEBUG_DEVFS_MOVE < cycle ) 460 460 printk("\n[DBG] %s : thread %x exit / to_mem %d / cycle %d\n", 461 461 __FUNCTION__ , CURRENT_THREAD , to_buffer / cycle ); 462 462 #endif 463 463 464 #if ( CONFIG_DEBUG_SYS_WRITE & 1)464 #if (DEBUG_SYS_WRITE & 1) 465 465 exit_devfs_write = hal_time_stamp(); 466 466 #endif
Note: See TracChangeset
for help on using the changeset viewer.