Changeset 11 for trunk/kernel/libk/spinlock.h
- Timestamp:
- Apr 26, 2017, 2:29:23 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/spinlock.h
r1 r11 75 75 * This blocking function uses a busy waiting strategy to lock a local spinlock. 76 76 * It polls the lock and returns only when the lock has been taken. 77 * If the irq_state argument is not NULL, all IRQs are disabled and will keep disabled 78 * until the lock is released. If irq_state is NULL, the IRQs are only disabled 79 * during the lock acquisition polling loop. 77 * All IRQs are disabled and will keep disabled until the lock is released. 80 78 * It increments the calling thread local_locks count when the lock has been taken. 81 79 ******************************************************************************************* … … 88 86 /******************************************************************************************* 89 87 * This function releases a local busy_waiting spinlock. 90 * It restores the CPU SR state , if required by the restore argument.88 * It restores the CPU SR state. 91 89 ******************************************************************************************* 92 90 * @ lock : pointer on spinlock 93 * @ restore : restore the CPU SR (from irq_state) if true94 91 * @ irq_state : value to be resrored in CPU SR 95 92 ******************************************************************************************/ 96 93 void spinlock_unlock_busy( spinlock_t * lock, 97 bool_t restore,98 94 uint32_t irq_state ); 99 95 … … 115 111 * @ returns 0 if success / returns non zero if lock already taken. 116 112 ******************************************************************************************/ 117 uint32_t spinlock_trylock( spinlock_t * lock );113 error_t spinlock_trylock( spinlock_t * lock ); 118 114 119 115 /*******************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.