Changeset 438 for trunk/kernel/kern/chdev.c
- Timestamp:
- Apr 4, 2018, 2:49:02 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/chdev.c
r437 r438 39 39 extern chdev_directory_t chdev_dir; // allocated in kernel_init.c 40 40 41 #if ( CONFIG_DEBUG_SYS_READ & 1)41 #if (DEBUG_SYS_READ & 1) 42 42 extern uint32_t enter_chdev_cmd_read; 43 43 extern uint32_t exit_chdev_cmd_read; … … 46 46 #endif 47 47 48 #if ( CONFIG_DEBUG_SYS_WRITE & 1)48 #if (DEBUG_SYS_WRITE & 1) 49 49 extern uint32_t enter_chdev_cmd_write; 50 50 extern uint32_t exit_chdev_cmd_write; … … 130 130 uint32_t save_sr; // for critical section 131 131 132 #if ( CONFIG_DEBUG_SYS_READ & 1)132 #if (DEBUG_SYS_READ & 1) 133 133 enter_chdev_cmd_read = (uint32_t)hal_get_cycles(); 134 134 #endif 135 135 136 #if ( CONFIG_DEBUG_SYS_WRITE & 1)136 #if (DEBUG_SYS_WRITE & 1) 137 137 enter_chdev_cmd_write = (uint32_t)hal_get_cycles(); 138 138 #endif … … 144 144 chdev_t * chdev_ptr = (chdev_t *)GET_PTR( chdev_xp ); 145 145 146 #if ( CONFIG_DEBUG_CHDEV_CMD_RX || CONFIG_DEBUG_CHDEV_CMD_TX)146 #if (DEBUG_CHDEV_CMD_RX || DEBUG_CHDEV_CMD_TX) 147 147 bool_t is_rx = hal_remote_lw( XPTR( chdev_cxy , &chdev_ptr->is_rx ) ); 148 148 #endif 149 149 150 #if CONFIG_DEBUG_CHDEV_CMD_RX150 #if DEBUG_CHDEV_CMD_RX 151 151 uint32_t rx_cycle = (uint32_t)hal_get_cycles(); 152 if( (is_rx) && ( CONFIG_DEBUG_CHDEV_CMD_RX < rx_cycle) )152 if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) ) 153 153 printk("\n[DBG] %s : client_thread %x (%s) enter for RX / cycle %d\n", 154 154 __FUNCTION__, this, thread_type_str(this->type) , rx_cycle ); 155 155 #endif 156 156 157 #if CONFIG_DEBUG_CHDEV_CMD_TX157 #if DEBUG_CHDEV_CMD_TX 158 158 uint32_t tx_cycle = (uint32_t)hal_get_cycles(); 159 if( (is_rx == 0) && ( CONFIG_DEBUG_CHDEV_CMD_TX < tx_cycle) )159 if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) ) 160 160 printk("\n[DBG] %s : client_thread %x (%s) enter for TX / cycle %d\n", 161 161 __FUNCTION__, this, thread_type_str(this->type) , tx_cycle ); … … 207 207 hal_restore_irq( save_sr ); 208 208 209 #if CONFIG_DEBUG_CHDEV_CMD_RX209 #if DEBUG_CHDEV_CMD_RX 210 210 rx_cycle = (uint32_t)hal_get_cycles(); 211 if( (is_rx) && ( CONFIG_DEBUG_CHDEV_CMD_RX < rx_cycle) )211 if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) ) 212 212 printk("\n[DBG] %s : client_thread %x (%s) exit for RX / cycle %d\n", 213 213 __FUNCTION__, this, thread_type_str(this->type) , rx_cycle ); 214 214 #endif 215 215 216 #if CONFIG_DEBUG_CHDEV_CMD_TX216 #if DEBUG_CHDEV_CMD_TX 217 217 tx_cycle = (uint32_t)hal_get_cycles(); 218 if( (is_rx == 0) && ( CONFIG_DEBUG_CHDEV_CMD_TX < tx_cycle) )218 if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) ) 219 219 printk("\n[DBG] %s : client_thread %x (%s) exit for TX / cycle %d\n", 220 220 __FUNCTION__, this, thread_type_str(this->type) , tx_cycle ); 221 221 #endif 222 222 223 #if ( CONFIG_DEBUG_SYS_READ & 1)223 #if (DEBUG_SYS_READ & 1) 224 224 exit_chdev_cmd_read = (uint32_t)hal_get_cycles(); 225 225 #endif 226 226 227 #if ( CONFIG_DEBUG_SYS_WRITE & 1)227 #if (DEBUG_SYS_WRITE & 1) 228 228 exit_chdev_cmd_write = (uint32_t)hal_get_cycles(); 229 229 #endif … … 275 275 client_ptr = (thread_t *)GET_PTR( client_xp ); 276 276 277 #if CONFIG_DEBUG_CHDEV_SERVER_RX277 #if DEBUG_CHDEV_SERVER_RX 278 278 uint32_t rx_cycle = (uint32_t)hal_get_cycles(); 279 if( (chdev->is_rx) && ( CONFIG_DEBUG_CHDEV_SERVER_RX < rx_cycle) )279 if( (chdev->is_rx) && (DEBUG_CHDEV_SERVER_RX < rx_cycle) ) 280 280 printk("\n[DBG] %s : server_thread %x start RX / client %x / cycle %d\n", 281 281 __FUNCTION__ , server , client_ptr , rx_cycle ); 282 282 #endif 283 283 284 #if CONFIG_DEBUG_CHDEV_SERVER_TX284 #if DEBUG_CHDEV_SERVER_TX 285 285 uint32_t tx_cycle = (uint32_t)hal_get_cycles(); 286 if( (chdev->is_rx == 0) && ( CONFIG_DEBUG_CHDEV_SERVER_TX < tx_cycle) )286 if( (chdev->is_rx == 0) && (DEBUG_CHDEV_SERVER_TX < tx_cycle) ) 287 287 printk("\n[DBG] %s : server_thread %x start TX / client %x / cycle %d\n", 288 288 __FUNCTION__ , server , client_ptr , tx_cycle ); 289 289 #endif 290 290 291 #if ( CONFIG_DEBUG_SYS_READ & 1)291 #if (DEBUG_SYS_READ & 1) 292 292 enter_chdev_server_read = (uint32_t)hal_get_cycles(); 293 293 #endif 294 294 295 #if ( CONFIG_DEBUG_SYS_WRITE & 1)295 #if (DEBUG_SYS_WRITE & 1) 296 296 enter_chdev_server_write = (uint32_t)hal_get_cycles(); 297 297 #endif … … 308 308 thread_unblock( client_xp , THREAD_BLOCKED_IO ); 309 309 310 #if CONFIG_DEBUG_CHDEV_SERVER_RX310 #if DEBUG_CHDEV_SERVER_RX 311 311 rx_cycle = (uint32_t)hal_get_cycles(); 312 if( (chdev->is_rx) && ( CONFIG_DEBUG_CHDEV_SERVER_RX < rx_cycle) )312 if( (chdev->is_rx) && (DEBUG_CHDEV_SERVER_RX < rx_cycle) ) 313 313 printk("\n[DBG] %s : server_thread %x completes RX / client %x / cycle %d\n", 314 314 __FUNCTION__ , server , client_ptr , rx_cycle ); 315 315 #endif 316 316 317 #if CONFIG_DEBUG_CHDEV_SERVER_TX317 #if DEBUG_CHDEV_SERVER_TX 318 318 tx_cycle = (uint32_t)hal_get_cycles(); 319 if( (chdev->is_rx == 0) && ( CONFIG_DEBUG_CHDEV_SERVER_TX < tx_cycle) )319 if( (chdev->is_rx == 0) && (DEBUG_CHDEV_SERVER_TX < tx_cycle) ) 320 320 printk("\n[DBG] %s : server_thread %x completes TX / client %x / cycle %d\n", 321 321 __FUNCTION__ , server , client_ptr , tx_cycle ); 322 322 #endif 323 323 324 #if ( CONFIG_DEBUG_SYS_READ & 1)324 #if (DEBUG_SYS_READ & 1) 325 325 exit_chdev_server_read = (uint32_t)hal_get_cycles(); 326 326 #endif 327 327 328 #if ( CONFIG_DEBUG_SYS_WRITE & 1)328 #if (DEBUG_SYS_WRITE & 1) 329 329 exit_chdev_server_write = (uint32_t)hal_get_cycles(); 330 330 #endif
Note: See TracChangeset
for help on using the changeset viewer.