diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2016-04-25 10:00:44 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2016-04-25 10:00:44 -0400 |
commit | a1df417e74aa6dae7352dc8cbb0ad471af5b7c69 (patch) | |
tree | c34b2311e37ea31db153c90cb8f4570374d05e78 /linux/kernel/locking/rwsem.h |
initial Olimex linux tree from Daniel, originally Feb 3, 2016
Diffstat (limited to 'linux/kernel/locking/rwsem.h')
-rw-r--r-- | linux/kernel/locking/rwsem.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/linux/kernel/locking/rwsem.h b/linux/kernel/locking/rwsem.h new file mode 100644 index 00000000..870ed9a5 --- /dev/null +++ b/linux/kernel/locking/rwsem.h @@ -0,0 +1,20 @@ +#ifdef CONFIG_RWSEM_SPIN_ON_OWNER +static inline void rwsem_set_owner(struct rw_semaphore *sem) +{ + sem->owner = current; +} + +static inline void rwsem_clear_owner(struct rw_semaphore *sem) +{ + sem->owner = NULL; +} + +#else +static inline void rwsem_set_owner(struct rw_semaphore *sem) +{ +} + +static inline void rwsem_clear_owner(struct rw_semaphore *sem) +{ +} +#endif |