Changeset 624 for trunk/kernel/libk/remote_busylock.c
- Timestamp:
- Mar 12, 2019, 1:37:38 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/remote_busylock.c
r619 r624 2 2 * remote_busylock.c - remote kernel busy-waiting lock implementation. 3 3 * 4 * Authors Alain Greiner (2016,2017,2018 )4 * Authors Alain Greiner (2016,2017,2018,2019) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 87 87 #if DEBUG_BUSYLOCK 88 88 uint32_t type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->type ) ); 89 if( (type != LOCK_CHDEV_TXT0) && 90 ((uint32_t)hal_get_cycles() > DEBUG_BUSYLOCK) ) 89 if( type != LOCK_CHDEV_TXT0 ) 91 90 { 91 // update thread list of busyslocks 92 92 xptr_t root_xp = XPTR( local_cxy , &this->busylocks_root ); 93 94 // update thread list of busyslocks95 93 xlist_add_last( root_xp , XPTR( lock_cxy , &lock_ptr->xlist ) ); 96 94 } 97 95 #endif 98 96 99 #if( DEBUG_BUSYLOCK & & DEBUG_BUSYLOCK_THREAD_XP)97 #if( DEBUG_BUSYLOCK & 1 ) 100 98 if( (type != LOCK_CHDEV_TXT0) && 101 (XPTR( local_cxy , this ) == DEBUG_BUSYLOCK_THREAD_XP) ) 99 (this->process->pid == DEBUG_BUSYLOCK_PID) && 100 (this->trdid == DEBUG_BUSYLOCK_TRDID) ) 102 101 { 103 102 printk("\n[%s] thread[%x,%x] ACQUIRE lock %s\n", … … 131 130 #if DEBUG_BUSYLOCK 132 131 uint32_t type = hal_remote_l32( XPTR( lock_cxy , &lock_ptr->type ) ); 133 if( (type != LOCK_CHDEV_TXT0) && 134 (XPTR( local_cxy , this ) == DEBUG_BUSYLOCK_THREAD_XP) && 135 ((uint32_t)hal_get_cycles() > DEBUG_BUSYLOCK) ) 132 if( type != LOCK_CHDEV_TXT0 ) 136 133 { 137 134 // remove lock from thread list of busyslocks … … 140 137 #endif 141 138 142 #if (DEBUG_BUSYLOCK && DEBUG_BUSYLOCK_THREAD_XP)139 #if( DEBUG_BUSYLOCK & 1 ) 143 140 if( (type != LOCK_CHDEV_TXT0) && 144 (XPTR( local_cxy , this ) == DEBUG_BUSYLOCK_THREAD_XP) ) 141 (this->process->pid == DEBUG_BUSYLOCK_PID) && 142 (this->trdid == DEBUG_BUSYLOCK_TRDID) ) 145 143 { 146 144 printk("\n[%s] thread[%x,%x] RELEASE lock %s\n",
Note: See TracChangeset
for help on using the changeset viewer.