Changeset 666 for trunk/kernel/libk/queuelock.c
- Timestamp:
- Oct 10, 2020, 5:27:12 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/queuelock.c
r629 r666 47 47 #if DEBUG_QUEUELOCK_TYPE 48 48 thread_t * this = CURRENT_THREAD; 49 if( (type == DEBUG_QUEUELOCK_TYPE) && 50 (lock == DEBUG_QUEUELOCK_PTR ) && 51 (local_cxy == DEBUG_QUEUELOCK_CXY ) ) 52 printk("\n[%s] thread[%x,%x] initialise lock %s [%x,%x]\n", 49 bool_t cond = (type == DEBUG_QUEUELOCK_TYPE) && 50 (((local_cxy == (cxy_t)DEBUG_QUEUELOCK_CXY) && 51 (lock == (queuelock_t*)DEBUG_QUEUELOCK_PTR)) || 52 ((DEBUG_QUEUELOCK_CXY == 0) && 53 (DEBUG_QUEUELOCK_PTR == 0))); 54 if( cond ) printk("\n[%s] thread[%x,%x] initialise lock %s [%x,%x]\n", 53 55 __FUNCTION__, this->process->pid, this->trdid, 54 56 lock_type_str[type], local_cxy, lock ); … … 70 72 #if DEBUG_QUEUELOCK_TYPE 71 73 uint32_t lock_type = lock->lock.type; 74 bool_t cond = (lock_type == DEBUG_QUEUELOCK_TYPE) && 75 (((local_cxy == (cxy_t)DEBUG_QUEUELOCK_CXY) && 76 (lock == (queuelock_t*)DEBUG_QUEUELOCK_PTR)) || 77 ((DEBUG_QUEUELOCK_CXY == 0) && 78 (DEBUG_QUEUELOCK_PTR == 0))); 72 79 #endif 73 80 … … 77 84 78 85 #if DEBUG_QUEUELOCK_TYPE 79 if( (lock_type == DEBUG_QUEUELOCK_TYPE) && 80 (lock == DEBUG_QUEUELOCK_PTR ) && 81 (local_cxy == DEBUG_QUEUELOCK_CXY ) ) 82 printk("\n[%s ] thread[%x,%x] BLOCK on q_lock %s [%x,%x]\n", 86 if( cond ) printk("\n[%s ] thread[%x,%x] BLOCK on q_lock %s [%x,%x]\n", 83 87 __FUNCTION__, this->process->pid, this->trdid, 84 88 lock_type_str[lock_type], local_cxy, lock ); … … 104 108 105 109 #if DEBUG_QUEUELOCK_TYPE 106 if( (lock_type == DEBUG_QUEUELOCK_TYPE) && 107 (lock == DEBUG_QUEUELOCK_PTR ) && 108 (local_cxy == DEBUG_QUEUELOCK_CXY ) ) 109 printk("\n[%s] thread[%x,%x] ACQUIRE q_lock %s [%x,%x]\n", 110 if( cond ) printk("\n[%s] thread[%x,%x] ACQUIRE q_lock %s [%x,%x]\n", 110 111 __FUNCTION__, this->process->pid, this->trdid, 111 112 lock_type_str[lock_type], local_cxy, lock ); … … 132 133 uint32_t lock_type = lock->lock.type; 133 134 thread_t * this = CURRENT_THREAD; 134 if( (lock_type == DEBUG_QUEUELOCK_TYPE) && 135 (lock == DEBUG_QUEUELOCK_PTR ) && 136 (local_cxy == DEBUG_QUEUELOCK_CXY ) ) 137 printk("\n[%s] thread[%x,%x] RELEASE q_lock %s [%x,%x]\n", 135 bool_t cond = (lock_type == DEBUG_QUEUELOCK_TYPE) && 136 (((local_cxy == (cxy_t)DEBUG_QUEUELOCK_CXY) && 137 (lock == (queuelock_t*)DEBUG_QUEUELOCK_PTR)) || 138 ((DEBUG_QUEUELOCK_CXY == 0) && 139 (DEBUG_QUEUELOCK_PTR == 0))); 140 #endif 141 142 #if DEBUG_QUEUELOCK_TYPE 143 if( cond ) printk("\n[%s] thread[%x,%x] RELEASE q_lock %s [%x,%x]\n", 138 144 __FUNCTION__, this->process->pid, this->trdid, 139 145 lock_type_str[lock_type], local_cxy, lock ); … … 150 156 151 157 #if DEBUG_QUEUELOCK_TYPE 152 if( (lock_type == DEBUG_QUEUELOCK_TYPE) && 153 (lock == DEBUG_QUEUELOCK_PTR ) && 154 (local_cxy == DEBUG_QUEUELOCK_CXY ) ) 155 printk("\n[%s] thread[%x,%x] UNBLOCK thread [%x,%x] / q_lock %s [%x,%x]\n", 158 if( cond ) printk("\n[%s] thread[%x,%x] UNBLOCK thread [%x,%x] / q_lock %s [%x,%x]\n", 156 159 __FUNCTION__, this->process->pid, this->trdid, thread->process->pid, thread->trdid, 157 160 lock_type_str[lock_type], local_cxy, lock );
Note: See TracChangeset
for help on using the changeset viewer.