Changeset 610 for trunk/kernel/libk/queuelock.c
- Timestamp:
- Dec 27, 2018, 7:38:58 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/queuelock.c
r603 r610 45 45 busylock_init( &lock->lock , type ); 46 46 47 #if DEBUG_QUEUELOCK 47 #if DEBUG_QUEUELOCK_TYPE 48 48 thread_t * this = CURRENT_THREAD; 49 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles())49 if( DEBUG_QUEUELOCK_TYPE == type ) 50 50 printk("\n[%s] thread[%x,%x] initialise lock %s [%x,%x]\n", 51 51 __FUNCTION__, this->process->pid, this->trdid, … … 70 70 { 71 71 72 #if DEBUG_QUEUELOCK 73 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() ) 72 #if DEBUG_QUEUELOCK_TYPE 73 uint32_t lock_type = lock->lock.type; 74 if( DEBUG_QUEUELOCK_TYPE == lock_type ) 74 75 printk("\n[%s ] thread[%x,%x] BLOCK on q_lock %s [%x,%x]\n", 75 76 __FUNCTION__, this->process->pid, this->trdid, 76 lock_type_str[lock ->lock.type], local_cxy, lock );77 lock_type_str[lock_type], local_cxy, lock ); 77 78 #endif 78 79 // get pointer on calling thread … … 95 96 } 96 97 97 #if DEBUG_QUEUELOCK 98 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles())98 #if DEBUG_QUEUELOCK_TYPE 99 if( DEBUG_QUEUELOCK_TYPE == lock_type ) 99 100 printk("\n[%s] thread[%x,%x] ACQUIRE q_lock %s [%x,%x]\n", 100 101 __FUNCTION__, this->process->pid, this->trdid, 101 lock_type_str[lock ->lock.type], local_cxy, lock );102 lock_type_str[lock_type], local_cxy, lock ); 102 103 #endif 103 104 … … 119 120 busylock_acquire( &lock->lock ); 120 121 121 #if DEBUG_QUEUELOCK 122 thread_t * this = CURRENT_THREAD; 123 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() ) 122 #if DEBUG_QUEUELOCK_TYPE 123 uint32_t lock_type = lock->lock.type; 124 thread_t * this = CURRENT_THREAD; 125 if( DEBUG_QUEUELOCK_TYPE == lock_type ) 124 126 printk("\n[%s] thread[%x,%x] RELEASE q_lock %s [%x,%x]\n", 125 127 __FUNCTION__, this->process->pid, this->trdid, 126 lock_type_str[lock ->lock.type], local_cxy, lock );128 lock_type_str[lock_type], local_cxy, lock ); 127 129 #endif 128 130 … … 136 138 thread_t * thread = LIST_FIRST( &lock->root , thread_t , wait_list ); 137 139 138 #if DEBUG_QUEUELOCK 139 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles())140 #if DEBUG_QUEUELOCK_TYPE 141 if( DEBUG_QUEUELOCK_TYPE == lock_type ) 140 142 printk("\n[%s] thread[%x,%x] UNBLOCK thread [%x,%x] / q_lock %s [%x,%x]\n", 141 143 __FUNCTION__, this->process->pid, this->trdid, thread->process->pid, thread->trdid, 142 lock_type_str[lock ->lock.type], local_cxy, lock );144 lock_type_str[lock_type], local_cxy, lock ); 143 145 #endif 144 146 // remove this waiting thread from waiting list
Note: See TracChangeset
for help on using the changeset viewer.