Changeset 593 for trunk/kernel/kern/chdev.c
- Timestamp:
- Nov 10, 2018, 2:16:38 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/chdev.c
r583 r593 174 174 uint32_t rx_cycle = (uint32_t)hal_get_cycles(); 175 175 if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) ) 176 printk("\n[ DBG] %s : client_thread %x (%s) enter for RX / server = %x/ cycle %d\n",177 __FUNCTION__, this , thread_type_str(this->type) , server_ptr, rx_cycle );176 printk("\n[%s] client[%x,%x] enter for RX / server[%x,%x] / cycle %d\n", 177 __FUNCTION__, this->process->pid, this->trdid, server_ptr->process->pid, server_ptr->trdid, rx_cycle ); 178 178 #endif 179 179 … … 181 181 uint32_t tx_cycle = (uint32_t)hal_get_cycles(); 182 182 if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) ) 183 printk("\n[ DBG] %s : client_thread %x (%s) enter for TX / server = %x/ cycle %d\n",184 __FUNCTION__, this , thread_type_str(this->type) , server_ptr, tx_cycle );183 printk("\n[%s] client[%x,%x] enter for TX / server[%x,%x] / cycle %d\n", 184 __FUNCTION__, this->process->pid, this->trdid, server_ptr->process->pid, server_ptr->trdid, tx_cycle ); 185 185 #endif 186 186 … … 222 222 #if (DEBUG_CHDEV_CMD_TX & 1) 223 223 if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) ) 224 printk("\n[DBG] in %s : client thread %x blocked\n", __FUNCTION__, this ); 224 printk("\n[%s] client thread[%x,%x] blocked\n", 225 __FUNCTION__, this->process_pid, this->trdid ); 225 226 #endif 226 227 227 228 #if (DEBUG_CHDEV_CMD_RX & 1) 228 229 if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) ) 229 printk("\n[DBG] in %s : client thread %x blocked\n", __FUNCTION__, this ); 230 printk("\n[%s] client thread[%x,%x] blocked\n", 231 __FUNCTION__, this->process_pid, this->trdid ); 230 232 #endif 231 233 … … 236 238 #if (DEBUG_CHDEV_CMD_TX & 1) 237 239 if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) ) 238 printk("\n[DBG] in %s : TX server thread %x unblocked\n", __FUNCTION__, server_ptr ); 240 printk("\n[%s] TX server thread[%x,%x] unblocked\n", 241 __FUNCTION__, server_ptr->process->pid, server_ptr->trdid ); 239 242 #endif 240 243 241 244 #if (DEBUG_CHDEV_CMD_RX & 1) 242 245 if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) ) 243 printk("\n[DBG] in %s : RX server thread %x unblocked\n", __FUNCTION__, server_ptr ); 246 printk("\n[%s] RX server thread[%x,%x] unblocked\n", 247 __FUNCTION__, server_ptr->process->pid, server_ptr->trdid ); 244 248 #endif 245 249 … … 249 253 #if (DEBUG_CHDEV_CMD_TX & 1) 250 254 if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) ) 251 printk("\n[DBG] in %s : thread %x registered write request in chdev\n", __FUNCTION__, this ); 255 printk("\n[%s] client thread[%x,%x] registered write request in chdev\n", 256 __FUNCTION__, this->process->pid, this->trdid ); 252 257 #endif 253 258 254 259 #if (DEBUG_CHDEV_CMD_RX & 1) 255 260 if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) ) 256 printk("\n[DBG] in %s : thread %x registered read request in chdev\n", __FUNCTION__, this ); 261 printk("\n[%s] client thread[%x,%x] registered read request in chdev\n", 262 __FUNCTION__, this->process->pid, this->trdid ); 257 263 #endif 258 264 … … 264 270 #if (DEBUG_CHDEV_CMD_TX & 1) 265 271 if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) ) 266 printk("\n[ DBG] in %s : client thread %x sent IPI to TX server thread %x\n",267 __FUNCTION__, this , server_ptr);272 printk("\n[%s] client thread[%x,%x] sent IPI to TX server thread[%x,%x]\n", 273 __FUNCTION__, this->process->pid, this->trdid, server_ptr->process->pid, server_ptr->trdid ); 268 274 #endif 269 275 270 276 #if (DEBUG_CHDEV_CMD_RX & 1) 271 277 if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) ) 272 printk("\n[ DBG] in %s : client thread %x sent IPI to RX server thread %x\n",273 __FUNCTION__, this , server_ptr);278 printk("\n[%s] client thread[%x,%x] sent IPI to RX server thread[%x,%x]\n", 279 __FUNCTION__, this->process->pid, this->trdid, server_ptr->process->pid, server_ptr->trdid ); 274 280 #endif 275 281 … … 288 294 rx_cycle = (uint32_t)hal_get_cycles(); 289 295 if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) ) 290 printk("\n[ DBG] %s : client_thread %x (%s)exit for RX / cycle %d\n",291 __FUNCTION__, this , thread_type_str(this->type), rx_cycle );296 printk("\n[%s] client_thread[%x,%x] exit for RX / cycle %d\n", 297 __FUNCTION__, this->process->pid, this->trdid, rx_cycle ); 292 298 #endif 293 299 … … 295 301 tx_cycle = (uint32_t)hal_get_cycles(); 296 302 if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) ) 297 printk("\n[ DBG] %s : client_thread %x (%s)exit for TX / cycle %d\n",298 __FUNCTION__, this , thread_type_str(this->type), tx_cycle );303 printk("\n[%s] client_thread[%x,%x] exit for TX / cycle %d\n", 304 __FUNCTION__, this->process->pid, this->trdid, tx_cycle ); 299 305 #endif 300 306 … … 335 341 uint32_t rx_cycle = (uint32_t)hal_get_cycles(); 336 342 if( (chdev->is_rx) && (DEBUG_CHDEV_SERVER_RX < rx_cycle) ) 337 printk("\n[ DBG] %s : dev_thread %xstart RX / cycle %d\n",338 __FUNCTION__ , server-> trdid, rx_cycle );343 printk("\n[%s] dev_thread[%x,%x] start RX / cycle %d\n", 344 __FUNCTION__ , server->process->pid, server->trdid, rx_cycle ); 339 345 #endif 340 346 … … 342 348 uint32_t tx_cycle = (uint32_t)hal_get_cycles(); 343 349 if( (chdev->is_rx == 0) && (DEBUG_CHDEV_SERVER_TX < tx_cycle) ) 344 printk("\n[ DBG] %s : dev_thread %xstart TX / cycle %d\n",345 __FUNCTION__ , server-> trdid, tx_cycle );350 printk("\n[%s] dev_thread[%x,%x] start TX / cycle %d\n", 351 __FUNCTION__ , server->process->pid, server->trdid, tx_cycle ); 346 352 #endif 347 353 … … 356 362 rx_cycle = (uint32_t)hal_get_cycles(); 357 363 if( (chdev->is_rx) && (DEBUG_CHDEV_SERVER_RX < rx_cycle) ) 358 printk("\n[ DBG] %s : dev_thread %xfound RX queue empty => blocks / cycle %d\n",359 __FUNCTION__ , server-> trdid, rx_cycle );364 printk("\n[%s] dev_thread[%x,%x] found RX queue empty => blocks / cycle %d\n", 365 __FUNCTION__ , server->process->pid, server->trdid, rx_cycle ); 360 366 #endif 361 367 … … 363 369 tx_cycle = (uint32_t)hal_get_cycles(); 364 370 if( (chdev->is_rx == 0) && (DEBUG_CHDEV_SERVER_TX < tx_cycle) ) 365 printk("\n[ DBG] %s : dev_thread %xfound TX queue empty => blocks / cycle %d\n",366 __FUNCTION__ , server-> trdid, tx_cycle );371 printk("\n[%s] dev_thread[%x,%x] found TX queue empty => blocks / cycle %d\n", 372 __FUNCTION__ , server->process->pid, server->trdid, tx_cycle ); 367 373 #endif 368 374 … … 398 404 rx_cycle = (uint32_t)hal_get_cycles(); 399 405 if( (chdev->is_rx) && (DEBUG_CHDEV_SERVER_RX < rx_cycle) ) 400 printk("\n[DBG] %s : dev_thread %x for RX found client thread %x in process %x / cycle %d\n", 401 __FUNCTION__, server->trdid ,client_ptr->trdid ,client_ptr->process->pid, rx_cycle ); 406 printk("\n[%s] dev_thread[%x,%x] for RX get client thread[%x,%x] / cycle %d\n", 407 __FUNCTION__, server->process->pid, server->trdid, 408 client_ptr->process->pid, client_ptr->trdid, rx_cycle ); 402 409 #endif 403 410 … … 405 412 tx_cycle = (uint32_t)hal_get_cycles(); 406 413 if( (chdev->is_rx == 0) && (DEBUG_CHDEV_SERVER_TX < tx_cycle) ) 407 printk("\n[DBG] %s : dev_thread %x for TX found client thread %x in process %x / cycle %d\n", 408 __FUNCTION__, server->trdid ,client_ptr->trdid ,client_ptr->process->pid, tx_cycle ); 414 printk("\n[%s] dev_thread[%x,%x] for TX get client thread[%x,%x] / cycle %d\n", 415 __FUNCTION__, server->process->pid, server->trdid, 416 client_ptr->process->pid, client_ptr->trdid, tx_cycle ); 409 417 #endif 410 418 … … 426 434 rx_cycle = (uint32_t)hal_get_cycles(); 427 435 if( (chdev->is_rx) && (DEBUG_CHDEV_SERVER_RX < rx_cycle) ) 428 printk("\n[DBG] %s : dev_thread %x completes RX for client %x in process %x / cycle %d\n", 429 __FUNCTION__, server->trdid, client_ptr->trdid, client_ptr->process->pid, rx_cycle ); 436 printk("\n[%s] dev_thread[%x,%x] completes RX for client thread[%x,%x] / cycle %d\n", 437 __FUNCTION__, server->process->pid, server->trdid, 438 client_ptr->process->pid, client_ptr->trdid, rx_cycle ); 430 439 #endif 431 440 … … 433 442 tx_cycle = (uint32_t)hal_get_cycles(); 434 443 if( (chdev->is_rx == 0) && (DEBUG_CHDEV_SERVER_TX < tx_cycle) ) 435 printk("\n[DBG] %s : dev_thread %x completes TX for client %x in process %x / cycle %d\n", 436 __FUNCTION__, server->trdid, client_ptr->trdid, client_ptr->process->pid, tx_cycle ); 444 printk("\n[%s] dev_thread[%x,%x] completes TX for client thread[%x,%x] / cycle %d\n", 445 __FUNCTION__, server->process->pid, server->trdid, 446 client_ptr->process->pid, client_ptr->trdid, tx_cycle ); 437 447 #endif 438 448
Note: See TracChangeset
for help on using the changeset viewer.