Changeset 188 for trunk/kernel/kern/printk.c
- Timestamp:
- Jul 12, 2017, 8:12:41 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/printk.c
r103 r188 35 35 /////////////////////////////////////////////////////////////////////////////////// 36 36 37 extern chdev_ t txt0_chdev; // allocated in kernel_init.c37 extern chdev_directory_t chdev_dir; // defined in chdev.h / allocated in kernel_init.c 38 38 39 39 ///////////////////////////////////// … … 369 369 uint32_t save_sr; 370 370 371 // get pointers on TXT0 chdev 372 xptr_t txt0_xp = chdev_dir.txt[0]; 373 cxy_t txt0_cxy = GET_CXY( txt0_xp ); 374 chdev_t * txt0_ptr = GET_PTR( txt0_xp ); 375 371 376 // get extended pointer on remote TXT0 chdev lock 372 xptr_t txt0_lock_xp = XPTR( LOCAL_CLUSTER->io_cxy , &txt0_chdev.wait_lock );377 xptr_t lock_xp = XPTR( txt0_cxy , &txt0_ptr->wait_lock ); 373 378 374 379 // get TXT0 lock in busy waiting mode 375 remote_spinlock_lock_busy( txt0_lock_xp , &save_sr );380 remote_spinlock_lock_busy( lock_xp , &save_sr ); 376 381 377 382 // call kernel_printf on TXT0, in busy waiting mode … … 381 386 382 387 // release lock 383 remote_spinlock_unlock_busy( txt0_lock_xp , save_sr );388 remote_spinlock_unlock_busy( lock_xp , save_sr ); 384 389 } 385 390 … … 406 411 } 407 412 } 413 414 ////////////////////////////////////////////////// 415 inline void nolock_assert( bool_t condition, 416 const char * function_name, 417 char * string ) 418 { 419 if( condition == false ) 420 { 421 nolock_printk("\n[PANIC] in %s : %s\n" , function_name , string ); 422 hal_core_sleep(); 423 } 424 } 425 408 426 409 427
Note: See TracChangeset
for help on using the changeset viewer.