diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-05-17 03:14:09 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-05-17 07:24:39 -0400 |
commit | 62e4df2a38081f62fd1bd657459b7ffb2d4f522c (patch) | |
tree | 9b4ed5d3c597e19894ca77299b53057efe071c50 /include/linux/semaphore.h | |
parent | 426e88e41cdcecd007a689daf4fe432bb61303ec (diff) |
drop dead code
Diffstat (limited to 'include/linux/semaphore.h')
-rw-r--r-- | include/linux/semaphore.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/include/linux/semaphore.h b/include/linux/semaphore.h deleted file mode 100644 index aeba6eb0..00000000 --- a/include/linux/semaphore.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2008 Intel Corporation - * Author: Matthew Wilcox <willy@linux.intel.com> - * - * Distributed under the terms of the GNU GPL, version 2 - * - * Please see kernel/semaphore.c for documentation of these functions - */ -#ifndef __LINUX_SEMAPHORE_H -#define __LINUX_SEMAPHORE_H - -#include <linux/list.h> -#include <linux/lockdep.h> -#include <linux/spinlock.h> - -/* Please don't access any members of this structure directly */ -struct semaphore { - raw_spinlock_t lock; - unsigned int count; - struct list_head wait_list; -}; - -#define __SEMAPHORE_INITIALIZER(name, n) \ -{ \ - .lock = __RAW_SPIN_LOCK_UNLOCKED((name).lock), \ - .count = n, \ - .wait_list = LIST_HEAD_INIT((name).wait_list), \ -} - -#define DEFINE_SEMAPHORE(name) \ - struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) - -static inline void sema_init(struct semaphore *sem, int val) -{ - static struct lock_class_key __key; - *sem = (struct semaphore) __SEMAPHORE_INITIALIZER(*sem, val); - lockdep_init_map(&sem->lock.dep_map, "semaphore->lock", &__key, 0); -} - -extern void down(struct semaphore *sem); -extern int __must_check down_interruptible(struct semaphore *sem); -extern int __must_check down_killable(struct semaphore *sem); -extern int __must_check down_trylock(struct semaphore *sem); -extern int __must_check down_timeout(struct semaphore *sem, long); -extern void up(struct semaphore *sem); - -#endif /* __LINUX_SEMAPHORE_H */ |