Changeset e71a61d in mainline for kernel/generic/include/synch/rwlock.h
- Timestamp:
- 2007-01-22T14:45:07Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 51baa8a
- Parents:
- 726e1043
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/synch/rwlock.h
r726e1043 re71a61d 42 42 #include <synch/spinlock.h> 43 43 44 enum rwlock_type{44 typedef enum { 45 45 RWLOCK_NONE, 46 46 RWLOCK_READER, 47 47 RWLOCK_WRITER 48 } ;48 } rwlock_type_t; 49 49 50 struct rwlock{50 typedef struct { 51 51 SPINLOCK_DECLARE(lock); 52 52 mutex_t exclusive; /**< Mutex for writers, readers can bypass it if readers_in is positive. */ 53 53 count_t readers_in; /**< Number of readers in critical section. */ 54 } ;54 } rwlock_t; 55 55 56 56 #define rwlock_write_lock(rwl) \
Note:
See TracChangeset
for help on using the changeset viewer.