Changeset 337 for trunk/kernel
- Timestamp:
- Aug 7, 2017, 12:50:17 PM (7 years ago)
- Location:
- trunk/kernel
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_pic.c
r282 r337 153 153 lid_t lid ) 154 154 { 155 irq_dmsg("\n[INFO] %s : enter / src_core = [%x,%d] / dst_core = [%x,%d] / cycle =%d\n",155 irq_dmsg("\n[INFO] %s : enter / src_core = [%x,%d] / dst_core = [%x,%d] / cycle %d\n", 156 156 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, cxy, lid, hal_time_stamp() ); 157 157 … … 166 166 f( cxy , lid ); 167 167 168 irq_dmsg("\n[INFO] %s : exit / src_core = [%x,%d] / dst_core = [%x,%d] / cycle =%d\n",168 irq_dmsg("\n[INFO] %s : exit / src_core = [%x,%d] / dst_core = [%x,%d] / cycle %d\n", 169 169 __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, cxy, lid, hal_time_stamp() ); 170 170 } -
trunk/kernel/kern/core.c
r296 r337 117 117 if( (ticks % 10) == 0 ) sched_yield( NULL ); 118 118 119 /* 120 // compute elapsed time, taking into account 32 bits register wrap 121 uint32_t elapsed; 122 uint32_t time_now = hal_get_cycles(); 123 uint32_t time_last = this->time_last_check; 124 if( time_now < time_last ) elapsed = (0xFFFFFFFF - time_last) + time_now; 125 else elapsed = time_now - time_last; 126 127 // update thread time 128 this->time_last_check = time_now; 129 130 // check elapsed time 131 if( elapsed < CONFIG_CORE_CHECK_EVERY ) return false; 132 else return true; 133 */ 134 119 135 // update DQDT TODO This update should depend on the cluster identifier, 120 136 // to avoid simultaneous updates from various clusters ... AG -
trunk/kernel/kern/kernel_init.c
r317 r337 205 205 } 206 206 } 207 208 kinit_dmsg("\n[INFO] %s created TXT0 chdev in cluster %x at cycle %d\n",209 __FUNCTION__ , local_cxy , (uint32_t)hal_time_stamp() );210 207 } 211 208 } // end loop on devices … … 276 273 } 277 274 278 kinit_dmsg("\n[INFO] %s created MMC in cluster %x / chdev = %x\n",275 kinit_dmsg("\n[INFO] %s : created MMC in cluster %x / chdev = %x\n", 279 276 __FUNCTION__ , channel , local_cxy , chdev_ptr ); 280 277 } … … 302 299 chdev_dir.dma[channel] = XPTR( local_cxy , chdev_ptr ); 303 300 304 kinit_dmsg("\n[INFO] %s created DMA[%d] in cluster %x / chdev = %x\n",301 kinit_dmsg("\n[INFO] %s : created DMA[%d] in cluster %x / chdev = %x\n", 305 302 __FUNCTION__ , channel , local_cxy , chdev_ptr ); 306 303 } … … 434 431 } 435 432 436 kinit_dmsg("\n[INFO] %s create chdev %s[%d] in cluster %x / chdev = %x\n",433 kinit_dmsg("\n[INFO] %s : create chdev %s[%d] in cluster %x / chdev = %x\n", 437 434 __FUNCTION__ , chdev_func_str( func ), channel , local_cxy , chdev ); 438 435 … … 1022 1019 // Each CP0 get the "dev" and "external" extended pointers from 1023 1020 // values stored in cluster IO. 1024 // Then CP0 in cluster(i) creates the DEVFS "internal directory,1021 // Then each CP0 in cluster(i) creates the DEVFS "internal directory, 1025 1022 // and creates the pseudo-files for all chdevs in cluster (i). 1026 1023 ///////////////////////////////////////////////////////////////////////////////// … … 1054 1051 kinit_dmsg("\n[INFO] %s : exit barrier 7 : dev_root = %l in cluster 0 / cycle %d\n", 1055 1052 __FUNCTION__, devfs_dev_inode_xp , hal_time_stamp() ); 1056 1057 #if CONFIG_KINIT_DEBUG1058 vfs_display( vfs_root_inode_xp );1059 #endif1060 1053 1061 1054 ///////////////////////////////////////////////////////////////////////////////// -
trunk/kernel/kern/printk.c
r296 r337 217 217 218 218 ////////////////////////////////////////////////////////////////////////////////////// 219 // This static function is called by printk() and user_printk() to build219 // This static function is called by printk(), assert() and nolock_printk() to build 220 220 // a formated string. 221 221 ////////////////////////////////////////////////////////////////////////////////////// … … 375 375 } // end kernel_printf() 376 376 377 ///////////////////////////////// 378 void printk( char * format , ... )377 ////////////////////////////////// 378 void printk( char * format , ... ) 379 379 { 380 380 va_list args; … … 401 401 } 402 402 403 //////////////////////////////////////// 404 void nolock_printk( char * format , ... )403 ///////////////////////////////////////// 404 void nolock_printk( char * format , ... ) 405 405 { 406 406 va_list args; … … 412 412 } 413 413 414 /////////////////////////////////////////// 415 inline void assert( bool_t condition, 416 const char * function_name, 417 char * string ) 418 { 414 //////////////////////////////////// 415 void assert( bool_t condition, 416 const char * function_name, 417 char * format, ... ) 418 { 419 va_list args; 420 uint32_t save_sr; 421 419 422 if( condition == false ) 420 423 { 421 printk("\n[PANIC] in %s : %s\n" , function_name , string ); 424 // get pointers on TXT0 chdev 425 xptr_t txt0_xp = chdev_dir.txt[0]; 426 cxy_t txt0_cxy = GET_CXY( txt0_xp ); 427 chdev_t * txt0_ptr = GET_PTR( txt0_xp ); 428 429 // get extended pointer on remote TXT0 chdev lock 430 xptr_t lock_xp = XPTR( txt0_cxy , &txt0_ptr->wait_lock ); 431 432 // get TXT0 lock in busy waiting mode 433 remote_spinlock_lock_busy( lock_xp , &save_sr ); 434 435 // call nolock_printk to print function_name 436 nolock_printk("\n[PANIC] in %s : " , function_name ); 437 438 // call kernel_printf on TXT0, in busy waiting to print format 439 va_start( args , format ); 440 kernel_printf( 0 , 1 , format , &args ); 441 va_end( args ); 442 443 // release TXT0 lock 444 remote_spinlock_unlock_busy( lock_xp , save_sr ); 445 446 // suicide 422 447 hal_core_sleep(); 423 448 } -
trunk/kernel/kern/printk.h
r296 r337 89 89 * @ condition : condition that must be true. 90 90 * @ function_name : name of the calling function. 91 * @ string : error message if condition is false.91 * @ format : formated string 92 92 *********************************************************************************/ 93 inlinevoid assert( bool_t condition,94 95 char * string);93 void assert( bool_t condition, 94 const char * function_name, 95 char * format , ... ); 96 96 97 97 /////////////////////////////////////////////////////////////////////////////////// … … 255 255 #endif 256 256 257 #if CONFIG_RPCG_DEBUG 258 #define rpcg_dmsg(...) printk(__VA_ARGS__) 259 #else 260 #define rpcg_dmsg(...) 261 #endif 262 257 263 #if CONFIG_SCHED_DEBUG 258 264 #define sched_dmsg(...) printk(__VA_ARGS__) … … 286 292 287 293 #if CONFIG_VFS_DEBUG 288 #define vfs_dmsg(...) printk(__VA_ARGS__)294 #define vfs_dmsg(...) if(hal_time_stamp() > CONFIG_VFS_DEBUG) printk(__VA_ARGS__) 289 295 #else 290 296 #define vfs_dmsg(...) -
trunk/kernel/kern/process.c
r326 r337 282 282 283 283 // Decrease refcount for bin file, root file and cwd file 284 vfs_file_count_down( process->vfs_bin_xp );285 286 284 if( process->vfs_bin_xp != XPTR_NULL ) vfs_file_count_down( process->vfs_bin_xp ); 285 if( process->vfs_root_xp != XPTR_NULL ) vfs_file_count_down( process->vfs_root_xp ); 286 if( process->vfs_cwd_xp != XPTR_NULL ) vfs_file_count_down( process->vfs_cwd_xp ); 287 287 288 288 // Destroy VMM -
trunk/kernel/kern/rpc.c
r315 r337 98 98 page_t ** page ) // out 99 99 { 100 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 100 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 101 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 102 CURRENT_THREAD->core->lid , hal_time_stamp() ); 101 103 102 104 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 116 118 *page = (page_t *)(intptr_t)rpc.args[1]; 117 119 118 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 120 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 121 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 122 CURRENT_THREAD->core->lid , hal_time_stamp() ); 119 123 } 120 124 … … 122 126 void rpc_pmem_get_pages_server( xptr_t xp ) 123 127 { 124 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 128 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 129 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 130 CURRENT_THREAD->core->lid , hal_time_stamp() ); 125 131 126 132 // get client cluster identifier and pointer on RPC descriptor … … 137 143 hal_remote_swd( XPTR( cxy , &desc->args[1] ) , (uint64_t)(intptr_t)page ); 138 144 139 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 145 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 146 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 147 CURRENT_THREAD->core->lid , hal_time_stamp() ); 140 148 } 141 149 … … 150 158 pid_t * pid ) // out 151 159 { 152 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 160 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 161 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 162 CURRENT_THREAD->core->lid , hal_time_stamp() ); 153 163 154 164 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 169 179 *error = (error_t)rpc.args[2]; 170 180 171 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 181 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 182 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 183 CURRENT_THREAD->core->lid , hal_time_stamp() ); 172 184 } 173 185 … … 179 191 pid_t pid; // output : process identifier 180 192 181 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 193 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 194 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 195 CURRENT_THREAD->core->lid , hal_time_stamp() ); 182 196 183 197 // get client cluster identifier and pointer on RPC descriptor … … 196 210 hal_remote_sw( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)pid ); 197 211 198 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 212 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 213 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 214 CURRENT_THREAD->core->lid , hal_time_stamp() ); 199 215 } 200 216 … … 209 225 error_t * error ) // out 210 226 { 211 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 227 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 228 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 229 CURRENT_THREAD->core->lid , hal_time_stamp() ); 212 230 213 231 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 227 245 *error = (error_t)rpc.args[1]; 228 246 229 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 247 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 248 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 249 CURRENT_THREAD->core->lid , hal_time_stamp() ); 230 250 } 231 251 … … 237 257 error_t error; // local error error status 238 258 239 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 259 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 260 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 261 CURRENT_THREAD->core->lid , hal_time_stamp() ); 240 262 241 263 // get client cluster identifier and pointer on RPC descriptor … … 257 279 hal_remote_swd( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)error ); 258 280 259 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 281 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 282 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 283 CURRENT_THREAD->core->lid , hal_time_stamp() ); 260 284 } 261 285 … … 268 292 void rpc_process_kill_client( process_t * process ) 269 293 { 270 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 294 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 295 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 296 CURRENT_THREAD->core->lid , hal_time_stamp() ); 271 297 272 298 // only reference cluster can send this RPC … … 300 326 } 301 327 302 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 328 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 329 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 330 CURRENT_THREAD->core->lid , hal_time_stamp() ); 303 331 } 304 332 … … 309 337 process_t * process; 310 338 311 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 339 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 340 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 341 CURRENT_THREAD->core->lid , hal_time_stamp() ); 312 342 313 343 // get client cluster identifier and pointer on RPC descriptor … … 331 361 } 332 362 333 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 363 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 364 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 365 CURRENT_THREAD->core->lid , hal_time_stamp() ); 334 366 } 335 367 … … 348 380 error_t * error ) // out 349 381 { 350 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 382 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 383 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 384 CURRENT_THREAD->core->lid , hal_time_stamp() ); 351 385 352 386 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 370 404 *error = (error_t)rpc.args[5]; 371 405 372 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 406 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 407 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 408 CURRENT_THREAD->core->lid , hal_time_stamp() ); 373 409 } 374 410 … … 386 422 error_t error; 387 423 388 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 424 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 425 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 426 CURRENT_THREAD->core->lid , hal_time_stamp() ); 389 427 390 428 // get client cluster identifier and pointer on RPC descriptor … … 419 457 hal_remote_swd( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)thread_xp ); 420 458 421 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 459 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 460 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 461 CURRENT_THREAD->core->lid , hal_time_stamp() ); 422 462 } 423 463 … … 434 474 error_t * error ) // out 435 475 { 436 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 476 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 477 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 478 CURRENT_THREAD->core->lid , hal_time_stamp() ); 437 479 438 480 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 455 497 *error = (error_t)rpc.args[4]; 456 498 457 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 499 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 500 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 501 CURRENT_THREAD->core->lid , hal_time_stamp() ); 458 502 } 459 503 … … 466 510 error_t error; 467 511 468 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 512 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 513 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 514 CURRENT_THREAD->core->lid , hal_time_stamp() ); 469 515 470 516 // get client cluster identifier and pointer on RPC descriptor … … 488 534 hal_remote_swd( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)thread_xp ); 489 535 490 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 536 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 537 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 538 CURRENT_THREAD->core->lid , hal_time_stamp() ); 491 539 } 492 540 … … 500 548 uint32_t sig_id ) // in 501 549 { 502 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 550 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 551 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 552 CURRENT_THREAD->core->lid , hal_time_stamp() ); 503 553 504 554 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 516 566 rpc_send_sync( cxy , &rpc ); 517 567 518 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 568 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 569 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 570 CURRENT_THREAD->core->lid , hal_time_stamp() ); 519 571 } 520 572 … … 525 577 uint32_t sig_id; // signal index 526 578 527 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 579 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 580 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 581 CURRENT_THREAD->core->lid , hal_time_stamp() ); 528 582 529 583 // get client cluster identifier and pointer on RPC descriptor … … 538 592 signal_rise( process , sig_id ); 539 593 540 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 594 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 595 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 596 CURRENT_THREAD->core->lid , hal_time_stamp() ); 541 597 } 542 598 … … 558 614 error_t * error ) // out 559 615 { 560 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 616 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 617 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 618 CURRENT_THREAD->core->lid , hal_time_stamp() ); 561 619 562 620 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 584 642 *error = (error_t)rpc.args[9]; 585 643 586 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 644 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 645 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 646 CURRENT_THREAD->core->lid , hal_time_stamp() ); 587 647 } 588 648 … … 601 661 error_t error; 602 662 603 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 663 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 664 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 665 CURRENT_THREAD->core->lid , hal_time_stamp() ); 604 666 605 667 // get client cluster identifier and pointer on RPC descriptor … … 632 694 hal_remote_swd( XPTR( client_cxy , &desc->args[9] ) , (uint64_t)error ); 633 695 634 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 696 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 697 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 698 CURRENT_THREAD->core->lid , hal_time_stamp() ); 635 699 } 636 700 … … 643 707 struct vfs_inode_s * inode ) 644 708 { 645 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 709 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 710 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 711 CURRENT_THREAD->core->lid , hal_time_stamp() ); 646 712 647 713 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 658 724 rpc_send_sync( cxy , &rpc ); 659 725 660 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 726 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 727 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 728 CURRENT_THREAD->core->lid , hal_time_stamp() ); 661 729 } 662 730 … … 666 734 vfs_inode_t * inode; 667 735 668 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 736 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 737 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 738 CURRENT_THREAD->core->lid , hal_time_stamp() ); 669 739 670 740 // get client cluster identifier and pointer on RPC descriptor … … 678 748 vfs_inode_destroy( inode ); 679 749 680 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 750 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 751 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 752 CURRENT_THREAD->core->lid , hal_time_stamp() ); 681 753 } 682 754 … … 693 765 error_t * error ) // out 694 766 { 695 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 767 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 768 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 769 CURRENT_THREAD->core->lid , hal_time_stamp() ); 696 770 697 771 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 714 788 *error = (error_t)rpc.args[4]; 715 789 716 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 790 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 791 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 792 CURRENT_THREAD->core->lid , hal_time_stamp() ); 717 793 } 718 794 … … 728 804 char name_copy[CONFIG_VFS_MAX_NAME_LENGTH]; 729 805 730 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 806 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 807 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 808 CURRENT_THREAD->core->lid , hal_time_stamp() ); 731 809 732 810 // get client cluster identifier and pointer on RPC descriptor … … 752 830 hal_remote_swd( XPTR( client_cxy , &desc->args[4] ) , (uint64_t)error ); 753 831 754 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 832 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 833 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 834 CURRENT_THREAD->core->lid , hal_time_stamp() ); 755 835 } 756 836 … … 764 844 vfs_dentry_t * dentry ) 765 845 { 766 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 846 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 847 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 848 CURRENT_THREAD->core->lid , hal_time_stamp() ); 767 849 768 850 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 779 861 rpc_send_sync( cxy , &rpc ); 780 862 781 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 863 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 864 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 865 CURRENT_THREAD->core->lid , hal_time_stamp() ); 782 866 } 783 867 … … 787 871 vfs_dentry_t * dentry; 788 872 789 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 873 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 874 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 875 CURRENT_THREAD->core->lid , hal_time_stamp() ); 790 876 791 877 // get client cluster identifier and pointer on RPC descriptor … … 799 885 vfs_dentry_destroy( dentry ); 800 886 801 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 887 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 888 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 889 CURRENT_THREAD->core->lid , hal_time_stamp() ); 802 890 } 803 891 … … 814 902 error_t * error ) // out 815 903 { 816 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 904 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 905 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 906 CURRENT_THREAD->core->lid , hal_time_stamp() ); 817 907 818 908 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 834 924 *error = (error_t)rpc.args[3]; 835 925 836 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 926 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 927 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 928 CURRENT_THREAD->core->lid , hal_time_stamp() ); 837 929 } 838 930 … … 845 937 error_t error; 846 938 847 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 939 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 940 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 941 CURRENT_THREAD->core->lid , hal_time_stamp() ); 848 942 849 943 // get client cluster identifier and pointer on RPC descriptor … … 864 958 hal_remote_swd( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error ); 865 959 866 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 960 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 961 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 962 CURRENT_THREAD->core->lid , hal_time_stamp() ); 867 963 } 868 964 … … 875 971 vfs_file_t * file ) 876 972 { 877 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 973 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 974 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 975 CURRENT_THREAD->core->lid , hal_time_stamp() ); 878 976 879 977 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 890 988 rpc_send_sync( cxy , &rpc ); 891 989 892 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 990 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 991 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 992 CURRENT_THREAD->core->lid , hal_time_stamp() ); 893 993 } 894 994 … … 898 998 vfs_file_t * file; 899 999 900 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1000 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1001 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1002 CURRENT_THREAD->core->lid , hal_time_stamp() ); 901 1003 902 1004 // get client cluster identifier and pointer on RPC descriptor … … 910 1012 vfs_file_destroy( file ); 911 1013 912 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1014 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1015 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1016 CURRENT_THREAD->core->lid , hal_time_stamp() ); 913 1017 } 914 1018 … … 924 1028 error_t * error ) // out 925 1029 { 926 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1030 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1031 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1032 CURRENT_THREAD->core->lid , hal_time_stamp() ); 927 1033 928 1034 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 944 1050 *error = (error_t)rpc.args[3]; 945 1051 946 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1052 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1053 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1054 CURRENT_THREAD->core->lid , hal_time_stamp() ); 947 1055 } 948 1056 … … 957 1065 char name_copy[CONFIG_VFS_MAX_NAME_LENGTH]; 958 1066 959 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1067 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1068 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1069 CURRENT_THREAD->core->lid , hal_time_stamp() ); 960 1070 961 1071 // get client cluster identifier and pointer on RPC descriptor … … 978 1088 hal_remote_swd( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error ); 979 1089 980 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1090 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1091 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1092 CURRENT_THREAD->core->lid , hal_time_stamp() ); 981 1093 } 982 1094 … … 990 1102 error_t * error ) // out 991 1103 { 992 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1104 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1105 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1106 CURRENT_THREAD->core->lid , hal_time_stamp() ); 993 1107 994 1108 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 1008 1122 *error = (error_t)rpc.args[1]; 1009 1123 1010 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1124 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1125 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1126 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1011 1127 } 1012 1128 … … 1017 1133 vfs_inode_t * inode; 1018 1134 1019 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1135 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1136 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1137 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1020 1138 1021 1139 // get client cluster identifier and pointer on RPC descriptor … … 1032 1150 hal_remote_swd( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error ); 1033 1151 1034 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1152 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1153 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1154 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1035 1155 } 1036 1156 … … 1047 1167 error_t * error ) // out 1048 1168 { 1049 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1169 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1170 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1171 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1050 1172 1051 1173 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 1068 1190 *error = (error_t)rpc.args[4]; 1069 1191 1070 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1192 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1193 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1194 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1071 1195 } 1072 1196 … … 1080 1204 error_t error; 1081 1205 1082 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1206 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1207 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1208 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1083 1209 1084 1210 // get client cluster identifier and pointer on RPC descriptor … … 1098 1224 hal_remote_swd( XPTR( client_cxy , &desc->args[4] ) , (uint64_t)error ); 1099 1225 1100 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1226 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1227 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1228 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1101 1229 } 1102 1230 … … 1111 1239 xptr_t * vseg_xp ) // out 1112 1240 { 1113 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1241 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1242 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1243 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1114 1244 1115 1245 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 1130 1260 *vseg_xp = rpc.args[2]; 1131 1261 1132 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1262 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1263 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1264 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1133 1265 } 1134 1266 … … 1141 1273 xptr_t vseg_xp; 1142 1274 1143 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1275 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1276 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1277 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1144 1278 1145 1279 // get client cluster identifier and pointer on RPC descriptor … … 1159 1293 hal_remote_swd( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)vseg_xp ); 1160 1294 1161 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1295 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1296 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1297 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1162 1298 } 1163 1299 … … 1175 1311 error_t * error ) // out 1176 1312 { 1177 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1313 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1314 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1315 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1178 1316 1179 1317 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 1196 1334 *error = (error_t)rpc.args[4]; 1197 1335 1198 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1336 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1337 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1338 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1199 1339 } 1200 1340 … … 1208 1348 error_t error; 1209 1349 1210 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1350 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1351 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1352 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1211 1353 1212 1354 // get client cluster identifier and pointer on RPC descriptor … … 1226 1368 hal_remote_swd( XPTR( client_cxy , &desc->args[4] ) , (uint64_t)error ); 1227 1369 1228 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1370 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1371 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1372 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1229 1373 } 1230 1374 … … 1238 1382 xptr_t * buf_xp ) // out 1239 1383 { 1240 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1384 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1385 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1386 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1241 1387 1242 1388 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 1256 1402 *buf_xp = (xptr_t)rpc.args[1]; 1257 1403 1258 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1404 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1405 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1406 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1259 1407 } 1260 1408 … … 1262 1410 void rpc_kcm_alloc_server( xptr_t xp ) 1263 1411 { 1264 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1412 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1413 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1414 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1265 1415 1266 1416 // get client cluster identifier and pointer on RPC descriptor … … 1281 1431 hal_remote_swd( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)buf_xp ); 1282 1432 1283 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1433 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1434 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1435 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1284 1436 } 1285 1437 … … 1293 1445 uint32_t kmem_type ) // in 1294 1446 { 1295 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1447 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1448 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1449 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1296 1450 1297 1451 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 1309 1463 rpc_send_sync( cxy , &rpc ); 1310 1464 1311 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1465 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1466 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1467 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1312 1468 } 1313 1469 … … 1315 1471 void rpc_kcm_free_server( xptr_t xp ) 1316 1472 { 1317 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1473 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1474 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1475 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1318 1476 1319 1477 // get client cluster identifier and pointer on RPC descriptor … … 1331 1489 kmem_free( &req ); 1332 1490 1333 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1491 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1492 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1493 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1334 1494 } 1335 1495 … … 1348 1508 error_t * error ) // out 1349 1509 { 1350 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1510 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1511 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1512 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1351 1513 1352 1514 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 1371 1533 *error = (error_t)rpc.args[6]; 1372 1534 1373 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1535 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1536 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1537 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1374 1538 } 1375 1539 … … 1386 1550 error_t error; 1387 1551 1388 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1552 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1553 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1554 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1389 1555 1390 1556 // get client cluster identifier and pointer on RPC descriptor … … 1424 1590 hal_remote_swd( XPTR( client_cxy , &desc->args[6] ) , (uint64_t)error ); 1425 1591 1426 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1592 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1593 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1594 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1427 1595 } 1428 1596 … … 1437 1605 page_t ** page ) // out 1438 1606 { 1439 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1607 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1608 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1609 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1440 1610 1441 1611 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 1456 1626 *page = (page_t *)(intptr_t)rpc.args[2]; 1457 1627 1458 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1628 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1629 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1630 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1459 1631 } 1460 1632 … … 1462 1634 void rpc_mapper_get_page_server( xptr_t xp ) 1463 1635 { 1464 rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1636 rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1637 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1638 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1465 1639 1466 1640 // get client cluster identifier and pointer on RPC descriptor … … 1478 1652 hal_remote_swd( XPTR( cxy , &desc->args[1] ) , (uint64_t)(intptr_t)page ); 1479 1653 1480 rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() ); 1654 rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1655 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1656 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1481 1657 } 1482 1658 … … 1495 1671 reg_t sr_save; 1496 1672 1497 thread_t * this = CURRENT_THREAD; 1498 1499 rpc_dmsg("\n[INFO] %s : enter / client_cxy = %x / server_cxy = %x / cycle %d\n", 1673 rpcg_dmsg("\n[INFO] %s : enter / client_cxy = %x / server_cxy = %x / cycle %d\n", 1500 1674 __FUNCTION__ , local_cxy , server_cxy , hal_time_stamp() ); 1501 1675 … … 1514 1688 (uint64_t )desc_xp, 1515 1689 &first ); 1516 1517 1690 if ( error ) 1518 1691 { … … 1525 1698 while( error ); 1526 1699 1527 rpc _dmsg("\n[INFO] %s : RPC %l registered / server_cxy = %x / cycle %d\n",1700 rpcg_dmsg("\n[INFO] %s : RPC %l registered / server_cxy = %x / cycle %d\n", 1528 1701 __FUNCTION__ , desc_xp , server_cxy , hal_time_stamp() ); 1529 1702 … … 1539 1712 dev_pic_send_ipi( server_cxy , 0 ); 1540 1713 1541 rpc _dmsg("\n[INFO] %s : IPI sent / client_cxy = %x / server_cxy = %x\n",1714 rpcg_dmsg("\n[INFO] %s : IPI sent / client_cxy = %x / server_cxy = %x\n", 1542 1715 __FUNCTION__, local_cxy , server_cxy ); 1543 1716 } … … 1545 1718 1546 1719 // enable IRQs to allow incoming RPC and avoid deadlock 1547 if( this->type == THREAD_RPC )hal_enable_irq( &sr_save );1720 hal_enable_irq( &sr_save ); 1548 1721 1549 1722 // the server thread poll the response slot until RPC completed 1550 1723 // TODO this could be replaced by a descheduling policy... [AG] 1551 while( 1 ) 1552 { 1553 if( rpc->response == 0 ) break; 1554 } 1724 while( rpc->response ) asm volatile( "nop" ); 1555 1725 1556 1726 // restore IRQs 1557 if( this->type == THREAD_RPC )hal_restore_irq( sr_save );1558 1559 rpc _dmsg("\n[INFO] %s : completed / client_cxy = %x / server_cxy = %x / cycle %d\n",1727 hal_restore_irq( sr_save ); 1728 1729 rpcg_dmsg("\n[INFO] %s : completed / client_cxy = %x / server_cxy = %x / cycle %d\n", 1560 1730 __FUNCTION__ , local_cxy , server_cxy , hal_time_stamp() ); 1561 1731 … … 1592 1762 count = 0; 1593 1763 1594 rpc _dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / fifo = %x/ cycle %d\n",1764 rpcg_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1595 1765 __FUNCTION__, this->trdid, local_cxy, core->lid , hal_time_stamp() ); 1596 1766 … … 1609 1779 index = hal_remote_lw( XPTR( client_cxy , &desc->index ) ); 1610 1780 1611 rpc _dmsg("\n[INFO] %s : thread %x on core [%x,%d] / index = %d / &rpc = %x\n",1612 __FUNCTION__ , this->trdid , core->lid , local_cxy , index , rpc_server[index]);1781 rpcg_dmsg("\n[INFO] %s : thread %x on core [%x,%d] / rpc = %d\n", 1782 __FUNCTION__ , this->trdid , core->lid , local_cxy , index ); 1613 1783 1614 1784 // call the relevant server function … … 1619 1789 1620 1790 // notify RPC completion as required 1621 hal_remote_atomic_add( XPTR( client_cxy,&desc->response) , -1 );1791 hal_remote_atomic_add( XPTR( client_cxy , &desc->response ) , -1 ); 1622 1792 } 1623 1793 … … 1678 1848 thread->blocked = 0; 1679 1849 1680 rpc _dmsg("\n[INFO] %s : activate RPC thread %x on core [%x,%d] / cycle %d\n",1850 rpcg_dmsg("\n[INFO] %s : activate RPC thread %x on core [%x,%d] / cycle %d\n", 1681 1851 __FUNCTION__ , thread , core->gid , local_cxy , hal_time_stamp() ); 1682 1852 } … … 1703 1873 hal_atomic_add( &LOCAL_CLUSTER->rpc_threads , 1 ); 1704 1874 1705 rpc _dmsg("\n[INFO] %s : create RPC thread %x on core [%x,%d] / cycle %d\n",1875 rpcg_dmsg("\n[INFO] %s : create RPC thread %x on core [%x,%d] / cycle %d\n", 1706 1876 __FUNCTION__ , thread->trdid, local_cxy, core->lid, hal_time_stamp() ); 1707 1877 } … … 1728 1898 error_t error; 1729 1899 1730 rpc _dmsg("\n[INFO] %s : enter in cluster %x\n",1731 __FUNCTION__ , local_cxy);1900 rpcg_dmsg("\n[INFO] %s : enter / thread %x / cluster %x / cycle %d\n", 1901 __FUNCTION__ , this->trdid , local_cxy , hal_time_stamp() ); 1732 1902 1733 1903 // calling thread does nothing if light lock already taken or FIFO empty 1734 1904 if( (rpc_fifo->owner != 0) || (local_fifo_is_empty( &rpc_fifo->fifo )) ) 1735 1905 { 1736 rpc _dmsg("\n[INFO] %s : exit but do nothing in cluster %x\n",1737 __FUNCTION__ , local_cxy);1906 rpcg_dmsg("\n[INFO] %s : exit do nothing / thread %x / cluster %x / cycle %d\n", 1907 __FUNCTION__ , this->trdid , local_cxy , hal_time_stamp() ); 1738 1908 1739 1909 return false; … … 1754 1924 } 1755 1925 1756 rpc_dmsg("\n[INFO] %s : exit after activating an RPC thread in cluster %x\n", 1757 __FUNCTION__ , local_cxy ); 1926 rpcg_dmsg("\n[INFO] %s : exit after RPC thread activation / " 1927 "thread %x / cluster %x / cycle %d\n", 1928 __FUNCTION__ , this->trdid , local_cxy , hal_time_stamp() ); 1758 1929 1759 1930 return true; … … 1761 1932 else // light lock taken by another thread 1762 1933 { 1763 rpc _dmsg("\n[INFO] %s : exit but do nothing in cluster %x\n",1764 __FUNCTION__ , local_cxy);1934 rpcg_dmsg("\n[INFO] %s : exit do nothing / thread %x / cluster %x / cycle %d\n", 1935 __FUNCTION__ , this->trdid , local_cxy , hal_time_stamp() ); 1765 1936 1766 1937 return false; … … 1778 1949 rpc_fifo_t * rpc_fifo = &LOCAL_CLUSTER->rpc_fifo; 1779 1950 1780 rpc _dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1951 rpcg_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1781 1952 __FUNCTION__, this->trdid, local_cxy, this->core->lid, hal_time_stamp() ); 1782 1953 … … 1803 1974 if( LOCAL_CLUSTER->rpc_threads >= CONFIG_RPC_THREADS_MAX ) 1804 1975 { 1805 rpc _dmsg("\n[INFO]thread %x on core[%x,%d] suicide / cycle %d\n",1976 rpcg_dmsg("\n[INFO] %s : RPC thread %x on core[%x,%d] suicide / cycle %d\n", 1806 1977 __FUNCTION__, this->trdid, local_cxy, this->core->lid, hal_time_stamp() ); 1807 1978 … … 1814 1985 else 1815 1986 { 1816 rpc _dmsg("\n[INFO] %s :thread %x on core[%x,%d] blocks / cycle %d\n",1987 rpcg_dmsg("\n[INFO] %s : RPC thread %x on core[%x,%d] blocks / cycle %d\n", 1817 1988 __FUNCTION__, this->trdid, local_cxy, this->core->lid, hal_time_stamp() ); 1818 1989 … … 1820 1991 sched_yield( NULL ); 1821 1992 1822 rpc _dmsg("\n[INFO]RPC thread %x wake up on core[%x,%d] / cycle %d\n",1993 rpcg_dmsg("\n[INFO] %s : RPC thread %x wake up on core[%x,%d] / cycle %d\n", 1823 1994 __FUNCTION__, this->trdid, local_cxy, this->core->lid, hal_time_stamp() ); 1824 1995 } -
trunk/kernel/kern/scheduler.c
r317 r337 283 283 __FUNCTION__, current->trdid, local_cxy, core->lid, hal_time_stamp() ); 284 284 285 // check calling thread released all locks 286 assert( (thread_can_yield() == true), __FUNCTION__, "locks not released\n"); 285 // delay the yield if current thread has locks 286 if( thread_can_yield() == false ) 287 { 288 current->flags |= THREAD_FLAG_SCHED; 289 return; 290 } 287 291 288 292 // first loop on all threads to handle pending signals … … 325 329 // restore IRQs when calling thread resume 326 330 hal_restore_irq( sr_save ); 327 328 sched_dmsg("\n[INFO] %s : thread %x on core[%x,%d] / cycle %d\n",329 __FUNCTION__, current->trdid, local_cxy, core->lid, hal_time_stamp() );330 331 } 331 332 else -
trunk/kernel/kern/thread.c
r315 r337 760 760 { 761 761 // TODO 762 printk("\n[WARNING] function %s not implemented\n", __FUNCTION__ );762 // printk("\n[WARNING] function %s not implemented\n", __FUNCTION__ ); 763 763 } 764 764 … … 767 767 { 768 768 // TODO 769 printk("\n[WARNING] function %s not implemented\n", __FUNCTION__ );769 // printk("\n[WARNING] function %s not implemented\n", __FUNCTION__ ); 770 770 } 771 771 … … 774 774 { 775 775 // TODO 776 printk("\n[WARNING] function %s not implemented\n", __FUNCTION__ );776 // printk("\n[WARNING] function %s not implemented\n", __FUNCTION__ ); 777 777 } 778 778 -
trunk/kernel/kern/thread.h
r279 r337 100 100 #define THREAD_FLAG_JOIN 0x0004 /*! Parent thread made a join */ 101 101 #define THREAD_FLAG_EXIT 0x0008 /*! This thread made an exit */ 102 #define THREAD_FLAG_SCHED 0x0010 /*! Descheduling required for this thread */ 102 103 103 104 /*************************************************************************************** -
trunk/kernel/libk/elf.c
r333 r337 88 88 error_t error; 89 89 xptr_t buf_xp; 90 void * buf_ptr; 91 92 buf_ptr = GET_PTR( buffer ); 93 buf_xp = XPTR( local_cxy , buf_ptr ); 90 91 buf_xp = XPTR( local_cxy , buffer ); 94 92 95 93 // load .elf header -
trunk/kernel/libk/remote_rwlock.c
r318 r337 118 118 // enable interrupts 119 119 hal_restore_irq( mode ); 120 121 // deschedule if pending request 122 thread_check_sched(); 120 123 121 124 } // end remote_rwlock_rd_unlock() … … 201 204 // enable interrupts 202 205 hal_restore_irq( mode ); 206 207 // deschedule if pending request 208 thread_check_sched(); 203 209 204 210 } // end remote_rwlock_wr_unlock() -
trunk/kernel/libk/remote_spinlock.c
r296 r337 141 141 142 142 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , XPTR_NULL ); 143 144 143 hal_remote_sw ( XPTR( lock_cxy , &lock_ptr->taken ) , 0 ); 145 146 144 thread_ptr->remote_locks--; 147 148 145 xlist_unlink( XPTR( lock_cxy , &lock_ptr->list ) ); 149 146 147 // deschedule if pending request 148 thread_check_sched(); 149 150 // restore IRQs 150 151 hal_restore_irq( irq_state ); 151 152 } … … 211 212 212 213 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , XPTR_NULL ); 213 214 214 hal_remote_sw ( XPTR( lock_cxy , &lock_ptr->taken ) , 0 ); 215 216 215 thread_ptr->remote_locks--; 217 218 216 xlist_unlink( XPTR( lock_cxy , &lock_ptr->list ) ); 217 218 // deschedule if pending request 219 thread_check_sched(); 219 220 } 220 221 -
trunk/kernel/libk/rwlock.c
r124 r337 91 91 // enable IRQs 92 92 hal_restore_irq( mode ); 93 94 // deschedule if pending request 95 thread_check_sched(); 93 96 } 94 97 … … 141 144 lock->owner = NULL; 142 145 this->local_locks--; 143 146 144 147 // enable IRQs 145 148 hal_restore_irq( mode ); 149 150 // deschedule if pending request 151 thread_check_sched(); 146 152 } 147 153 -
trunk/kernel/libk/spinlock.c
r331 r337 84 84 list_unlink( &lock->list ); 85 85 86 hal_restore_irq( irq_state ); 86 // deschedule if pending request 87 thread_check_sched(); 88 89 // restore IRQs 90 hal_restore_irq( irq_state ); 87 91 } 88 92 … … 120 124 list_add_first( &this->locks_root , &lock->list ); 121 125 122 // enable interrupts126 // restore IRQs 123 127 hal_restore_irq( mode ); 124 128 } … … 160 164 this->local_locks--; 161 165 list_unlink( &lock->list ); 166 167 // deschedule if pending request 168 thread_check_sched(); 162 169 } 163 170 -
trunk/kernel/libk/string.c
r323 r337 129 129 const char * find) 130 130 { 131 char c, sc; 132 size_t len; 131 char sc; 132 char c; 133 uint32_t len; 133 134 134 135 if ((c = *find++) != 0) { -
trunk/kernel/vfs/vfs.c
r333 r337 40 40 #include <mapper.h> 41 41 #include <thread.h> 42 #include <chdev.h> 42 43 #include <process.h> 43 44 #include <vfs.h> … … 52 53 ////////////////////////////////////////////////////////////////////////////////////////// 53 54 54 extern vfs_ctx_t fs_context[FS_TYPES_NR]; // allocated in kernel_init.c 55 55 extern vfs_ctx_t fs_context[FS_TYPES_NR]; // allocated in kernel_init.c 56 57 extern chdev_directory_t chdev_dir; // allocated in kernel_init.c 56 58 57 59 ////////////////////////////////////////////////////////////////////////////////////////// … … 534 536 file->attr = attr; 535 537 file->offset = 0; 536 file->refcount = 0;538 file->refcount = 1; 537 539 file->inode = inode; 538 540 file->ctx = inode->ctx; … … 1053 1055 ////////////////////////////////////////////////////////////////////////// 1054 1056 // This static function is called by the vfs_display() function. 1057 // that is supposed to take the TXT0 lock. 1055 1058 ////////////////////////////////////////////////////////////////////////// 1056 1059 static void vfs_recursive_display( xptr_t inode_xp, … … 1104 1107 1105 1108 // display inode 1106 printk("%s%s <%s> inode_xp = %l / dentry_xp = %l\n",1107 indent_str[indent], vfs_inode_type_str( inode_type ),1108 name , inode_xp , dentry_xp );1109 nolock_printk("%s%s <%s> inode_xp = %l / dentry_xp = %l\n", 1110 indent_str[indent], vfs_inode_type_str( inode_type ), 1111 name , inode_xp , dentry_xp ); 1109 1112 1110 1113 // scan directory entries … … 1155 1158 cxy_t dentry_cxy; 1156 1159 vfs_dentry_t * dentry_ptr; 1160 uint32_t save_sr; 1157 1161 1158 1162 // get target inode cluster and local pointer … … 1179 1183 } 1180 1184 1185 // get pointers on TXT0 chdev 1186 xptr_t txt0_xp = chdev_dir.txt[0]; 1187 cxy_t txt0_cxy = GET_CXY( txt0_xp ); 1188 chdev_t * txt0_ptr = GET_PTR( txt0_xp ); 1189 1190 // get extended pointer on remote TXT0 chdev lock 1191 xptr_t lock_xp = XPTR( txt0_cxy , &txt0_ptr->wait_lock ); 1192 1193 // get TXT0 lock in busy waiting mode 1194 remote_spinlock_lock_busy( lock_xp , &save_sr ); 1195 1181 1196 // print header 1182 printk("\n*** VFS ***\n");1197 nolock_printk("\n***** file system state\n"); 1183 1198 1184 1199 // call recursive function 1185 1200 vfs_recursive_display( inode_xp , name_xp , dentry_xp , 0 ); 1201 1202 // release lock 1203 remote_spinlock_unlock_busy( lock_xp , save_sr ); 1186 1204 1187 1205 } // end vfs_display()
Note: See TracChangeset
for help on using the changeset viewer.