From a1df417e74aa6dae7352dc8cbb0ad471af5b7c69 Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Mon, 25 Apr 2016 10:00:44 -0400 Subject: initial Olimex linux tree from Daniel, originally Feb 3, 2016 --- linux/kernel/locking/rwsem.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 linux/kernel/locking/rwsem.h (limited to 'linux/kernel/locking/rwsem.h') 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 -- cgit