#ifndef LOCKING_H #define LOCKING_H #include struct spinlock { pthread_spinlock_t lock; }; struct mutexlock { pthread_mutex_t lock; }; struct rwlock { pthread_rwlock_t lock; }; static inline int spinlock_init(struct spinlock *l) { return -pthread_spin_init(&l->lock, 0); } static inline void spinlock_destroy(struct spinlock *l) { pthread_spin_destroy(&l->lock); } static inline void spinlock_lock(struct spinlock *l) { pthread_spin_lock(&l->lock); } static inline void spinlock_unlock(struct spinlock *l) { pthread_spin_unlock(&l->lock); } static inline int mutexlock_init(struct mutexlock *l) { return -pthread_mutex_init(&l->lock, 0); } static inline void mutexlock_destroy(struct mutexlock *l) { pthread_mutex_destroy(&l->lock); } static inline void mutexlock_lock(struct mutexlock *l) { pthread_mutex_lock(&l->lock); } static inline void mutexlock_unlock(struct mutexlock *l) { pthread_mutex_unlock(&l->lock); } static inline int rwlock_init(struct rwlock *l) { return -pthread_rwlock_init(&l->lock, 0); } static inline int rwlock_init2(struct rwlock *l, pthread_rwlockattr_t *attr) { return -pthread_rwlock_init(&l->lock, attr); } static inline void rwlock_destroy(struct rwlock *l) { pthread_rwlock_destroy(&l->lock); } static inline void rwlock_rd_lock(struct rwlock *l) { pthread_rwlock_rdlock(&l->lock); } static inline void rwlock_wr_lock(struct rwlock *l) { pthread_rwlock_wrlock(&l->lock); } static inline void rwlock_unlock(struct rwlock *l) { pthread_rwlock_unlock(&l->lock); } #endif /* LOCKING_H */ 541f9e8bdebce02458882b66b638d7302c1f616'>refslogtreecommitdiff
path: root/include/sound/gus.h
35a4d08f94e8cda073200423e0ff01d2e'>xfrm_proc.c
diff options
AgeCommit message (Expand)AuthorFilesLines
context:
space:
mode:
authorVenkat Reddy Talla <vreddytalla@nvidia.com>2016-11-17 23:24:36 +0530
committerMark Brown <broonie@kernel.org>2016-11-23 16:27:42 +0000
commit983779235a4d08f94e8cda073200423e0ff01d2e (patch)
tree254b624bd499c14b09d55abaf209ea95f3c860f7 /net/xfrm/xfrm_proc.c
parent383d0fca7035a12f1201277d33e8fc87c9d60c9a (diff)
regulator: max77620: add documentation for MPOK property
Adding documentation for maxim,power-ok-control dts property Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com> Acked-by: Rob Herring <robh@kernel.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'net/xfrm/xfrm_proc.c')