Changeset 409 for trunk/kernel/libk/spinlock.h
- Timestamp:
- Dec 20, 2017, 4:51:09 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/spinlock.h
r14 r409 55 55 /******************************************************************************************* 56 56 * This structure defines a local spinlock. 57 * The "owner" and "list" are optionnal fields used for debug. 58 * It register the list of all spinlocks taken by a given thread. 57 59 ******************************************************************************************/ 58 60 … … 60 62 { 61 63 uint32_t taken; /*! state : free if zero / taken if non zero */ 64 65 #if CONFIG_LOCKS_DEBUG 62 66 struct thread_s * owner; /*! pointer on curent owner thread */ 63 list_entry_t list; /*! list of all locks taken by owner */ 67 list_entry_t list; /*! member of list of locks taken by owner */ 68 #endif 69 64 70 } 65 71 spinlock_t; … … 96 102 /******************************************************************************************* 97 103 * This blocking function locks a local spinlock. 98 * If the lock is already taken, the calling thread deschedules and retries when99 * it is rescheduled, until success.104 * If the lock is already taken, the calling thread deschedules without blocking, 105 * and retries when it is rescheduled, until success. 100 106 * It increments the calling thread local_locks count when the lock has been taken. 101 107 *******************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.