Changeset 600
- Timestamp:
- Nov 10, 2018, 5:38:51 PM (6 years ago)
- Location:
- trunk/kernel/libk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/busylock.c
r580 r600 95 95 96 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] );97 printk("\n[%s] thread[%x,%x] ACQUIRE lock %s\n", 98 __FUNCTION__, this->process->pid, this->trdid, lock_type_str[lock->type] ); 99 99 } 100 100 #endif … … 137 137 138 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] );139 printk("\n[%s] thread[%x,%x] RELEASE lock %s\n", 140 __FUNCTION__, this->process->pid, this->trdid, lock_type_str[lock->type] ); 141 141 } 142 142 #endif -
trunk/kernel/libk/queuelock.c
r563 r600 63 63 #if DEBUG_QUEUELOCK 64 64 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() ) 65 { 66 printk("\n[DBG] %s : thread %x in process %x BLOCK on q_lock %s [%x,%x]\n", 67 __FUNCTION__, this->trdid, this->process->pid, 68 lock_type_str[lock->lock.type], local_cxy, lock ); 69 } 65 printk("\n[%s ] thread[%x,%x] BLOCK on q_lock %s [%x,%x]\n", 66 __FUNCTION__, this->process->pid, this->trdid, lock_type_str[lock->lock.type], local_cxy, lock ); 70 67 #endif 71 68 // get pointer on calling thread … … 90 87 #if DEBUG_QUEUELOCK 91 88 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() ) 92 { 93 printk("\n[DBG] %s : thread %x in process %x ACQUIRE q_lock %s [%x,%x]\n", 94 __FUNCTION__, this->trdid, this->process->pid, 95 lock_type_str[lock->lock.type], local_cxy, lock ); 96 } 89 printk("\n[%s] thread[%x,%x] ACQUIRE q_lock %s [%x,%x]\n", 90 __FUNCTION__, this->process->pid, this->trdid, lock_type_str[lock->lock.type], local_cxy, lock ); 97 91 #endif 98 92 … … 115 109 116 110 #if DEBUG_QUEUELOCK 111 thread_t * this = CURRENT_THREAD; 117 112 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() ) 118 { 119 thread_t * this = CURRENT_THREAD; 120 printk("\n[DBG] %s : thread %x in %x process RELEASE q_lock %s [%x,%x]\n", 121 __FUNCTION__, this->trdid, this->process->pid, 122 lock_type_str[lock->lock.type], local_cxy, lock ); 123 } 113 printk("\n[%s] thread[%x,%x] RELEASE q_lock %s [%x,%x]\n", 114 __FUNCTION__, this->process->pid, this->trdid, lock_type_str[lock->lock.type], local_cxy, lock ); 124 115 #endif 125 116 … … 135 126 #if DEBUG_QUEUELOCK 136 127 if( DEBUG_QUEUELOCK < (uint32_t)hal_get_cycles() ) 137 { 138 thread_t * this = CURRENT_THREAD; 139 printk("\n[DBG] %s : thread %x in process %x UNBLOCK thread %x in process %x" 140 " / q_lock %s [%x,%x]\n", 141 __FUNCTION__, this->trdid, this->process->pid, thread->trdid, thread->process->pid, 142 lock_type_str[lock->lock.type], local_cxy, lock ); 143 } 128 printk("\n[%s] thread[%x,%x] UNBLOCK thread [%x,%x] / q_lock %s [%x,%x]\n", 129 __FUNCTION__, this->process->pid, this->trdid, thread->process->pid, thread->trdid, 130 lock_type_str[lock->lock.type], local_cxy, lock ); 144 131 #endif 145 132 // remove this waiting thread from waiting list -
trunk/kernel/libk/remote_busylock.c
r580 r600 106 106 107 107 // display message on kernel TXT0 108 printk("\n ### thread[%x,%x] ACQUIRE lock %s\n",109 thread_cxy, thread_ptr, lock_type_str[type] );108 printk("\n[%s] thread[%x,%x] ACQUIRE lock %s\n", 109 __FUNCTION_, this->process->pid, this->trdid, lock_type_str[type] ); 110 110 } 111 111 #endif … … 154 154 155 155 // display message on kernel TXT0 156 printk("\n ### thread[%x,%x] RELEASE lock %s\n",157 thread_cxy, thread_ptr, lock_type_str[type] );156 printk("\n[%s] thread[%x,%x] RELEASE lock %s\n", 157 __FUNCTION__, this->process->pid, this->trdid, lock_type_str[type] ); 158 158 } 159 159 #endif -
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 -
trunk/kernel/libk/remote_rwlock.c
r563 r600 1 1 /* 2 * remote_rwlock.c - kernel remote r wlock implementation.2 * remote_rwlock.c - kernel remote read/write lock implementation. 3 3 * 4 4 * Authors Alain Greiner (2016,2017,2018) … … 66 66 cxy_t lock_cxy = GET_CXY( lock_xp ); 67 67 68 #if DEBUG_RWLOCK 69 uint32_t lock_type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 70 #endif 71 68 72 // build useful extended pointers 69 73 xptr_t busylock_xp = XPTR( lock_cxy , &lock_ptr->lock ); … … 81 85 #if DEBUG_RWLOCK 82 86 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 83 { 84 uint32_t type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 85 printk("\n[DBG] %s : thread %x (%s) READ BLOCK on rwlock %s [%x,%x] / cycle %d\n", 86 __FUNCTION__, this->trdid, thread_type_str(this->type), 87 lock_type_str[type], lock_cxy, lock_ptr, (uint32_t)hal_get_cycles() ); 88 } 87 printk("\n[%s] thread[%x,%x] READ BLOCK on rwlock %s [%x,%x]\n", 88 __FUNCTION__, this->process->pid, this->trdid, 89 lock_type_str[lock_type], lock_cxy, lock_ptr ); 89 90 #endif 90 91 // get pointer on calling thread … … 109 110 #if DEBUG_RWLOCK 110 111 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 111 { 112 uint32_t type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 113 printk("\n[DBG] %s : thread %x (%s) READ ACQUIRE on rwlock %s [%x,%x] / cycle %d\n", 114 __FUNCTION__, this->trdid, thread_type_str(this->type), 115 lock_type_str[type], lock_cxy, lock_ptr, (uint32_t)hal_get_cycles() ); 116 } 112 printk("\n[%s] thread[%x,%x] READ ACQUIRE rwlock %s [%x,%x]\n", 113 __FUNCTION__, this->process->pid, this->trdid, 114 lock_type_str[lock_type], lock_cxy, lock_ptr ); 117 115 #endif 118 116 … … 136 134 remote_rwlock_t * lock_ptr = GET_PTR( lock_xp ); 137 135 cxy_t lock_cxy = GET_CXY( lock_xp ); 136 137 #if DEBUG_RWLOCK 138 uint32_t lock_type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 139 #endif 138 140 139 141 // build useful extended pointers … … 152 154 #if DEBUG_RWLOCK 153 155 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 154 { 155 uint32_t type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 156 printk("\n[DBG] %s : thread %x (%s) WRITE BLOCK on rwlock %s [%x,%x] / cycle %d\n", 157 __FUNCTION__, this->trdid, thread_type_str(this->type), 158 lock_type_str[type], lock_cxy, lock_ptr, (uint32_t)hal_get_cycles() ); 159 } 156 printk("\n[%s] thread[%x,%x] WRITE BLOCK on rwlock %s [%x,%x]\n", 157 __FUNCTION__, this->process->pid, this->trdid, 158 lock_type_str[lock_type], lock_cxy, lock_ptr ); 160 159 #endif 161 160 // get local pointer on calling thread … … 180 179 #if DEBUG_RWLOCK 181 180 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 182 { 183 uint32_t type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 184 printk("\n[DBG] %s : thread %x (%s) WRITE ACQUIRE on rwlock %s [%x,%x] / cycle %d\n", 185 __FUNCTION__, this->trdid, thread_type_str(this->type), 186 lock_type_str[type], lock_cxy, lock_ptr, (uint32_t)hal_get_cycles() ); 187 } 181 printk("\n[%s] thread[%x,%x] WRITE ACQUIRE rwlock %s [%x,%x]\n", 182 __FUNCTION__, this->process->pid, this->trdid, 183 lock_type_str[lock_type], lock_cxy, lock_ptr ); 188 184 #endif 189 185 … … 217 213 218 214 #if DEBUG_RWLOCK 219 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 220 { 221 thread_t * this = CURRENT_THREAD; 222 uint32_t type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 223 printk("\n[DBG] %s : thread %x (%s) READ RELEASE on rwlock %s [%x,%x] / cycle %d\n", 224 __FUNCTION__, this->trdid, thread_type_str(this->type), 225 lock_type_str[type], lock_cxy, lock_ptr, (uint32_t)hal_get_cycles() ); 226 } 215 thread_t * this = CURRENT_THREAD; 216 uint32_t lock_type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 217 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 218 printk("\n[%s] thread[%x,%x] READ RELEASE rwlock %s [%x,%x]\n", 219 __FUNCTION__, this->process->pid, this->trdid, 220 lock_type_str[lock_type], lock_cxy, lock_ptr ); 227 221 #endif 228 222 … … 248 242 if( (uint32_t)hal_get_cycles() > DEBUG_RWLOCK ) 249 243 { 250 thread_t * this = CURRENT_THREAD; 251 uint32_t lock_type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 252 trdid_t trdid = hal_remote_l32( XPTR( thread_cxy , &thread_ptr->trdid ) ); 253 uint32_t thread_type = hal_remote_lpt( XPTR( thread_cxy , &thread_ptr->type ) ); 254 printk("\n[DBG] %s : thread %x (%s) UNBLOCK thread %x (%s)" 255 " / rwlock %s [%x,%x] / cycle %d\n", 256 __FUNCTION__, this->trdid, thread_type_str(this->type), trdid, thread_type_str(thread_type), 257 lock_type_str[lock_type], lock_cxy, lock_ptr, (uint32_t)hal_get_cycles() ); 244 trdid_t trdid = hal_remote_l32( XPTR( thread_cxy , &thread_ptr->trdid ) ); 245 process_t * process = hal_remote_lpt( XPTR( thread_cxy , &thread_ptr->process ) ); 246 uint32_t pid = hal_remote_l32( XPTR( thread_cxy , &process->pid ) ); 247 printk("\n[%s] thread[%x,%x] UNBLOCK thread[%x,%x] / rwlock %s [%x,%x]\n", 248 __FUNCTION__, this->process->pid, this->trdid, pid, trdid, 249 lock_type_str[lock_type], lock_cxy, lock_ptr ); 258 250 } 259 251 #endif … … 281 273 if( (uint32_t)hal_get_cycles() > DEBUG_RWLOCK ) 282 274 { 283 thread_t * this = CURRENT_THREAD; 284 uint32_t lock_type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 285 trdid_t trdid = hal_remote_l32( XPTR( thread_cxy , &thread_ptr->trdid ) ); 286 uint32_t thread_type = hal_remote_lpt( XPTR( thread_cxy , &thread_ptr->type ) ); 287 printk("\n[DBG] %s : thread %x (%s) UNBLOCK thread %x (%s)" 288 " / rwlock %s [%x,%x] / cycle %d\n", 289 __FUNCTION__, this->trdid, thread_type_str(this->type), trdid, thread_type_str(thread_type), 290 lock_type_str[lock_type], lock_cxy, lock_ptr, (uint32_t)hal_get_cycles() ); 275 trdid_t trdid = hal_remote_l32( XPTR( thread_cxy , &thread_ptr->trdid ) ); 276 process_t * process = hal_remote_lpt( XPTR( thread_cxy , &thread_ptr->process ) ); 277 uint32_t pid = hal_remote_l32( XPTR( thread_cxy , &process->pid ) ); 278 printk("\n[%s] thread[%x,%x] UNBLOCK thread[%x,%x] / rwlock %s [%x,%x]\n", 279 __FUNCTION__, this->process->pid, this->trdid, pid, trdid, 280 lock_type_str[lock_type], lock_cxy, lock_ptr ); 291 281 } 292 282 #endif … … 320 310 321 311 #if DEBUG_RWLOCK 322 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 323 { 324 thread_t * this = CURRENT_THREAD; 325 uint32_t type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 326 printk("\n[DBG] %s : thread %x (%s) WRITE RELEASE on rwlock %s [%x,%x] / cycle %d\n", 327 __FUNCTION__, this->trdid, thread_type_str(this->type), 328 lock_type_str[type], lock_cxy, lock_ptr, (uint32_t)hal_get_cycles() ); 329 } 312 thread_t * this = CURRENT_THREAD; 313 uint32_t lock_type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 314 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 315 printk("\n[%s] thread[%x,%x] WRITE RELEASE rwlock %s [%x,%x]\n", 316 __FUNCTION__, this->process->pid, this->trdid, 317 lock_type_str[lock_type], lock_cxy, lock_ptr ); 330 318 #endif 331 319 … … 350 338 if( (uint32_t)hal_get_cycles() > DEBUG_RWLOCK ) 351 339 { 352 thread_t * this = CURRENT_THREAD; 353 uint32_t lock_type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 354 trdid_t trdid = hal_remote_l32( XPTR( thread_cxy , &thread_ptr->trdid ) ); 355 uint32_t thread_type = hal_remote_lpt( XPTR( thread_cxy , &thread_ptr->type ) ); 356 printk("\n[DBG] %s : thread %x (%s) UNBLOCK thread %x (%s)" 357 " / rwlock %s [%x,%x] / cycle %d\n", 358 __FUNCTION__, this->trdid, thread_type_str(this->type), trdid, thread_type_str(thread_type), 359 lock_type_str[lock_type], lock_cxy, lock_ptr, (uint32_t)hal_get_cycles() ); 340 trdid_t trdid = hal_remote_l32( XPTR( thread_cxy , &thread_ptr->trdid ) ); 341 process_t * process = hal_remote_lpt( XPTR( thread_cxy , &thread_ptr->process ) ); 342 uint32_t pid = hal_remote_l32( XPTR( thread_cxy , &process->pid ) ); 343 printk("\n[%s] thread[%x,%x] UNBLOCK thread[%x,%x] / rwlock %s [%x,%x]\n", 344 __FUNCTION__, this->process->pid, this->trdid, pid, trdid, 345 lock_type_str[lock_type], lock_cxy, lock_ptr ); 360 346 } 361 347 #endif … … 382 368 if( (uint32_t)hal_get_cycles() > DEBUG_RWLOCK ) 383 369 { 384 thread_t * this = CURRENT_THREAD; 385 uint32_t lock_type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->lock.type ) ); 386 trdid_t trdid = hal_remote_l32( XPTR( thread_cxy , &thread_ptr->trdid ) ); 387 uint32_t thread_type = hal_remote_lpt( XPTR( thread_cxy , &thread_ptr->type ) ); 388 printk("\n[DBG] %s : thread %x (%s) UNBLOCK thread %x (%s)" 389 " / rwlock %s [%x,%x] / cycle %d\n", 390 __FUNCTION__, this->trdid, thread_type_str(this->type), trdid, thread_type_str(thread_type), 391 lock_type_str[lock_type], lock_cxy, lock_ptr, (uint32_t)hal_get_cycles() ); 370 trdid_t trdid = hal_remote_l32( XPTR( thread_cxy , &thread_ptr->trdid ) ); 371 process_t * process = hal_remote_lpt( XPTR( thread_cxy , &thread_ptr->process ) ); 372 uint32_t pid = hal_remote_l32( XPTR( thread_cxy , &process->pid ) ); 373 printk("\n[%s] thread[%x,%x] UNBLOCK thread[%x,%x] / rwlock %s [%x,%x]\n", 374 __FUNCTION__, this->process->pid, this->trdid, pid, trdid, 375 lock_type_str[lock_type], lock_cxy, lock_ptr ); 392 376 } 393 377 #endif -
trunk/kernel/libk/rwlock.c
r563 r600 68 68 #if DEBUG_RWLOCK 69 69 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 70 { 71 printk("\n[DBG] %s : thread %x in process %x READ BLOCK on rwlock %s [%x,%x]\n", 72 __FUNCTION__, this->trdid, this->process->pid, 73 lock_type_str[lock->lock.type], local_cxy, lock ); 74 } 75 #endif 76 // get pointer on calling thread 77 thread_t * this = CURRENT_THREAD; 78 70 printk("\n[%s] thread[%x,%x] READ BLOCK on rwlock %s [%x,%x]\n", 71 __FUNCTION__, this->process->pid, this->trdid, 72 lock_type_str[lock->lock.type], local_cxy, lock ); 73 #endif 79 74 // register reader thread in waiting queue 80 75 list_add_last( &lock->rd_root , &this->wait_list ); … … 95 90 #if DEBUG_RWLOCK 96 91 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 97 { 98 printk("\n[DBG] %s : thread %x in process READ ACQUIRE on rwlock %s [%x,%x]\n", 99 __FUNCTION__, this->trdid, this->process->pid, 100 lock_type_str[lock->lock.type], local_cxy, lock ); 101 } 92 printk("\n[%s] thread[%x,%x] READ ACQUIRE rwlock %s [%x,%x]\n", 93 __FUNCTION__, this->process->pid, this->trdid, 94 lock_type_str[lock->lock.type], local_cxy, lock ); 102 95 #endif 103 96 … … 127 120 #if DEBUG_RWLOCK 128 121 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 129 { 130 printk("\n[DBG] %s : thread %x in process WRITE BLOCK on rwlock %s [%x,%x]\n", 131 __FUNCTION__, this->trdid, this->process->pid, 132 lock_type_str[lock->lock.type], local_cxy, lock ); 133 } 134 #endif 135 // get pointer on calling thread 136 thread_t * this = CURRENT_THREAD; 137 122 printk("\n[%s] thread[%x,%x] WRITE BLOCK on rwlock %s [%x,%x]\n", 123 __FUNCTION__, this->process->pid, this->trdid, 124 lock_type_str[lock->lock.type], local_cxy, lock ); 125 #endif 138 126 // register writer in waiting queue 139 127 list_add_last( &lock->wr_root , &this->wait_list ); … … 154 142 #if DEBUG_RWLOCK 155 143 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 156 { 157 printk("\n[DBG] %s : thread %x in process WRITE ACQUIRE on rwlock %s [%x,%x]\n", 158 __FUNCTION__, this->trdid, this->process->pid, 159 lock_type_str[lock->lock.type], local_cxy, lock ); 160 } 144 printk("\n[%s] thread[%x,%x] WRITE ACQUIRE rwlock %s [%x,%x]\n", 145 __FUNCTION__, this->process->pid, this->trdid, 146 lock_type_str[lock->lock.type], local_cxy, lock ); 161 147 #endif 162 148 … … 179 165 180 166 #if DEBUG_RWLOCK 181 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 182 { 183 thread_t * this = CURRENT_THREAD; 184 printk("\n[DBG] %s : thread %x in process READ RELEASE on rwlock %s [%x,%x]\n", 185 __FUNCTION__, this->trdid, this->process->pid, 186 lock_type_str[lock->lock.type], local_cxy, lock ); 187 } 167 thread_t * this = CURRENT_THREAD; 168 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 169 printk("\n[%s] thread[%x,%x] READ RELEASE rwlock %s [%x,%x]\n", 170 __FUNCTION__, this->process->pid, this->trdid, 171 lock_type_str[lock->lock.type], local_cxy, lock ); 188 172 #endif 189 173 … … 200 184 #if DEBUG_RWLOCK 201 185 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 202 { 203 thread_t * this = CURRENT_THREAD; 204 printk("\n[DBG] %s : thread %x in process %x UNBLOCK thread %x in process %d" 205 " / rwlock %s [%x,%x]\n", 206 __FUNCTION__, this->trdid, this->process->pid, thread->trdid, thread->process->pid, 207 lock_type_str[lock->lock.type], local_cxy, lock ); 208 } 186 printk("\n[%s] thread[%x,%x] UNBLOCK thread[%x,%x] / rwlock %s [%x,%x]\n", 187 __FUNCTION__, this->process->pid, this->trdid, thread->process->pid, thread->trdid, 188 lock_type_str[lock->lock.type], local_cxy, lock ); 209 189 #endif 210 190 … … 226 206 #if DEBUG_RWLOCK 227 207 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 228 { 229 thread_t * this = CURRENT_THREAD; 230 printk("\n[DBG] %s : thread %x in process %x UNBLOCK thread %x in process %d" 231 " / rwlock %s [%x,%x]\n", 232 __FUNCTION__, this->trdid, this->process->pid, thread->trdid, thread->process->pid, 233 lock_type_str[lock->lock.type], local_cxy, lock ); 234 } 208 printk("\n[%s] thread[%x,%x] UNBLOCK thread[%x,%x] / rwlock %s [%x,%x]\n", 209 __FUNCTION__, this->process->pid, this->trdid, thread->process->pid, thread->trdid, 210 lock_type_str[lock->lock.type], local_cxy, lock ); 235 211 #endif 236 212 … … 258 234 259 235 #if DEBUG_RWLOCK 260 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 261 { 262 thread_t * this = CURRENT_THREAD; 263 printk("\n[DBG] %s : thread %x in process WRITE RELEASE on rwlock %s [%x,%x]\n", 264 __FUNCTION__, this->trdid, this->process->pid, 265 lock_type_str[lock->lock.type], local_cxy, lock ); 266 } 236 thread_t * this = CURRENT_THREAD; 237 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 238 printk("\n[%s] thread[%x,%x] WRITE RELEASE rwlock %s [%x,%x]\n", 239 __FUNCTION__, this->process->pid, this->trdid, 240 lock_type_str[lock->lock.type], local_cxy, lock ); 267 241 #endif 268 242 … … 278 252 #if DEBUG_RWLOCK 279 253 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 280 { 281 thread_t * this = CURRENT_THREAD; 282 printk("\n[DBG] %s : thread %x in process %x UNBLOCK thread %x in process %d" 283 " / rwlock %s [%x,%x]\n", 284 __FUNCTION__, this->trdid, this->process->pid, thread->trdid, thread->process->pid, 285 lock_type_str[lock->lock.type], local_cxy, lock ); 286 } 254 printk("\n[%s] thread[%x,%x] UNBLOCK thread[%x,%x] / rwlock %s [%x,%x]\n", 255 __FUNCTION__, this->process->pid, this->trdid, thread->process->pid, thread->trdid, 256 lock_type_str[lock->lock.type], local_cxy, lock ); 287 257 #endif 288 258 // remove this waiting thread from waiting list … … 303 273 #if DEBUG_RWLOCK 304 274 if( DEBUG_RWLOCK < (uint32_t)hal_get_cycles() ) 305 { 306 thread_t * this = CURRENT_THREAD; 307 printk("\n[DBG] %s : thread %x in process %x UNBLOCK thread %x in process %d" 308 " / rwlock %s [%x,%x]\n", 309 __FUNCTION__, this->trdid, this->process->pid, thread->trdid, thread->process->pid, 310 lock_type_str[lock->lock.type], local_cxy, lock ); 311 } 275 printk("\n[%s] thread[%x,%x] UNBLOCK thread[%x,%x] / rwlock %s [%x,%x]\n", 276 __FUNCTION__, this->process->pid, this->trdid, thread->process->pid, thread->trdid, 277 lock_type_str[lock->lock.type], local_cxy, lock ); 312 278 #endif 313 279 // remove this waiting thread from waiting list
Note: See TracChangeset
for help on using the changeset viewer.