Changeset 423 for trunk/kernel/libk/remote_spinlock.c
- Timestamp:
- Jan 29, 2018, 5:49:38 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/remote_spinlock.c
r409 r423 34 34 void remote_spinlock_init( xptr_t lock_xp ) 35 35 { 36 remote_spinlock_t * ptr = (remote_spinlock_t *)GET_PTR( lock_xp );36 remote_spinlock_t * ptr = GET_PTR( lock_xp ); 37 37 cxy_t cxy = GET_CXY( lock_xp ); 38 38 39 39 hal_remote_sw ( XPTR( cxy , &ptr->taken ) , 0 ); 40 40 41 #if CONFIG_LOCKS_ CONFIG41 #if CONFIG_LOCKS_DEBUG 42 42 hal_remote_swd( XPTR( cxy , &ptr->owner ) , XPTR_NULL ); 43 43 xlist_entry_init( XPTR( cxy , &ptr->list ) ); … … 53 53 54 54 // get cluster and local pointer on remote_spinlock 55 remote_spinlock_t * lock_ptr = (remote_spinlock_t *)GET_PTR( lock_xp );55 remote_spinlock_t * lock_ptr = GET_PTR( lock_xp ); 56 56 cxy_t lock_cxy = GET_CXY( lock_xp ); 57 57 … … 72 72 return 1; 73 73 } 74 else // success : register lock in thread74 else // success : register lock in local thread 75 75 { 76 76 thread_ptr->remote_locks++; … … 78 78 #if CONFIG_LOCKS_DEBUG 79 79 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , 80 XPTR( thread_cxy , thread_ptr) );80 XPTR( local_cxy , thread_ptr) ); 81 81 xlist_add_first( XPTR( local_cxy , &thread_ptr->xlocks_root ) , 82 82 XPTR( lock_cxy , &lock_ptr->list ) ); … … 97 97 98 98 // get cluster and local pointer on remote_spinlock 99 remote_spinlock_t * lock_ptr = (remote_spinlock_t *)GET_PTR( lock_xp );99 remote_spinlock_t * lock_ptr = GET_PTR( lock_xp ); 100 100 cxy_t lock_cxy = GET_CXY( lock_xp ); 101 101 … … 138 138 { 139 139 // get cluster and local pointer on remote_spinlock 140 remote_spinlock_t * lock_ptr = (remote_spinlock_t *)GET_PTR( lock_xp );140 remote_spinlock_t * lock_ptr = GET_PTR( lock_xp ); 141 141 cxy_t lock_cxy = GET_CXY( lock_xp ); 142 142 … … 167 167 168 168 // get cluster and local pointer on remote_spinlock 169 remote_spinlock_t * lock_ptr = (remote_spinlock_t *)GET_PTR( lock_xp );169 remote_spinlock_t * lock_ptr = GET_PTR( lock_xp ); 170 170 cxy_t lock_cxy = GET_CXY( lock_xp ); 171 171 … … 212 212 { 213 213 // get cluster and local pointer on remote_spinlock 214 remote_spinlock_t * lock_ptr = (remote_spinlock_t *)GET_PTR( lock_xp );214 remote_spinlock_t * lock_ptr = GET_PTR( lock_xp ); 215 215 cxy_t lock_cxy = GET_CXY( lock_xp ); 216 216
Note: See TracChangeset
for help on using the changeset viewer.