Changeset 580 for trunk/kernel/libk/busylock.c
- Timestamp:
- Oct 8, 2018, 11:31:42 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/busylock.c
r563 r580 77 77 #if DEBUG_BUSYLOCK 78 78 if( (lock->type != LOCK_CHDEV_TXT0) && 79 (XPTR( local_cxy , this ) == DEBUG_BUSYLOCK_THREAD_XP) &&80 79 ((uint32_t)hal_get_cycles() > DEBUG_BUSYLOCK) ) 81 80 { … … 84 83 // update thread list of busylocks 85 84 xlist_add_last( root_xp , XPTR( local_cxy , &lock->xlist ) ); 85 } 86 #endif 86 87 87 // display list of taken locks for the selected thread 88 thread_display_busylocks( lock->type , true ); 88 #if( DEBUG_BUSYLOCK && DEBUG_BUSYLOCK_THREAD_XP ) 89 if( (lock->type != LOCK_CHDEV_TXT0) && 90 (XPTR( local_cxy , this ) == DEBUG_BUSYLOCK_THREAD_XP) ) 91 { 92 // get cluster and local pointer of target thread 93 cxy_t thread_cxy = GET_CXY( DEBUG_BUSYLOCK_THREAD_XP ); 94 thread_t * thread_ptr = GET_PTR( DEBUG_BUSYLOCK_THREAD_XP ); 95 96 // display message on kernel TXT0 97 printk("\n### thread [%x,%x] ACQUIRE lock %s\n", 98 thread_cxy, thread_ptr, lock_type_str[lock->type] ); 89 99 } 90 100 #endif … … 111 121 #if DEBUG_BUSYLOCK 112 122 if( (lock->type != LOCK_CHDEV_TXT0) && 113 (XPTR( local_cxy , this ) == DEBUG_BUSYLOCK_THREAD_XP) &&114 123 ((uint32_t)hal_get_cycles() > DEBUG_BUSYLOCK) ) 115 124 { 116 125 // remove lock from thread list of busylocks 117 126 xlist_unlink( XPTR( local_cxy , &lock->xlist ) ); 127 } 128 #endif 118 129 119 // display list of taken locks for the selected thread 120 thread_display_busylocks( lock->type , false ); 130 #if( DEBUG_BUSYLOCK && DEBUG_BUSYLOCK_THREAD_XP ) 131 if( (lock->type != LOCK_CHDEV_TXT0) && 132 (XPTR( local_cxy , this ) == DEBUG_BUSYLOCK_THREAD_XP) ) 133 { 134 // get cluster and local pointer of target thread 135 cxy_t thread_cxy = GET_CXY( DEBUG_BUSYLOCK_THREAD_XP ); 136 thread_t * thread_ptr = GET_PTR( DEBUG_BUSYLOCK_THREAD_XP ); 137 138 // display message on kernel TXT0 139 printk("\n### thread [%x,%x] RELEASE lock %s\n", 140 thread_cxy, thread_ptr, lock_type_str[lock->type] ); 121 141 } 122 142 #endif
Note: See TracChangeset
for help on using the changeset viewer.