Home
last modified time | relevance | path

Searched refs:sem (Results 1 – 7 of 7) sorted by relevance

/include/asm-generic/
Drwsem.h34 static inline void __down_read(struct rw_semaphore *sem) in __down_read() argument
36 if (unlikely(atomic_long_inc_return((atomic_long_t *)&sem->count) <= 0)) in __down_read()
37 rwsem_down_read_failed(sem); in __down_read()
40 static inline int __down_read_trylock(struct rw_semaphore *sem) in __down_read_trylock() argument
44 while ((tmp = sem->count) >= 0) { in __down_read_trylock()
45 if (tmp == cmpxchg(&sem->count, tmp, in __down_read_trylock()
56 static inline void __down_write_nested(struct rw_semaphore *sem, int subclass) in __down_write_nested() argument
61 (atomic_long_t *)&sem->count); in __down_write_nested()
63 rwsem_down_write_failed(sem); in __down_write_nested()
66 static inline void __down_write(struct rw_semaphore *sem) in __down_write() argument
[all …]
/include/linux/
Drwsem.h34 extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
35 extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
37 extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem);
43 static inline int rwsem_is_locked(struct rw_semaphore *sem) in rwsem_is_locked() argument
45 return sem->count != 0; in rwsem_is_locked()
67 extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
70 #define init_rwsem(sem) \ argument
74 __init_rwsem((sem), #sem, &__key); \
80 extern void down_read(struct rw_semaphore *sem);
85 extern int down_read_trylock(struct rw_semaphore *sem);
[all …]
Drwsem-spinlock.h34 extern void __down_read(struct rw_semaphore *sem);
35 extern int __down_read_trylock(struct rw_semaphore *sem);
36 extern void __down_write(struct rw_semaphore *sem);
37 extern void __down_write_nested(struct rw_semaphore *sem, int subclass);
38 extern int __down_write_trylock(struct rw_semaphore *sem);
39 extern void __up_read(struct rw_semaphore *sem);
40 extern void __up_write(struct rw_semaphore *sem);
41 extern void __downgrade_write(struct rw_semaphore *sem);
42 extern int rwsem_is_locked(struct rw_semaphore *sem);
Dsemaphore.h32 static inline void sema_init(struct semaphore *sem, int val) in sema_init() argument
35 *sem = (struct semaphore) __SEMAPHORE_INITIALIZER(*sem, val); in sema_init()
36 lockdep_init_map(&sem->lock.dep_map, "semaphore->lock", &__key, 0); in sema_init()
39 extern void down(struct semaphore *sem);
40 extern int __must_check down_interruptible(struct semaphore *sem);
41 extern int __must_check down_killable(struct semaphore *sem);
42 extern int __must_check down_trylock(struct semaphore *sem);
43 extern int __must_check down_timeout(struct semaphore *sem, long jiffies);
44 extern void up(struct semaphore *sem);
Dsem.h27 struct sem *sem_base; /* ptr to first semaphore in array */
92 struct sem *sem_base; /* ptr to first semaphore in array */
Dkey.h129 struct rw_semaphore sem; /* change vs change sem */ member
297 rwsem_is_locked(&((struct key *)(KEY))->sem)))
DKbuild342 header-y += sem.h