Changeset 436 for trunk/kernel/libk/remote_spinlock.c
- Timestamp:
- Mar 7, 2018, 9:02:03 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/remote_spinlock.c
r433 r436 2 2 * remote_spinlock.c - kernel remote spinlock implementation. 3 3 * 4 * Authors Mohamed Karaoui (2015) 5 * Alain Greiner (2016) 4 * Authors Alain Greiner (2016,2017,2018) 6 5 * 7 6 * Copyright (c) UPMC Sorbonne Universites … … 39 38 hal_remote_sw ( XPTR( cxy , &ptr->taken ) , 0 ); 40 39 41 #if CONFIG_DEBUG_ LOCKS42 43 40 #if CONFIG_DEBUG_REMOTE_SPINLOCKS 41 hal_remote_swd( XPTR( cxy , &ptr->owner ) , XPTR_NULL ); 42 xlist_entry_init( XPTR( cxy , &ptr->list ) ); 44 43 #endif 45 44 … … 76 75 thread_ptr->remote_locks++; 77 76 78 #if CONFIG_DEBUG_ LOCKS79 80 81 82 77 #if CONFIG_DEBUG_REMOTE_SPINLOCKS 78 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , 79 XPTR( local_cxy , thread_ptr) ); 80 xlist_add_first( XPTR( local_cxy , &thread_ptr->xlocks_root ) , 81 XPTR( lock_cxy , &lock_ptr->list ) ); 83 82 #endif 84 83 … … 121 120 thread_ptr->remote_locks++; 122 121 123 #if CONFIG_DEBUG_ LOCKS124 125 126 127 122 #if CONFIG_DEBUG_REMOTE_SPINLOCKS 123 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , 124 XPTR( local_cxy , thread_ptr) ); 125 xlist_add_first( XPTR( local_cxy , &thread_ptr->xlocks_root ) , 126 XPTR( lock_cxy , &lock_ptr->list ) ); 128 127 #endif 129 128 … … 144 143 thread_t * thread_ptr = CURRENT_THREAD; 145 144 146 #if CONFIG_DEBUG_ LOCKS147 148 145 #if CONFIG_DEBUG_REMOTE_SPINLOCKS 146 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , XPTR_NULL ); 147 xlist_unlink( XPTR( lock_cxy , &lock_ptr->list ) ); 149 148 #endif 150 149 … … 197 196 thread_ptr->remote_locks++; 198 197 199 #if CONFIG_DEBUG_LOCKS 200 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , 201 XPTR( local_cxy , thread_ptr) ); 202 xlist_add_first( XPTR( local_cxy , &thread_ptr->xlocks_root ) , 203 XPTR( lock_cxy , &lock_ptr->list ) ); 198 #if CONFIG_DEBUG_REMOTE_SPINLOCKS 199 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ), 200 XPTR( local_cxy , thread_ptr) ); 201 xlist_add_first( XPTR( local_cxy , &thread_ptr->xlocks_root ), 202 XPTR( lock_cxy , &lock_ptr->list ) ); 203 204 // if( (uint32_t)lock_ptr == 0x66788 ) 205 // printk("\n@@@ %s : thread %x takes remote_spinlock %x\n", 206 //__FUNCTION__, thread_ptr, lock_ptr ); 207 204 208 #endif 205 209 … … 218 222 thread_t * thread_ptr = CURRENT_THREAD; 219 223 220 #if CONFIG_DEBUG_LOCKS 221 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , XPTR_NULL ); 222 xlist_unlink( XPTR( lock_cxy , &lock_ptr->list ) ); 224 #if CONFIG_DEBUG_REMOTE_SPINLOCKS 225 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , XPTR_NULL ); 226 xlist_unlink( XPTR( lock_cxy , &lock_ptr->list ) ); 227 228 // if( (uint32_t)lock_ptr == 0x66788 ) 229 // printk("\n@@@ %s : thread %x releases remote_spinlock %x\n", 230 // __FUNCTION__, thread_ptr, lock_ptr ); 231 223 232 #endif 224 233
Note: See TracChangeset
for help on using the changeset viewer.