Changeset 600 for trunk/kernel/libk/remote_queuelock.c
- Timestamp:
- Nov 10, 2018, 5:38:51 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/remote_queuelock.c
r563 r600 67 67 remote_queuelock_t * lock_ptr = GET_PTR( lock_xp ); 68 68 69 #if DEBUG_QUEUELOCK 70 uint32_t lock_type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 71 #endif 72 69 73 // build extended pointer on busylock protecting queuelock 70 74 xptr_t busylock_xp = XPTR( lock_cxy , &lock_ptr->lock ); … … 79 83 #if DEBUG_QUEUELOCK 80 84 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() ) 81 { 82 uint32_t type = hal_remote_l32( XPTR( lock_cxy , &locr_ptr->lock.type ) ); 83 printk("\n[DBG] %s : thread %x in process %x BLOCK on q_lock %s [%x,%x]\n", 84 __FUNCTION__, this->trdid, this->process->pid, 85 lock_type_str[type], lock_cxy, lock_ptr ); 86 } 85 printk("\n[%s] thread[%x,%x] BLOCK on q_lock %s [%x,%x]\n", 86 __FUNCTION__, this->process->pid, this->trdid, 87 lock_type_str[lock_type], lock_cxy, lock_ptr ); 87 88 #endif 88 89 // get pointer on calling thread … … 108 109 #if DEBUG_QUEUELOCK 109 110 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() ) 110 { 111 uint32_t type = hal_remote_l32( XPTR( lock_cxy , &locr_ptr->lock.type ) ); 112 printk("\n[DBG] %s : thread %x in process %x ACQUIRE q_lock %s [%x,%x]\n", 113 __FUNCTION__, this->trdid, this->process->pid, 114 lock_type_str[type], lock_cxy, lock_ptr ); 115 } 111 printk("\n[%s] thread[%x,%x] ACQUIRE q_lock %s [%x,%x]\n", 112 __FUNCTION__, this->process->pid, this->trdid, 113 lock_type_str[lock_type], lock_cxy, lock_ptr ); 116 114 #endif 117 115 … … 141 139 142 140 #if DEBUG_QUEUELOCK 141 thread_t * this = CURRENT_THREAD; 142 uint32_t lock_type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 143 143 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() ) 144 { 145 thread_t * this = CURRENT_THREAD; 146 uint32_t type = hal_remote_l32( XPTR( lock_cxy , &locr_ptr->lock.type ) ); 147 printk("\n[DBG] %s : thread %x in process %x RELEASE q_lock %s (%x,%x)\n", 148 __FUNCTION__, this->trdid, this->process->pid, 149 lock_type_str[type], lock_cxy, lock_ptr ); 150 } 144 printk("\n[%s] thread[%x,%x] RELEASE q_lock %s (%x,%x)\n", 145 __FUNCTION__, this->process->pid, this->trdid, 146 lock_type_str[lock_type], lock_cxy, lock_ptr ); 151 147 #endif 152 148 … … 166 162 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() ) 167 163 { 168 thread_t * this = CURRENT_THREAD;169 uint32_t type = hal_remote_l32( XPTR( lock_cxy , &locr_ptr->lock.type ) );170 164 trdid_t trdid = hal_remote_l32( XPTR( thread_cxy , &thread_ptr->trdid ) ); 171 165 process_t * process = hal_remote_lpt( XPTR( thread_cxy , &thread_ptr->process ) ); 172 166 pid_t pid = hal_remote_l32( XPTR( thread_cxy , &process->pid ) ); 173 printk("\n[DBG] %s : thread %x in process %x UNBLOCK thread %x in process %d" 174 " / q_lock %s [%x,%x]\n", 175 __FUNCTION__, this->trdid, this->process->pid, trdid, pid, 176 lock_type_str[type], lock_cxy, lock_ptr ); 167 printk("\n[%s] thread[%x,%x] UNBLOCK thread[%x,%x] / q_lock %s [%x,%x]\n", 168 __FUNCTION__, this->process->pid, this->trdid, trdid, pid, 169 lock_type_str[lock_type], lock_cxy, lock_ptr ); 177 170 } 178 171 #endif
Note: See TracChangeset
for help on using the changeset viewer.