Changeset 619 for trunk/kernel/kern/thread.c
- Timestamp:
- Feb 12, 2019, 1:15:47 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/thread.c
r611 r619 1378 1378 } // end thread_assert_can yield() 1379 1379 1380 ////////////////////////////////////////////////// 1381 void thread_display_busylocks( xptr_t thread_xp )1382 { 1383 // get cluster and local pointer of target thread 1380 ////////////////////////////////////////////////////// 1381 void thread_display_busylocks( xptr_t thread_xp, 1382 const char * string ) 1383 { 1384 1384 cxy_t thread_cxy = GET_CXY( thread_xp ); 1385 1385 thread_t * thread_ptr = GET_PTR( thread_xp ); … … 1389 1389 xptr_t iter_xp; 1390 1390 1391 // get target thread TRDID and busylocks 1392 trdid_t trdid = hal_remote_l32(XPTR( thread_cxy , &thread_ptr->trdid )); 1393 uint32_t locks = hal_remote_l32(XPTR( thread_cxy , &thread_ptr->busylocks )); 1394 1395 // get target thread process and PID; 1396 process_t * process = hal_remote_lpt(XPTR( thread_cxy , &thread_ptr->process )); 1397 pid_t pid = hal_remote_l32(XPTR( thread_cxy , &process->pid )); 1391 // get relevant info from target trhead descriptor 1392 uint32_t locks = hal_remote_l32( XPTR( thread_cxy , &thread_ptr->busylocks ) ); 1393 trdid_t trdid = hal_remote_l32( XPTR( thread_cxy , &thread_ptr->trdid ) ); 1394 process_t * process = hal_remote_lpt( XPTR( thread_cxy , &thread_ptr->process ) ); 1395 pid_t pid = hal_remote_l32( XPTR( thread_cxy , &process->pid ) ); 1398 1396 1399 1397 // get extended pointer on root of busylocks 1400 xptr_t 1398 xptr_t root_xp = XPTR( thread_cxy , &thread_ptr->busylocks_root ); 1401 1399 1402 1400 // get pointers on TXT0 chdev … … 1412 1410 1413 1411 // display header 1414 nolock_printk("\n***** thread %x in process %x : %d busylocks at cycle %d\n",1415 trdid, pid, locks, (uint32_t)hal_get_cycles());1412 nolock_printk("\n***** thread[%x,%x] in <%s> : %d busylocks *****\n", 1413 pid, trdid, string, locks ); 1416 1414 1417 1415 // scan the xlist of busylocks when required … … 1436 1434 1437 1435 // display a warning 1438 printk("\n[WARNING] set the DEBUG_BUSYLOCK par meter in kernel_config.h"1439 " to display busylocks for thread %x/%x\n", thread_cxy, thread_ptr);1436 printk("\n[WARNING] set the DEBUG_BUSYLOCK parameter in kernel_config.h" 1437 " to display busylocks for thread(%x,%x)\n", pid, trdid ); 1440 1438 1441 1439 } // end thread_display_busylock()
Note: See TracChangeset
for help on using the changeset viewer.