Ignore:
Timestamp:
Jun 29, 2017, 4:44:52 PM (7 years ago)
Author:
alain
Message:

euh...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/libk/remote_spinlock.c

    r93 r101  
    162162        cxy_t               lock_cxy = GET_CXY( lock_xp );
    163163
    164         // get cluster and local pointer on local thread
    165         cxy_t               thread_cxy = local_cxy;
    166         thread_t          * thread_ptr = CURRENT_THREAD;
     164    // get cluster and local pointer on calling thread
     165    cxy_t               thread_cxy = local_cxy;
     166    thread_t          * thread_ptr = CURRENT_THREAD;
    167167
    168168        // disable interrupts
     
    219219}
    220220
     221//////////////////////////////////////////////
     222xptr_t remote_spinlock_owner( xptr_t lock_xp )
     223{
     224    // get cluster and local pointer on remote_spinlock
     225    remote_spinlock_t * lock_ptr = (remote_spinlock_t *)GET_PTR( lock_xp );
     226    cxy_t               lock_cxy = GET_CXY( lock_xp );
     227
     228    return hal_remote_lw( XPTR( lock_cxy , &lock_ptr->owner ) );
     229}
Note: See TracChangeset for help on using the changeset viewer.