Changeset 593
- Timestamp:
- Nov 10, 2018, 2:16:38 PM (6 years ago)
- Location:
- trunk/kernel/kern
- Files:
-
- 6 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 -
trunk/kernel/kern/cluster.c
r583 r593 113 113 114 114 #if DEBUG_CLUSTER_INIT 115 uint32_t cycle = (uint32_t)hal_get_cycles(); 115 uint32_t cycle = (uint32_t)hal_get_cycles(); 116 thread_t * this = CURRENT_THREAD; 116 117 if( DEBUG_CLUSTER_INIT < cycle ) 117 printk("\n[ DBG] %s : thread %x in process %xenters for cluster %x / cycle %d\n",118 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, local_cxy , cycle );118 printk("\n[%s] thread[%x,%x] enters for cluster %x / cycle %d\n", 119 __FUNCTION__, this->process->pid, this->trdid, local_cxy , cycle ); 119 120 #endif 120 121 … … 132 133 cycle = (uint32_t)hal_get_cycles(); 133 134 if( DEBUG_CLUSTER_INIT < cycle ) 134 printk("\n[ DBG] %s :PPM initialized in cluster %x / cycle %d\n",135 printk("\n[%s] PPM initialized in cluster %x / cycle %d\n", 135 136 __FUNCTION__ , local_cxy , cycle ); 136 137 #endif … … 142 143 cycle = (uint32_t)hal_get_cycles(); 143 144 if( DEBUG_CLUSTER_INIT < cycle ) 144 printk("\n[ DBG] %s :KHM initialized in cluster %x at cycle %d\n",145 printk("\n[%s] KHM initialized in cluster %x at cycle %d\n", 145 146 __FUNCTION__ , local_cxy , hal_get_cycles() ); 146 147 #endif … … 152 153 cycle = (uint32_t)hal_get_cycles(); 153 154 if( DEBUG_CLUSTER_INIT < cycle ) 154 printk("\n[ DBG] %s :KCM initialized in cluster %x at cycle %d\n",155 printk("\n[%s] KCM initialized in cluster %x at cycle %d\n", 155 156 __FUNCTION__ , local_cxy , hal_get_cycles() ); 156 157 #endif … … 167 168 cycle = (uint32_t)hal_get_cycles(); 168 169 if( DEBUG_CLUSTER_INIT < cycle ) 169 printk("\n[ DBG] %s :cores initialized in cluster %x / cycle %d\n",170 printk("\n[%s] cores initialized in cluster %x / cycle %d\n", 170 171 __FUNCTION__ , local_cxy , cycle ); 171 172 #endif … … 181 182 cycle = (uint32_t)hal_get_cycles(); 182 183 if( DEBUG_CLUSTER_INIT < cycle ) 183 printk("\n[ DBG] %s :RPC fifo inialized in cluster %x at cycle %d\n",184 printk("\n[%s] RPC fifo inialized in cluster %x at cycle %d\n", 184 185 __FUNCTION__ , local_cxy , hal_get_cycles() ); 185 186 #endif … … 212 213 cycle = (uint32_t)hal_get_cycles(); 213 214 if( DEBUG_CLUSTER_INIT < cycle ) 214 printk("\n[ DBG] %s : thread %x in process %xexit for cluster %x / cycle %d\n",215 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid , local_cxy, cycle );215 printk("\n[%s] thread[%x,%x] exit for cluster %x / cycle %d\n", 216 __FUNCTION__, this->process->pid, this->trdid, local_cxy, cycle ); 216 217 #endif 217 218 … … 430 431 431 432 #if DEBUG_CLUSTER_PID_ALLOC 432 uint32_t cycle = (uint32_t)hal_get_cycles(); 433 uint32_t cycle = (uint32_t)hal_get_cycles(); 434 thread_t * this = CURRENT_THREAD; 433 435 if( DEBUG_CLUSTER_PID_ALLOC < cycle ) 434 printk("\n[ DBG] %s : thread %xenters in cluster %x / cycle %d\n",435 __FUNCTION__ , CURRENT_THREAD, local_cxy , cycle );436 printk("\n[%s] thread[%x,%x] enters in cluster %x / cycle %d\n", 437 __FUNCTION__ , this->process->pid , this->trdid , local_cxy , cycle ); 436 438 #endif 437 439 … … 477 479 cycle = (uint32_t)hal_get_cycles(); 478 480 if( DEBUG_CLUSTER_PID_ALLOC < cycle ) 479 printk("\n[ DBG] %s : thread %x exit in cluster %x / pid%x / cycle %d\n",480 __FUNCTION__ , CURRENT_THREAD , local_cxy , *pid, cycle );481 printk("\n[%s] thread[%x,%x] exit in cluster %x / cycle %d\n", 482 __FUNCTION__ , this->process->pid , this->trdid , local_cxy , cycle ); 481 483 #endif 482 484 … … 488 490 489 491 #if DEBUG_CLUSTER_PID_RELEASE 490 uint32_t cycle = (uint32_t)hal_get_cycles(); 491 if( DEBUG_CLUSTER_PID_RELEASE < cycle ) 492 printk("\n[DBG] %s : thread %x enters in cluster %x / pid %x / cycle %d\n", 493 __FUNCTION__ , CURRENT_THREAD , local_cxy , pid , cycle ); 492 uint32_t cycle = (uint32_t)hal_get_cycles(); 493 thread_t * this = CURRENT_THREAD; 494 if( DEBUG_CLUSTER_PID_ALLOC < cycle ) 495 printk("\n[%s] thread[%x,%x] enters in cluster %x / pid %x / cycle %d\n", 496 __FUNCTION__ , this->process->pid , this->trdid , local_cxy , pid, cycle ); 494 497 #endif 495 498 … … 519 522 #if DEBUG_CLUSTER_PID_RELEASE 520 523 cycle = (uint32_t)hal_get_cycles(); 521 if( DEBUG_CLUSTER_PID_ RELEASE< cycle )522 printk("\n[ DBG] %s : thread %xexit in cluster %x / cycle %d\n",523 __FUNCTION__ , CURRENT_THREAD, local_cxy , cycle );524 if( DEBUG_CLUSTER_PID_ALLOC < cycle ) 525 printk("\n[%s] thread[%x,%x] exit in cluster %x / cycle %d\n", 526 __FUNCTION__ , this->process->pid , this->trdid , local_cxy , cycle ); 524 527 #endif 525 528 … … 599 602 600 603 #if DEBUG_CLUSTER_PROCESS_COPIES 601 uint32_t cycle = (uint32_t)hal_get_cycles(); 604 uint32_t cycle = (uint32_t)hal_get_cycles(); 605 thread_t * this = CURRENT_THREAD; 602 606 if( DEBUG_CLUSTER_PROCESS_COPIES < cycle ) 603 printk("\n[ DBG] %s enters / cluster %x /process %x / cycle %d\n",604 __FUNCTION__ , local_cxy , process, cycle );607 printk("\n[%s] thread[%x,%x] enters for process %x / cycle %d\n", 608 __FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle ); 605 609 #endif 606 610 … … 632 636 cycle = (uint32_t)hal_get_cycles(); 633 637 if( DEBUG_CLUSTER_PROCESS_COPIES < cycle ) 634 printk("\n[ DBG] %s exit / cluster %x /process %x / cycle %d\n",635 __FUNCTION__ , local_cxy , process, cycle );638 printk("\n[%s] thread[%x,%x] exit for process %x / cycle %d\n", 639 __FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle ); 636 640 #endif 637 641 … … 644 648 645 649 #if DEBUG_CLUSTER_PROCESS_COPIES 646 uint32_t cycle = (uint32_t)hal_get_cycles(); 650 uint32_t cycle = (uint32_t)hal_get_cycles(); 651 thread_t * this = CURRENT_THREAD; 647 652 if( DEBUG_CLUSTER_PROCESS_COPIES < cycle ) 648 printk("\n[ DBG] %s enters / cluster %x /process %x / cycle %d\n",649 __FUNCTION__ , local_cxy , process, cycle );653 printk("\n[%s] thread[%x,%x] enters for process %x / cycle %d\n", 654 __FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle ); 650 655 #endif 651 656 … … 674 679 cycle = (uint32_t)hal_get_cycles(); 675 680 if( DEBUG_CLUSTER_PROCESS_COPIES < cycle ) 676 printk("\n[ DBG] %s exit / cluster %x /process %x / cycle %d\n",677 __FUNCTION__ , local_cxy , process, cycle );681 printk("\n[%s] thread[%x,%x] exit for process %x / cycle %d\n", 682 __FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle ); 678 683 #endif 679 684 -
trunk/kernel/kern/process.c
r583 r593 123 123 uint32_t cycle = (uint32_t)hal_get_cycles(); 124 124 if( DEBUG_PROCESS_REFERENCE_INIT ) 125 printk("\n[ DBG] %s :thread %x in process %x enter to initalialize process %x / cycle %d\n",125 printk("\n[%s] thread %x in process %x enter to initalialize process %x / cycle %d\n", 126 126 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid , pid , cycle ); 127 127 #endif … … 142 142 cycle = (uint32_t)hal_get_cycles(); 143 143 if( DEBUG_PROCESS_REFERENCE_INIT ) 144 printk("\n[ DBG] %s :thread %x in process %x / vmm empty for process %x / cycle %d\n",144 printk("\n[%s] thread %x in process %x / vmm empty for process %x / cycle %d\n", 145 145 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid , pid, cycle ); 146 146 #endif … … 162 162 cycle = (uint32_t)hal_get_cycles(); 163 163 if( DEBUG_PROCESS_REFERENCE_INIT ) 164 printk("\n[ DBG] %s :thread %x in process %x / process %x attached to TXT%d / cycle %d\n",164 printk("\n[%s] thread %x in process %x / process %x attached to TXT%d / cycle %d\n", 165 165 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid, txt_id, cycle ); 166 166 #endif … … 183 183 cycle = (uint32_t)hal_get_cycles(); 184 184 if( DEBUG_PROCESS_REFERENCE_INIT ) 185 printk("\n[ DBG] %s :thread %x in process %x / stdin open for process %x / cycle %d\n",185 printk("\n[%s] thread %x in process %x / stdin open for process %x / cycle %d\n", 186 186 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid, cycle ); 187 187 #endif … … 201 201 cycle = (uint32_t)hal_get_cycles(); 202 202 if( DEBUG_PROCESS_REFERENCE_INIT ) 203 printk("\n[ DBG] %s :thread %x in process %x / stdout open for process %x / cycle %d\n",203 printk("\n[%s] thread %x in process %x / stdout open for process %x / cycle %d\n", 204 204 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid, cycle ); 205 205 #endif … … 219 219 cycle = (uint32_t)hal_get_cycles(); 220 220 if( DEBUG_PROCESS_REFERENCE_INIT ) 221 printk("\n[ DBG] %s :thread %x in process %x / stderr open for process %x / cycle %d\n",221 printk("\n[%s] thread %x in process %x / stderr open for process %x / cycle %d\n", 222 222 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid, cycle ); 223 223 #endif … … 260 260 cycle = (uint32_t)hal_get_cycles(); 261 261 if( DEBUG_PROCESS_REFERENCE_INIT ) 262 printk("\n[ DBG] %s :thread %x in process %x / set fd_array for process %x / cycle %d\n",262 printk("\n[%s] thread %x in process %x / set fd_array for process %x / cycle %d\n", 263 263 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid , cycle ); 264 264 #endif … … 301 301 cycle = (uint32_t)hal_get_cycles(); 302 302 if( DEBUG_PROCESS_REFERENCE_INIT ) 303 printk("\n[ DBG] %s :thread %x in process %x exit for process %x / cycle %d\n",303 printk("\n[%s] thread %x in process %x exit for process %x / cycle %d\n", 304 304 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid, cycle ); 305 305 #endif … … 328 328 uint32_t cycle = (uint32_t)hal_get_cycles(); 329 329 if( DEBUG_PROCESS_COPY_INIT ) 330 printk("\n[ DBG] %s :thread %x in process %x enter for process %x / cycle %d\n",330 printk("\n[%s] thread %x in process %x enter for process %x / cycle %d\n", 331 331 __FUNCTION__, this->trdid, this->process->pid, local_process->pid, cycle ); 332 332 #endif … … 383 383 cycle = (uint32_t)hal_get_cycles(); 384 384 if( DEBUG_PROCESS_COPY_INIT ) 385 printk("\n[ DBG] %s :thread %x in process %x exit for process %x / cycle %d\n",385 printk("\n[%s] thread %x in process %x exit for process %x / cycle %d\n", 386 386 __FUNCTION__, this->trdid, this->process->pid, local_process->pid, cycle ); 387 387 #endif … … 402 402 pid_t pid = process->pid; 403 403 404 assert( (process->th_nr == 0) , 405 "process %x in cluster %x has still activethreads", pid , local_cxy );404 // check no more threads 405 assert( (process->th_nr == 0) , "process %x in cluster %x contains threads", pid , local_cxy ); 406 406 407 407 #if DEBUG_PROCESS_DESTROY 408 408 uint32_t cycle = (uint32_t)hal_get_cycles(); 409 409 if( DEBUG_PROCESS_DESTROY ) 410 printk("\n[ DBG] %s :thread %x in process %x enter for process %x in cluster %x / cycle %d\n",410 printk("\n[%s] thread %x in process %x enter for process %x in cluster %x / cycle %d\n", 411 411 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, pid, local_cxy, cycle ); 412 412 #endif … … 457 457 cycle = (uint32_t)hal_get_cycles(); 458 458 if( DEBUG_PROCESS_DESTROY ) 459 printk("\n[ DBG] %s :thread %x in process %x exit / process %x in cluster %x / cycle %d\n",459 printk("\n[%s] thread %x in process %x exit / process %x in cluster %x / cycle %d\n", 460 460 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, pid, local_cxy, cycle ); 461 461 #endif … … 506 506 uint32_t cycle = (uint32_t)hal_get_cycles(); 507 507 if( DEBUG_PROCESS_SIGACTION < cycle ) 508 printk("\n[ DBG] %s :thread[%x,%x] enter to %s process %x / cycle %d\n",508 printk("\n[%s] thread[%x,%x] enter to %s process %x / cycle %d\n", 509 509 __FUNCTION__ , client->process->pid, client->trdid, 510 510 process_action_str( type ) , pid , cycle ); … … 518 518 lpid = LPID_FROM_PID( pid ); 519 519 520 // get root of list of copies , lock, and number of copiesfrom owner cluster520 // get root of list of copies and lock from owner cluster 521 521 root_xp = XPTR( owner_cxy , &cluster->pmgr.copies_root[lpid] ); 522 522 lock_xp = XPTR( owner_cxy , &cluster->pmgr.copies_lock[lpid] ); … … 527 527 (type == UNBLOCK_ALL_THREADS )), "illegal action type" ); 528 528 529 // Th eclient thread send parallel RPCs to all remote clusters containing529 // This client thread send parallel RPCs to all remote clusters containing 530 530 // target process copies, wait all responses, and then handles directly 531 531 // the threads in local cluster, when required. … … 561 561 process_ptr = GET_PTR( process_xp ); 562 562 563 if( process_cxy == local_cxy ) // process is local 563 // printk("\n@@@ in %s : process_cxy %x / process_ptr %x / pid %x\n", 564 // __FUNCTION__, process_cxy, process_ptr, hal_remote_l32( XPTR( process_cxy , &process_ptr->pid ) ) ); 565 566 if( process_cxy == local_cxy ) // process copy is local 564 567 { 565 568 local = process_ptr; 566 569 } 567 else // process is remote570 else // process copy is remote 568 571 { 569 572 // update number of remote process copies … … 575 578 #if DEBUG_PROCESS_SIGACTION 576 579 if( DEBUG_PROCESS_SIGACTION < cycle ) 577 printk("\n[ DBG] %s :thread[%x,%x] send RPC to cluster %x for process %x\n",580 printk("\n[%s] thread[%x,%x] send RPC to cluster %x for process %x\n", 578 581 __FUNCTION__, client->process->pid, client->trdid, process_cxy, pid ); 579 582 #endif … … 607 610 #if DEBUG_PROCESS_SIGACTION 608 611 if( DEBUG_PROCESS_SIGACTION < cycle ) 609 printk("\n[ DBG] %s :thread[%x,%x] handles local process %x in cluster %x\n",612 printk("\n[%s] thread[%x,%x] handles local process %x in cluster %x\n", 610 613 __FUNCTION__, client->process->pid, client->trdid, pid , local_cxy ); 611 614 #endif … … 618 621 cycle = (uint32_t)hal_get_cycles(); 619 622 if( DEBUG_PROCESS_SIGACTION < cycle ) 620 printk("\n[ DBG] %s :thread[%x,%x] exit after %s process %x / cycle %d\n",623 printk("\n[%s] thread[%x,%x] exit after %s process %x / cycle %d\n", 621 624 __FUNCTION__, client->process->pid, client->trdid, 622 625 process_action_str( type ), pid, cycle ); … … 633 636 cxy_t owner_cxy; // target process owner cluster 634 637 uint32_t count; // requests counter 635 volatile uint32_t ack_count; // scheduler acknowledgecounter638 volatile uint32_t ack_count; // acknowledges counter 636 639 637 640 // get calling thread pointer … … 642 645 uint32_t cycle = (uint32_t)hal_get_cycles(); 643 646 if( DEBUG_PROCESS_SIGACTION < cycle ) 644 printk("\n[ DBG] %s :thread[%x,%x] enter for process %x in cluster %x / cycle %d\n",647 printk("\n[%s] thread[%x,%x] enter for process %x in cluster %x / cycle %d\n", 645 648 __FUNCTION__, this->process->pid, this->trdid, pid, local_cxy , cycle ); 646 649 #endif … … 657 660 // loop on target process local threads 658 661 // we use both "ltid" and "count" because it can exist "holes" in th_tbl 662 // - if the calling thread and the target thread are not running on the same 663 // core, we ask the target scheduler to acknowlege the blocking 664 // to be sure that the target thread is not running. 665 // - if the calling thread and the target thread are running on the same core, 666 // we don't need confirmation from scheduler. 667 659 668 for( ltid = 0 , count = 0 , ack_count = 0 ; count < process->th_nr ; ltid++ ) 660 669 { … … 668 677 thread_block( XPTR( local_cxy , target ) , THREAD_BLOCKED_GLOBAL ); 669 678 670 // - if the calling thread and the target thread are running on the same core,671 // we don't need confirmation from scheduler,672 // - if the calling thread and the target thread are not running on the same673 // core, we ask the target scheduler to acknowlege the blocking674 // to be sure that the target thread is not running.675 676 679 if( this->core->lid != target->core->lid ) 677 680 { … … 691 694 rwlock_rd_release( &process->th_lock ); 692 695 693 // busy waiting acknowledges 694 // TODO this could be improved... 696 // wait other threads acknowledges TODO this could be improved... 695 697 while( 1 ) 696 698 { … … 705 707 cycle = (uint32_t)hal_get_cycles(); 706 708 if( DEBUG_PROCESS_SIGACTION < cycle ) 707 printk("\n[ DBG] %s :thread[%x,%x] exit for process %x in cluster %x / cycle %d\n",708 __FUNCTION__, this , this->process->pid, pid, local_cxy , cycle );709 printk("\n[%s] thread[%x,%x] exit for process %x in cluster %x / cycle %d\n", 710 __FUNCTION__, this->process->pid, this->trdid, pid, local_cxy , cycle ); 709 711 #endif 710 712 … … 729 731 730 732 #if DEBUG_PROCESS_SIGACTION 731 pid_t pid = process->pid;732 733 uint32_t cycle = (uint32_t)hal_get_cycles(); 733 734 if( DEBUG_PROCESS_SIGACTION < cycle ) 734 printk("\n[ DBG] %s :thread[%x,%x] enter in cluster %x for process %x / cycle %d\n",735 printk("\n[%s] thread[%x,%x] enter in cluster %x for process %x / cycle %d\n", 735 736 __FUNCTION__, this->process->pid, this->trdid, local_cxy, process->pid, cycle ); 736 737 #endif 737 738 738 739 // check target process is an user process 739 assert( ( LPID_FROM_PID( process->pid ) != 0 ), 740 "target process must be an user process" ); 740 assert( (LPID_FROM_PID( process->pid ) != 0), "process %x not an user process", process->pid ); 741 741 742 742 // get lock protecting process th_tbl[] … … 770 770 cycle = (uint32_t)hal_get_cycles(); 771 771 if( DEBUG_PROCESS_SIGACTION < cycle ) 772 printk("\n[ DBG] %s :thread[%x,%x] exit for process %x in cluster %x / cycle %d\n",773 __FUNCTION__, this->process->pid, this->trdid, p id, local_cxy , cycle );772 printk("\n[%s] thread[%x,%x] exit for process %x in cluster %x / cycle %d\n", 773 __FUNCTION__, this->process->pid, this->trdid, process->pid, local_cxy , cycle ); 774 774 #endif 775 775 … … 791 791 uint32_t cycle = (uint32_t)hal_get_cycles(); 792 792 if( DEBUG_PROCESS_SIGACTION < cycle ) 793 printk("\n[ DBG] %s :thread[%x,%x] enter for process %x in cluster %x / cycle %d\n",793 printk("\n[%s] thread[%x,%x] enter for process %x in cluster %x / cycle %d\n", 794 794 __FUNCTION__, this->process->pid, this->trdid, pid, local_cxy , cycle ); 795 795 #endif … … 823 823 cycle = (uint32_t)hal_get_cycles(); 824 824 if( DEBUG_PROCESS_SIGACTION < cycle ) 825 printk("\n[ DBG] %s :thread[%x,%x] exit for process %x in cluster %x / cycle %d\n",825 printk("\n[%s] thread[%x,%x] exit for process %x in cluster %x / cycle %d\n", 826 826 __FUNCTION__, this->process->pid, this->trdid, pid, local_cxy, cycle ); 827 827 #endif … … 842 842 uint32_t cycle = (uint32_t)hal_get_cycles(); 843 843 if( DEBUG_PROCESS_GET_LOCAL_COPY < cycle ) 844 printk("\n[ DBG] %s :thread[%x,%x] enter for process %x in cluster %x / cycle %d\n",844 printk("\n[%s] thread[%x,%x] enter for process %x in cluster %x / cycle %d\n", 845 845 __FUNCTION__, this->process->pid, this->trdid, pid, local_cxy, cycle ); 846 846 #endif … … 889 889 cycle = (uint32_t)hal_get_cycles(); 890 890 if( DEBUG_PROCESS_GET_LOCAL_COPY < cycle ) 891 printk("\n[ DBG] %s :thread[%x,%x] exit in cluster %x / process %x / cycle %d\n",891 printk("\n[%s] thread[%x,%x] exit in cluster %x / process %x / cycle %d\n", 892 892 __FUNCTION__, this->process->pid, this->trdid, local_cxy, process_ptr, cycle ); 893 893 #endif … … 1205 1205 pid_t pid = this->process->pid; 1206 1206 if( DEBUG_PROCESS_MAKE_FORK < cycle ) 1207 printk("\n[ DBG] %s :thread[%x,%x] enter / cluster %x / cycle %d\n",1207 printk("\n[%s] thread[%x,%x] enter / cluster %x / cycle %d\n", 1208 1208 __FUNCTION__, pid, trdid, local_cxy, cycle ); 1209 1209 #endif … … 1231 1231 cycle = (uint32_t)hal_get_cycles(); 1232 1232 if( DEBUG_PROCESS_MAKE_FORK < cycle ) 1233 printk("\n[ DBG] %s :thread[%x,%x] allocated process %x / cycle %d\n",1233 printk("\n[%s] thread[%x,%x] allocated process %x / cycle %d\n", 1234 1234 __FUNCTION__, pid, trdid, new_pid, cycle ); 1235 1235 #endif … … 1243 1243 cycle = (uint32_t)hal_get_cycles(); 1244 1244 if( DEBUG_PROCESS_MAKE_FORK < cycle ) 1245 printk("\n[ DBG] %s :thread[%x,%x] initialized child_process %x / cycle %d\n",1245 printk("\n[%s] thread[%x,%x] initialized child_process %x / cycle %d\n", 1246 1246 __FUNCTION__, pid, trdid, new_pid, cycle ); 1247 1247 #endif … … 1263 1263 cycle = (uint32_t)hal_get_cycles(); 1264 1264 if( DEBUG_PROCESS_MAKE_FORK < cycle ) 1265 printk("\n[ DBG] %s :thread[%x,%x] copied VMM from parent to child / cycle %d\n",1265 printk("\n[%s] thread[%x,%x] copied VMM from parent to child / cycle %d\n", 1266 1266 __FUNCTION__, pid, trdid, cycle ); 1267 1267 #endif … … 1276 1276 cycle = (uint32_t)hal_get_cycles(); 1277 1277 if( DEBUG_PROCESS_MAKE_EXEC < cycle ) 1278 printk("\n[ DBG] %s :thread[%x,%x] / child takes TXT ownership / cycle %d\n",1278 printk("\n[%s] thread[%x,%x] / child takes TXT ownership / cycle %d\n", 1279 1279 __FUNCTION__ , pid, trdid, cycle ); 1280 1280 #endif … … 1305 1305 cycle = (uint32_t)hal_get_cycles(); 1306 1306 if( DEBUG_PROCESS_MAKE_FORK < cycle ) 1307 printk("\n[ DBG] %s :thread[%x,%x] created main thread %x / cycle %d\n",1307 printk("\n[%s] thread[%x,%x] created main thread %x / cycle %d\n", 1308 1308 __FUNCTION__, pid, trdid, thread, cycle ); 1309 1309 #endif … … 1327 1327 cycle = (uint32_t)hal_get_cycles(); 1328 1328 if( DEBUG_PROCESS_MAKE_FORK < cycle ) 1329 printk("\n[ DBG] %s :thread[%x,%x] set COW in parent and child / cycle %d\n",1329 printk("\n[%s] thread[%x,%x] set COW in parent and child / cycle %d\n", 1330 1330 __FUNCTION__, pid, trdid, cycle ); 1331 1331 #endif … … 1349 1349 cycle = (uint32_t)hal_get_cycles(); 1350 1350 if( DEBUG_PROCESS_MAKE_FORK < cycle ) 1351 printk("\n[ DBG] %s :thread[%x,%x] exit / created process %x / cycle %d\n",1351 printk("\n[%s] thread[%x,%x] exit / created process %x / cycle %d\n", 1352 1352 __FUNCTION__, pid, trdid, new_pid, cycle ); 1353 1353 #endif … … 1383 1383 uint32_t cycle = (uint32_t)hal_get_cycles(); 1384 1384 if( DEBUG_PROCESS_MAKE_EXEC < cycle ) 1385 printk("\n[ DBG] %s :thread[%x,%x] enters for %s / cycle %d\n",1385 printk("\n[%s] thread[%x,%x] enters for %s / cycle %d\n", 1386 1386 __FUNCTION__, pid, thread->trdid, path, cycle ); 1387 1387 #endif … … 1405 1405 cycle = (uint32_t)hal_get_cycles(); 1406 1406 if( DEBUG_PROCESS_MAKE_EXEC < cycle ) 1407 printk("\n[ DBG] %s :thread[%x,%x] opened file <%s> / cycle %d\n",1407 printk("\n[%s] thread[%x,%x] opened file <%s> / cycle %d\n", 1408 1408 __FUNCTION__, pid, thread->trdid, path, cycle ); 1409 1409 #endif … … 1415 1415 cycle = (uint32_t)hal_get_cycles(); 1416 1416 if( DEBUG_PROCESS_MAKE_EXEC < cycle ) 1417 printk("\n[ DBG] %s :thread[%x,%x] deleted all threads / cycle %d\n",1417 printk("\n[%s] thread[%x,%x] deleted all threads / cycle %d\n", 1418 1418 __FUNCTION__, pid, thread->trdid, cycle ); 1419 1419 #endif … … 1425 1425 cycle = (uint32_t)hal_get_cycles(); 1426 1426 if( DEBUG_PROCESS_MAKE_EXEC < cycle ) 1427 printk("\n[ DBG] %s :thread[%x,%x] reset VMM / cycle %d\n",1427 printk("\n[%s] thread[%x,%x] reset VMM / cycle %d\n", 1428 1428 __FUNCTION__, pid, thread->trdid, cycle ); 1429 1429 #endif … … 1442 1442 cycle = (uint32_t)hal_get_cycles(); 1443 1443 if( DEBUG_PROCESS_MAKE_EXEC < cycle ) 1444 printk("\n[ DBG] %s :thread[%x,%x] / kentry/args/envs vsegs registered / cycle %d\n",1444 printk("\n[%s] thread[%x,%x] / kentry/args/envs vsegs registered / cycle %d\n", 1445 1445 __FUNCTION__, pid, thread->trdid, cycle ); 1446 1446 #endif … … 1460 1460 cycle = (uint32_t)hal_get_cycles(); 1461 1461 if( DEBUG_PROCESS_MAKE_EXEC < cycle ) 1462 printk("\n[ DBG] %s :thread[%x,%x] / code/data vsegs registered / cycle %d\n",1462 printk("\n[%s] thread[%x,%x] / code/data vsegs registered / cycle %d\n", 1463 1463 __FUNCTION__, pid, thread->trdid, cycle ); 1464 1464 #endif … … 1492 1492 uint32_t cycle = (uint32_t)hal_get_cycles(); 1493 1493 if( DEBUG_PROCESS_ZERO_CREATE < cycle ) 1494 printk("\n[ DBG] %s :enter / cluster %x / cycle %d\n",1494 printk("\n[%s] enter / cluster %x / cycle %d\n", 1495 1495 __FUNCTION__, local_cxy, cycle ); 1496 1496 #endif … … 1539 1539 cycle = (uint32_t)hal_get_cycles(); 1540 1540 if( DEBUG_PROCESS_ZERO_CREATE < cycle ) 1541 printk("\n[ DBG] %s :exit / cluster %x / cycle %d\n",1541 printk("\n[%s] exit / cluster %x / cycle %d\n", 1542 1542 __FUNCTION__, local_cxy, cycle ); 1543 1543 #endif … … 1560 1560 uint32_t cycle = (uint32_t)hal_get_cycles(); 1561 1561 if( DEBUG_PROCESS_INIT_CREATE < cycle ) 1562 printk("\n[ DBG] %s :thread %x in process %x enter / cycle %d\n",1562 printk("\n[%s] thread %x in process %x enter / cycle %d\n", 1563 1563 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, cycle ); 1564 1564 #endif … … 1589 1589 #if(DEBUG_PROCESS_INIT_CREATE & 1) 1590 1590 if( DEBUG_PROCESS_INIT_CREATE < cycle ) 1591 printk("\n[ DBG] %s :thread %x in process %x initialized process descriptor\n",1591 printk("\n[%s] thread %x in process %x initialized process descriptor\n", 1592 1592 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid ); 1593 1593 #endif … … 1608 1608 #if(DEBUG_PROCESS_INIT_CREATE & 1) 1609 1609 if( DEBUG_PROCESS_INIT_CREATE < cycle ) 1610 printk("\n[ DBG] %s :thread %x in process %x open .elf file decriptor\n",1610 printk("\n[%s] thread %x in process %x open .elf file decriptor\n", 1611 1611 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid ); 1612 1612 #endif … … 1621 1621 #if(DEBUG_PROCESS_INIT_CREATE & 1) 1622 1622 if( DEBUG_PROCESS_INIT_CREATE < cycle ) 1623 printk("\n[ DBG] %s :thread %x in process %x registered code/data vsegs in VMM\n",1623 printk("\n[%s] thread %x in process %x registered code/data vsegs in VMM\n", 1624 1624 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid ); 1625 1625 #endif … … 1641 1641 #if(DEBUG_PROCESS_INIT_CREATE & 1) 1642 1642 if( DEBUG_PROCESS_INIT_CREATE < cycle ) 1643 printk("\n[ DBG] %s :thread %x in process %x registered init process in parent\n",1643 printk("\n[%s] thread %x in process %x registered init process in parent\n", 1644 1644 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid ); 1645 1645 #endif … … 1668 1668 #if(DEBUG_PROCESS_INIT_CREATE & 1) 1669 1669 if( DEBUG_PROCESS_INIT_CREATE < cycle ) 1670 printk("\n[ DBG] %s :thread %x in process %x created main thread\n",1670 printk("\n[%s] thread %x in process %x created main thread\n", 1671 1671 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid ); 1672 1672 #endif … … 1680 1680 cycle = (uint32_t)hal_get_cycles(); 1681 1681 if( DEBUG_PROCESS_INIT_CREATE < cycle ) 1682 printk("\n[ DBG] %s :thread %x in process %x exit / cycle %d\n",1682 printk("\n[%s] thread %x in process %x exit / cycle %d\n", 1683 1683 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, cycle ); 1684 1684 #endif … … 1867 1867 uint32_t cycle = (uint32_t)hal_get_cycles(); 1868 1868 if( DEBUG_PROCESS_TXT < cycle ) 1869 printk("\n[ DBG] %s :thread %x in process %x attached process %x to TXT %d / cycle %d\n",1869 printk("\n[%s] thread %x in process %x attached process %x to TXT %d / cycle %d\n", 1870 1870 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, 1871 1871 process->pid, txt_id , cycle ); … … 1922 1922 uint32_t txt_id = hal_remote_l32( XPTR( chdev_cxy , &chdev_ptr->channel ) ); 1923 1923 if( DEBUG_PROCESS_TXT < cycle ) 1924 printk("\n[ DBG] %s :thread %x in process %x detached process %x from TXT %d / cycle %d\n",1924 printk("\n[%s] thread %x in process %x detached process %x from TXT %d / cycle %d\n", 1925 1925 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, 1926 1926 process_pid, txt_id, cycle ); … … 1964 1964 uint32_t txt_id = hal_remote_l32( XPTR( txt_cxy , &txt_ptr->channel ) ); 1965 1965 if( DEBUG_PROCESS_TXT < cycle ) 1966 printk("\n[ DBG] %s :thread %x in process %x give TXT %d to process %x / cycle %d\n",1966 printk("\n[%s] thread %x in process %x give TXT %d to process %x / cycle %d\n", 1967 1967 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, txt_id, process_pid, cycle ); 1968 1968 #endif … … 2045 2045 uint32_t ksh_pid = hal_remote_l32( XPTR( current_cxy , ¤t_ptr->pid ) ); 2046 2046 if( DEBUG_PROCESS_TXT < cycle ) 2047 printk("\n[ DBG] %s :thread %x in process %x release TXT %d to KSH %x / cycle %d\n",2047 printk("\n[%s] thread %x in process %x release TXT %d to KSH %x / cycle %d\n", 2048 2048 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, txt_id, ksh_pid, cycle ); 2049 2049 process_txt_display( txt_id ); … … 2082 2082 uint32_t new_pid = hal_remote_l32( XPTR( current_cxy , ¤t_ptr->pid ) ); 2083 2083 if( DEBUG_PROCESS_TXT < cycle ) 2084 printk("\n[ DBG] %s :thread %x in process %x release TXT %d to process %x / cycle %d\n",2084 printk("\n[%s] thread %x in process %x release TXT %d to process %x / cycle %d\n", 2085 2085 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, txt_id, new_pid, cycle ); 2086 2086 process_txt_display( txt_id ); … … 2099 2099 cycle = (uint32_t)hal_get_cycles(); 2100 2100 if( DEBUG_PROCESS_TXT < cycle ) 2101 printk("\n[ DBG] %s :thread %x in process %x release TXT %d to nobody / cycle %d\n",2101 printk("\n[%s] thread %x in process %x release TXT %d to nobody / cycle %d\n", 2102 2102 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, txt_id, cycle ); 2103 2103 process_txt_display( txt_id ); … … 2112 2112 cycle = (uint32_t)hal_get_cycles(); 2113 2113 if( DEBUG_PROCESS_TXT < cycle ) 2114 printk("\n[ DBG] %s :thread %x in process %d does nothing (not TXT owner) / cycle %d\n",2114 printk("\n[%s] thread %x in process %d does nothing (not TXT owner) / cycle %d\n", 2115 2115 __FUNCTION__, CURRENT_THREAD->trdid, process_pid, cycle ); 2116 2116 process_txt_display( txt_id ); -
trunk/kernel/kern/process.h
r583 r593 289 289 * all threads of a process identified by the <pid> argument, depending on the 290 290 * <action_type> argument. 291 * WARNING : the DELETE and BLOCK actions are NOT executed on the target process main thread 292 * (thread 0 in process owner cluster), and not executed on the calling thread itself. 291 * 293 292 * It uses the multicast, non blocking rpc_process_sigaction_client() function to send 294 293 * parallel requests to all remote clusters containing process copies. … … 298 297 * It is also used by the process_make_exec() function to handle the "exec" syscall. 299 298 * It is also called by the TXT device ISR to execute the ctrl C & ctrl Z commands. 299 * 300 * WARNING (1) the DELETE action is NOT executed on the target process main thread 301 * (thread 0 in process owner cluster), and not executed on the client thread itself. 302 * 303 * WARNING (2) the BLOCK action is executed on all target process threads, and this function 304 * returns only when all threads BUT the client thread are actually blocked and not running. 305 * When the client thread is also a target thread, it is blocked but not descheduled. 306 * 307 * WARNING (3) the UNBLOCK action is executed on all target process threads, as the 308 * client thread cannot be a target thread. 300 309 * 301 310 * Implementation note: … … 328 337 * It scan the list of local thread, and sets the THREAD_BLOCKED_GLOBAL bit for all threads. 329 338 * It request the relevant schedulers to acknowledge the blocking, using IPI if required, 330 * and returns only when all threads in cluster are actually blocked.339 * and returns only when all threads in cluster, but the calling thread, are actually blocked. 331 340 * The threads are not detached from the scheduler, and not detached from the local process. 332 341 ********************************************************************************************* -
trunk/kernel/kern/scheduler.c
r592 r593 179 179 sched = &core->scheduler; 180 180 181 // take the lock protecting sheduler state 182 busylock_acquire( &sched->lock ); 183 184 ////// scan user threads to handle both ACK and DELETE requests 181 /////////////// scan user threads to handle both ACK and DELETE requests 185 182 root = &sched->u_root; 186 183 iter = root->next; … … 215 212 // get thread ltid 216 213 ltid = LTID_FROM_TRDID( thread->trdid); 214 215 // take the lock protecting sheduler state 216 busylock_acquire( &sched->lock ); 217 217 218 218 // update scheduler state … … 236 236 } 237 237 238 // release the lock protecting sheduler state 239 busylock_release( &sched->lock ); 240 238 241 // check th_nr value 239 242 assert( (process->th_nr > 0) , "process th_nr cannot be 0\n" ); … … 241 244 // remove thread from process th_tbl[] 242 245 process->th_tbl[ltid] = NULL; 243 hal_atomic_add( &process->th_nr , - 1 );246 count = hal_atomic_add( &process->th_nr , - 1 ); 244 247 245 248 // release memory allocated for thread descriptor 246 249 thread_destroy( thread ); 250 251 hal_fence(); 247 252 248 253 #if DEBUG_SCHED_HANDLE_SIGNALS … … 288 293 // get thread ltid 289 294 ltid = LTID_FROM_TRDID( thread->trdid); 295 296 // take the lock protecting sheduler state 297 busylock_acquire( &sched->lock ); 290 298 291 299 // update scheduler state … … 309 317 } 310 318 319 // release the lock protecting sheduler state 320 busylock_release( &sched->lock ); 321 311 322 // get number of threads in local kernel process 312 323 count = process_zero.th_nr; … … 330 341 } 331 342 } 332 333 // release the lock protecting sheduler state334 busylock_release( &sched->lock );335 336 343 } // end sched_handle_signals() 337 344 -
trunk/kernel/kern/thread.c
r583 r593 124 124 // It updates the local DQDT. 125 125 ///////////////////////////////////////////////////////////////////////////////////// 126 // @ thread : pointer on thread descriptor127 // @ process : pointer on process descriptor.126 // @ thread : pointer on local thread descriptor 127 // @ process : pointer on local process descriptor. 128 128 // @ type : thread type. 129 129 // @ func : pointer on thread entry function. … … 148 148 149 149 #if DEBUG_THREAD_INIT 150 uint32_t cycle = (uint32_t)hal_get_cycles(); 150 uint32_t cycle = (uint32_t)hal_get_cycles(); 151 thread_t * this = CURRENT_THREAD; 151 152 if( DEBUG_THREAD_INIT < cycle ) 152 printk("\n[DBG] %s : thread %x in process %x enter fot thread %x in process %x / cycle %d\n", 153 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, 154 thread, process->pid , cycle ); 153 printk("\n[%s] thread[%x,%x] enter for thread %x in process %x / cycle %d\n", 154 __FUNCTION__, this->process->pid, this->trdid, thread, process->pid , cycle ); 155 155 #endif 156 156 … … 229 229 cycle = (uint32_t)hal_get_cycles(); 230 230 if( DEBUG_THREAD_INIT < cycle ) 231 printk("\n[DBG] %s : thread %x in process %x exit for thread %x in process %x / cycle %d\n", 232 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, 233 thread, process->pid , cycle ); 231 printk("\n[%s] thread[%x,%x] exit for thread %x in process %x / cycle %d\n", 232 __FUNCTION__, this->process->pid, this->trdid, thread, process->pid, cycle ); 234 233 #endif 235 234 … … 251 250 vseg_t * vseg; // stack vseg 252 251 253 252 assert( (attr != NULL) , "pthread attributes must be defined" ); 254 253 255 254 #if DEBUG_THREAD_USER_CREATE 256 uint32_t cycle = (uint32_t)hal_get_cycles(); 255 thread_t * this = CURRENT_THREAD; 256 uint32_t cycle = (uint32_t)hal_get_cycles(); 257 257 if( DEBUG_THREAD_USER_CREATE < cycle ) 258 printk("\n[ DBG] %s : thread %x in process %x enter in cluster%x / cycle %d\n",259 __FUNCTION__, CURRENT_THREAD->trdid, pid , local_cxy, cycle );258 printk("\n[%s] thread[%x,%x] enter in cluster %x for process %x / cycle %d\n", 259 __FUNCTION__, this->process->pid , this->trdid , local_cxy , pid , cycle ); 260 260 #endif 261 261 … … 272 272 #if( DEBUG_THREAD_USER_CREATE & 1) 273 273 if( DEBUG_THREAD_USER_CREATE < cycle ) 274 printk("\n[ DBG] %s :process descriptor = %x for process %x in cluster %x\n",274 printk("\n[%s] process descriptor = %x for process %x in cluster %x\n", 275 275 __FUNCTION__, process , pid , local_cxy ); 276 276 #endif … … 294 294 #if( DEBUG_THREAD_USER_CREATE & 1) 295 295 if( DEBUG_THREAD_USER_CREATE < cycle ) 296 printk("\n[ DBG] %s :core[%x,%d] selected\n",296 printk("\n[%s] core[%x,%d] selected\n", 297 297 __FUNCTION__, local_cxy , core_lid ); 298 298 #endif … … 316 316 #if( DEBUG_THREAD_USER_CREATE & 1) 317 317 if( DEBUG_THREAD_USER_CREATE < cycle ) 318 printk("\n[ DBG] %s :stack vseg created / vpn_base %x / %d pages\n",318 printk("\n[%s] stack vseg created / vpn_base %x / %d pages\n", 319 319 __FUNCTION__, vseg->vpn_base, vseg->vpn_size ); 320 320 #endif … … 332 332 #if( DEBUG_THREAD_USER_CREATE & 1) 333 333 if( DEBUG_THREAD_USER_CREATE < cycle ) 334 printk("\n[ DBG] %s :new thread descriptor %x allocated\n",334 printk("\n[%s] new thread descriptor %x allocated\n", 335 335 __FUNCTION__, thread ); 336 336 #endif … … 355 355 #if( DEBUG_THREAD_USER_CREATE & 1) 356 356 if( DEBUG_THREAD_USER_CREATE < cycle ) 357 printk("\n[ DBG] %s :new thread descriptor initialised / trdid %x\n",357 printk("\n[%s] new thread descriptor initialised / trdid %x\n", 358 358 __FUNCTION__, thread->trdid ); 359 359 #endif … … 387 387 #if( DEBUG_THREAD_USER_CREATE & 1) 388 388 if( DEBUG_THREAD_USER_CREATE < cycle ) 389 printk("\n[ DBG] %s :CPU & FPU contexts created\n",389 printk("\n[%s] CPU & FPU contexts created\n", 390 390 __FUNCTION__, thread->trdid ); 391 391 vmm_display( process , true ); … … 395 395 cycle = (uint32_t)hal_get_cycles(); 396 396 if( DEBUG_THREAD_USER_CREATE < cycle ) 397 printk("\n[ DBG] %s : thread %x in process %xexit / new_thread %x / core %d / cycle %d\n",398 __FUNCTION__, CURRENT_THREAD->trdid , pid, thread->trdid, core_lid, cycle );397 printk("\n[%s] thread[%x,%x] exit / new_thread %x / core %d / cycle %d\n", 398 __FUNCTION__, this->process->pid , this->trdid , thread->trdid, core_lid, cycle ); 399 399 #endif 400 400 … … 430 430 431 431 #if DEBUG_THREAD_USER_FORK 432 uint32_t cycle = (uint32_t)hal_get_cycles(); 432 uint32_t cycle = (uint32_t)hal_get_cycles(); 433 thread_t * this = CURRENT_THREAD; 433 434 if( DEBUG_THREAD_USER_FORK < cycle ) 434 printk("\n[ DBG] %s : thread %x in process %xenter / child_process %x / cycle %d\n",435 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, child_process->pid, cycle );435 printk("\n[%s] thread[%x,%x] enter / child_process %x / cycle %d\n", 436 __FUNCTION__, this->process->pid, this->trdid, child_process->pid, cycle ); 436 437 #endif 437 438 … … 487 488 #if (DEBUG_THREAD_USER_FORK & 1) 488 489 if( DEBUG_THREAD_USER_FORK < cycle ) 489 printk("\n[DBG] %s : thread %x in process %x / initialised thread %x in process %x\n", 490 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, 491 child_ptr->trdid, child_process->pid ); 490 printk("\n[%s] thread[%x,%x] initialised thread %x in process %x\n", 491 __FUNCTION__, this->process->pid, this->trdid, child_ptr->trdid, child_process->pid ); 492 492 #endif 493 493 … … 522 522 #if (DEBUG_THREAD_USER_FORK & 1) 523 523 if( DEBUG_THREAD_USER_FORK < cycle ) 524 printk("\n[ DBG] %s : thread %x in process %x / created CPU & FPU contexts\n",525 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );524 printk("\n[%s] thread[%x,%x] created CPU & FPU contexts for thread %x in process %x\n", 525 __FUNCTION__, this->process->pid, this->trdid, child_ptr->trdid, child_process->pid ); 526 526 #endif 527 527 … … 542 542 #if (DEBUG_THREAD_USER_FORK & 1) 543 543 if( DEBUG_THREAD_USER_FORK < cycle ) 544 printk("\n[ DBG] %s : thread %x in process %x / created stack vseg\n",545 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );544 printk("\n[%s] thread[%x,%x] created stack vseg for thread %x in process %x\n", 545 __FUNCTION__, this->process->pid, this->trdid, child_ptr->trdid, child_process->pid ); 546 546 #endif 547 547 … … 591 591 cycle = (uint32_t)hal_get_cycles(); 592 592 if( DEBUG_THREAD_USER_FORK < cycle ) 593 printk("\n[ DBG] %s : thread %x in process %xcopied one PTE to child GPT : vpn %x / forks %d\n",594 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, vpn,595 hal_remote_l32( XPTR( page_cxy , &page_ptr->forks) ) );593 printk("\n[%s] thread[%x,%x] copied one PTE to child GPT : vpn %x / forks %d\n", 594 __FUNCTION__, this->process->pid, this->trdid, 595 vpn, hal_remote_l32( XPTR( page_cxy , &page_ptr->forks) ) ); 596 596 #endif 597 597 … … 607 607 cycle = (uint32_t)hal_get_cycles(); 608 608 if( DEBUG_THREAD_USER_FORK < cycle ) 609 printk("\n[ DBG] %s : thread %x in process %xexit / child_thread %x / cycle %d\n",610 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, child_ptr, cycle );609 printk("\n[%s] thread[%x,%x] exit / child_thread %x / cycle %d\n", 610 __FUNCTION__, this->process->pid, this->trdid, child_ptr, cycle ); 611 611 #endif 612 612 … … 626 626 uint32_t cycle = (uint32_t)hal_get_cycles(); 627 627 if( DEBUG_THREAD_USER_EXEC < cycle ) 628 printk("\n[ DBG] %s : thread %x in process %xenter / cycle %d\n",629 __FUNCTION__, thread->trdid, process->pid, cycle );628 printk("\n[%s] thread[%x,%x] enter / cycle %d\n", 629 __FUNCTION__, process->pid, thread->trdid, cycle ); 630 630 #endif 631 631 … … 688 688 cycle = (uint32_t)hal_get_cycles(); 689 689 if( DEBUG_THREAD_USER_EXEC < cycle ) 690 printk("\n[ DBG] %s : thread %x in process %xset CPU context & jump to user code / cycle %d\n",691 __FUNCTION__, thread->trdid, process->pid, cycle );690 printk("\n[%s] thread[%x,%x] set CPU context & jump to user code / cycle %d\n", 691 __FUNCTION__, process->pid, thread->trdid, cycle ); 692 692 vmm_display( process , true ); 693 693 #endif … … 712 712 thread_t * thread; // pointer on new thread descriptor 713 713 714 assert( ( (type == THREAD_IDLE) || (type == THREAD_RPC) || (type == THREAD_DEV) ) , 715 "illegal thread type" ); 716 717 assert( (core_lid < LOCAL_CLUSTER->cores_nr) , 718 "illegal core_lid" ); 714 thread_t * this = CURRENT_THREAD; 715 716 assert( ( (type == THREAD_IDLE) || (type == THREAD_RPC) || (type == THREAD_DEV) ) , 717 "illegal thread type" ); 718 719 assert( (core_lid < LOCAL_CLUSTER->cores_nr) , 720 "illegal core_lid" ); 719 721 720 722 #if DEBUG_THREAD_KERNEL_CREATE 721 uint32_t cycle = (uint32_t)hal_get_cycles();723 uint32_t cycle = (uint32_t)hal_get_cycles(); 722 724 if( DEBUG_THREAD_KERNEL_CREATE < cycle ) 723 printk("\n[ DBG] %s : thread %xenter / requested_type %s / cycle %d\n",724 __FUNCTION__, CURRENT_THREAD, thread, thread_type_str(type), cycle );725 printk("\n[%s] thread[%x,%x] enter / requested_type %s / cycle %d\n", 726 __FUNCTION__, this->process->pid, this->trdid, thread_type_str(type), cycle ); 725 727 #endif 726 728 … … 732 734 printk("\n[ERROR] in %s : thread %x in process %x\n" 733 735 " no memory for thread descriptor\n", 734 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );736 __FUNCTION__, this->trdid, this->process->pid ); 735 737 return ENOMEM; 736 738 } … … 749 751 printk("\n[ERROR] in %s : thread %x in process %x\n" 750 752 " cannot initialize thread descriptor\n", 751 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );753 __FUNCTION__, this->trdid, this->process->pid ); 752 754 thread_release( thread ); 753 755 return ENOMEM; … … 760 762 { 761 763 printk("\n[ERROR] in %s : thread %x in process %x\n" 762 " cannotcannot create CPU context\n",763 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );764 " cannot create CPU context\n", 765 __FUNCTION__, this->trdid, this->process->pid ); 764 766 thread_release( thread ); 765 767 return EINVAL; … … 774 776 cycle = (uint32_t)hal_get_cycles(); 775 777 if( DEBUG_THREAD_KERNEL_CREATE < cycle ) 776 printk("\n[ DBG] %s : thread %xexit / new_thread %x / type %s / cycle %d\n",777 __FUNCTION__, CURRENT_THREAD, thread, thread_type_str(type), cycle );778 printk("\n[%s] thread[%x,%x] exit / new_thread %x / type %s / cycle %d\n", 779 __FUNCTION__, this->process->pid, this->trdid, thread, thread_type_str(type), cycle ); 778 780 #endif 779 781 … … 830 832 thread_t * this = CURRENT_THREAD; 831 833 if( DEBUG_THREAD_DESTROY < cycle ) 832 printk("\n[ DBG] %s :thread[%x,%x] enter to destroy thread[%x,%x] / cycle %d\n",834 printk("\n[%s] thread[%x,%x] enter to destroy thread[%x,%x] / cycle %d\n", 833 835 __FUNCTION__, this->process->pid, this->trdid, process->pid, thread->trdid, cycle ); 834 836 #endif … … 862 864 cycle = (uint32_t)hal_get_cycles(); 863 865 if( DEBUG_THREAD_DESTROY < cycle ) 864 printk("\n[ DBG] %s :thread[%x,%x] exit / destroyed thread[%x,%x] / cycle %d\n",866 printk("\n[%s] thread[%x,%x] exit / destroyed thread[%x,%x] / cycle %d\n", 865 867 __FUNCTION__, this->process->pid, this->trdid, process->pid, thread->trdid, cycle ); 866 868 #endif … … 944 946 uint32_t cycle = (uint32_t)hal_get_cycles(); 945 947 process_t * process = hal_remote_lpt( XPTR( cxy , &ptr->process ) ); 948 thread_t * this = CURRENT_THREAD; 946 949 if( DEBUG_THREAD_BLOCK < cycle ) 947 printk("\n[ DBG] %s : thread %x in process %xblocked thread %x in process %x / cause %x\n",948 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid,950 printk("\n[%s] thread[%x,%x] blocked thread %x in process %x / cause %x\n", 951 __FUNCTION__, this->process->pid, this->trdid, 949 952 ptr->trdid, hal_remote_l32(XPTR( cxy , &process->pid )), cause ); 950 953 #endif … … 967 970 uint32_t cycle = (uint32_t)hal_get_cycles(); 968 971 process_t * process = hal_remote_lpt( XPTR( cxy , &ptr->process ) ); 972 thread_t * this = CURRENT_THREAD; 969 973 if( DEBUG_THREAD_BLOCK < cycle ) 970 printk("\n[ DBG] %s : thread %x in process %xunblocked thread %x in process %x / cause %x\n",971 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid,974 printk("\n[%s] thread[%x,%x] unblocked thread %x in process %x / cause %x\n", 975 __FUNCTION__, this->process->pid, this->trdid, 972 976 ptr->trdid, hal_remote_l32(XPTR( cxy , &process->pid )), cause ); 973 977 #endif … … 1016 1020 uint32_t cycle = (uint32_t)hal_get_cycles(); 1017 1021 if( DEBUG_THREAD_DELETE < cycle ) 1018 printk("\n[ DBG] %s :killer[%x,%x] enters / target[%x,%x] / cycle %d\n",1022 printk("\n[%s] killer[%x,%x] enters / target[%x,%x] / cycle %d\n", 1019 1023 __FUNCTION__, killer_ptr->process->pid, killer_ptr->trdid, 1020 1024 target_ptr->process->pid, target_ptr->trdid, cycle ); … … 1075 1079 cycle = (uint32_t)hal_get_cycles; 1076 1080 if( DEBUG_THREAD_DELETE < cycle ) 1077 printk("\n[ DBG] %s :killer[%x,%x] exit / target[%x,%x] marked after join / cycle %d\n",1081 printk("\n[%s] killer[%x,%x] exit / target[%x,%x] marked after join / cycle %d\n", 1078 1082 __FUNCTION__, killer_ptr->process->pid, killer_ptr->trdid, 1079 1083 target_ptr->process->pid, target_ptr->trdid, cycle ); … … 1098 1102 cycle = (uint32_t)hal_get_cycles; 1099 1103 if( DEBUG_THREAD_DELETE < cycle ) 1100 printk("\n[ DBG] %s :killer[%x,%x] deschedules / target[%x,%x] not completed / cycle %d\n",1104 printk("\n[%s] killer[%x,%x] deschedules / target[%x,%x] not completed / cycle %d\n", 1101 1105 __FUNCTION__, killer_ptr->process->pid, killer_ptr->trdid, 1102 1106 target_ptr->process->pid, target_ptr->trdid, cycle ); … … 1117 1121 cycle = (uint32_t)hal_get_cycles; 1118 1122 if( DEBUG_THREAD_DELETE < cycle ) 1119 printk("\n[ DBG] %s :killer[%x,%x] exit / target[%x,%x] marked after join / cycle %d\n",1123 printk("\n[%s] killer[%x,%x] exit / target[%x,%x] marked after join / cycle %d\n", 1120 1124 __FUNCTION__, killer_ptr->process->pid, killer_ptr->trdid, 1121 1125 target_ptr->process->pid, target_ptr->trdid, cycle ); … … 1135 1139 cycle = (uint32_t)hal_get_cycles; 1136 1140 if( DEBUG_THREAD_DELETE < cycle ) 1137 printk("\n[ DBG] %s :killer[%x,%x] exit / target [%x,%x] marked / no join / cycle %d\n",1141 printk("\n[%s] killer[%x,%x] exit / target [%x,%x] marked / no join / cycle %d\n", 1138 1142 __FUNCTION__, killer_ptr->process->pid, killer_ptr->trdid, 1139 1143 target_ptr->process->pid, target_ptr->trdid, cycle ); … … 1141 1145 1142 1146 } 1143 1144 1147 } // end thread_delete() 1145 1148 … … 1162 1165 uint32_t cycle = (uint32_t)hal_get_cycles(); 1163 1166 if( DEBUG_THREAD_IDLE < cycle ) 1164 printk("\n[ DBG] %s :idle thread on core[%x,%d] goes to sleep / cycle %d\n",1167 printk("\n[%s] idle thread on core[%x,%d] goes to sleep / cycle %d\n", 1165 1168 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, cycle ); 1166 1169 } … … 1173 1176 uint32_t cycle = (uint32_t)hal_get_cycles(); 1174 1177 if( DEBUG_THREAD_IDLE < cycle ) 1175 printk("\n[ DBG] %s :idle thread on core[%x,%d] wake up / cycle %d\n",1178 printk("\n[%s] idle thread on core[%x,%d] wake up / cycle %d\n", 1176 1179 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, cycle ); 1177 1180 } … … 1237 1240 thread_t * this = CURRENT_THREAD; 1238 1241 if( DEBUG_THREAD_GET_XPTR < cycle ) 1239 printk("\n[ DBG] %s :thread %x in process %x enters / pid %x / trdid %x / cycle %d\n",1242 printk("\n[%s] thread %x in process %x enters / pid %x / trdid %x / cycle %d\n", 1240 1243 __FUNCTION__, this->trdid, this->process->pid, pid, trdid, cycle ); 1241 1244 #endif … … 1262 1265 #if( DEBUG_THREAD_GET_XPTR & 1 ) 1263 1266 if( DEBUG_THREAD_GET_XPTR < cycle ) 1264 printk("\n[ DBG] %s :scan processes in cluster %x :\n", __FUNCTION__, target_cxy );1267 printk("\n[%s] scan processes in cluster %x :\n", __FUNCTION__, target_cxy ); 1265 1268 #endif 1266 1269 … … 1295 1298 #if( DEBUG_THREAD_GET_XPTR & 1 ) 1296 1299 if( DEBUG_THREAD_GET_XPTR < cycle ) 1297 printk("\n[ DBG] %s :pid %x not found in cluster %x\n",1300 printk("\n[%s] pid %x not found in cluster %x\n", 1298 1301 __FUNCTION__, pid, target_cxy ); 1299 1302 #endif … … 1310 1313 #if( DEBUG_THREAD_GET_XPTR & 1 ) 1311 1314 if( DEBUG_THREAD_GET_XPTR < cycle ) 1312 printk("\n[ DBG] %s :thread %x not registered in process %x in cluster %x\n",1315 printk("\n[%s] thread %x not registered in process %x in cluster %x\n", 1313 1316 __FUNCTION__, trdid, pid, target_cxy ); 1314 1317 #endif … … 1319 1322 cycle = (uint32_t)hal_get_cycles(); 1320 1323 if( DEBUG_THREAD_GET_XPTR < cycle ) 1321 printk("\n[ DBG] %s :thread %x in process %x exit / pid %x / trdid %x / cycle %d\n",1324 printk("\n[%s] thread %x in process %x exit / pid %x / trdid %x / cycle %d\n", 1322 1325 __FUNCTION__, this->trdid, this->process->pid, pid, trdid, cycle ); 1323 1326 #endif … … 1347 1350 1348 1351 // display error message on TXT0 1349 nolock_printk("\n[PANIC] in %s / thread %x in process %x [%x] cannot yield : "1352 nolock_printk("\n[PANIC] in %s / thread[%x,%x] cannot yield : " 1350 1353 "hold %d busylock(s) / cycle %d\n", 1351 func_str, thread-> trdid, thread->process->pid, thread,1354 func_str, thread->process->pid, thread->trdid, 1352 1355 thread->busylocks, (uint32_t)hal_get_cycles() ); 1353 1356
Note: See TracChangeset
for help on using the changeset viewer.