Ignore:
Timestamp:
Apr 26, 2017, 2:29:23 PM (7 years ago)
Author:
alain
Message:

Merge all FS related files in one single vfs directory.

File:
1 edited

Legend:

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

    r1 r11  
    4848 * This function initializes a remote spinlock.
    4949 ***************************************************************************************
    50  * @ lock    : extended pointer on the remote spinlock
     50 * @ lock_xp : extended pointer on the remote spinlock
    5151 **************************************************************************************/
    52 void remote_spinlock_init( xptr_t   lock );
     52void remote_spinlock_init( xptr_t   lock_xp );
     53
     54/*******************************************************************************************
     55 * This blocking function uses a busy waiting strategy to lock a remote spinlock.
     56 * It polls the lock and returns only when the lock has been taken.
     57 * All IRQs are disabled and will keep disabled until the lock is released.
     58 * It increments the calling thread local_locks count when the lock has been taken.
     59 *******************************************************************************************
     60 * @ lock_xp    : extended pointer on the remote spinlock.
     61 * @ irq_state  : buffer to save the SR state (in the calling thread stack)
     62 ******************************************************************************************/
     63void remote_spinlock_lock_busy( xptr_t     lock_xp,
     64                                uint32_t * irq_state );
     65
     66/*******************************************************************************************
     67 * This function releases a remote busy_waiting spinlock.
     68 * It restores the CPU SR state.
     69 *******************************************************************************************
     70 * @ lock_xp    : extended pointer on remote spinlock.
     71 * @ irq_state  : value to be resrored in CPU SR
     72 ******************************************************************************************/
     73void remote_spinlock_unlock_busy( xptr_t     lock_xp,
     74                                  uint32_t   irq_state );
    5375
    5476/***************************************************************************************
     
    5880 * It increments the calling thread locks count when the lock has been taken.
    5981 ***************************************************************************************
    60  * @ lock    : extended pointer on the remote spinlock
     82 * @ lock_xp   : extended pointer on the remote spinlock
    6183 **************************************************************************************/
    62 void remote_spinlock_lock( xptr_t lock );
     84void remote_spinlock_lock( xptr_t lock_xp );
    6385
    6486/***************************************************************************************
     
    6688 * It increments the calling thread locks count in case of success.
    6789 ***************************************************************************************
    68  * @ lock    : extended pointer on the remote spinlock
     90 * @ lock_xp    : extended pointer on the remote spinlock
    6991 * @ returns O if success / returns non zero if lock already taken.
    7092 **************************************************************************************/
    71 uint32_t remote_spinlock_trylock( xptr_t lock );
     93error_t remote_spinlock_trylock( xptr_t  lock_xp );
    7294
    7395/***************************************************************************************
    7496 * This function releases a remote spinlock.
    7597 ***************************************************************************************
    76  * @ lock    : extended pointer on the remote spinlock
     98 * @ lock_xp    : extended pointer on the remote spinlock
    7799 **************************************************************************************/
    78 void remote_spinlock_unlock( xptr_t lock );
     100void remote_spinlock_unlock( xptr_t  lock_xp );
    79101
    80102#endif
Note: See TracChangeset for help on using the changeset viewer.