Changeset 101 for trunk/kernel/libk


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

euh...

Location:
trunk/kernel/libk
Files:
2 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}
  • trunk/kernel/libk/remote_spinlock.h

    r14 r101  
    100100void remote_spinlock_unlock( xptr_t  lock_xp );
    101101
     102/***************************************************************************************
     103 * This debug function returns the current owner of a remote spinlock.
     104 ***************************************************************************************
     105 * @ lock_xp    : extended pointer on the remote spinlock
     106 * @ return XPTR_NULL if not taken / return owner thread if lock already taken
     107 **************************************************************************************/
     108xptr_t remote_spinlock_owner( xptr_t  lock_xp );
     109
     110
    102111#endif
Note: See TracChangeset for help on using the changeset viewer.