diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2013-01-10 16:29:31 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2013-01-10 16:29:31 -0500 |
commit | 32849f80c0c4a0c8a1802525bdecc6cd4447d545 (patch) | |
tree | 83d88fbb96fe343a21cd507de5710a40bb528f3f /kernel/semaphore.c | |
parent | 8d00682ce5ddaedfb62287773d21c727f08fda69 (diff) |
remove sem/mutex hacks needed for old klmirqd
Diffstat (limited to 'kernel/semaphore.c')
-rw-r--r-- | kernel/semaphore.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/kernel/semaphore.c b/kernel/semaphore.c index c947a046a6d7..94a62c0d4ade 100644 --- a/kernel/semaphore.c +++ b/kernel/semaphore.c | |||
@@ -33,11 +33,11 @@ | |||
33 | #include <linux/spinlock.h> | 33 | #include <linux/spinlock.h> |
34 | #include <linux/ftrace.h> | 34 | #include <linux/ftrace.h> |
35 | 35 | ||
36 | noinline void __down(struct semaphore *sem); | 36 | static noinline void __down(struct semaphore *sem); |
37 | static noinline int __down_interruptible(struct semaphore *sem); | 37 | static noinline int __down_interruptible(struct semaphore *sem); |
38 | static noinline int __down_killable(struct semaphore *sem); | 38 | static noinline int __down_killable(struct semaphore *sem); |
39 | static noinline int __down_timeout(struct semaphore *sem, long jiffies); | 39 | static noinline int __down_timeout(struct semaphore *sem, long jiffies); |
40 | noinline void __up(struct semaphore *sem); | 40 | static noinline void __up(struct semaphore *sem); |
41 | 41 | ||
42 | /** | 42 | /** |
43 | * down - acquire the semaphore | 43 | * down - acquire the semaphore |
@@ -190,13 +190,11 @@ EXPORT_SYMBOL(up); | |||
190 | 190 | ||
191 | /* Functions for the contended case */ | 191 | /* Functions for the contended case */ |
192 | 192 | ||
193 | /* | ||
194 | struct semaphore_waiter { | 193 | struct semaphore_waiter { |
195 | struct list_head list; | 194 | struct list_head list; |
196 | struct task_struct *task; | 195 | struct task_struct *task; |
197 | int up; | 196 | int up; |
198 | }; | 197 | }; |
199 | */ | ||
200 | 198 | ||
201 | /* | 199 | /* |
202 | * Because this function is inlined, the 'state' parameter will be | 200 | * Because this function is inlined, the 'state' parameter will be |
@@ -235,12 +233,10 @@ static inline int __sched __down_common(struct semaphore *sem, long state, | |||
235 | return -EINTR; | 233 | return -EINTR; |
236 | } | 234 | } |
237 | 235 | ||
238 | noinline void __sched __down(struct semaphore *sem) | 236 | static noinline void __sched __down(struct semaphore *sem) |
239 | { | 237 | { |
240 | __down_common(sem, TASK_UNINTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT); | 238 | __down_common(sem, TASK_UNINTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT); |
241 | } | 239 | } |
242 | EXPORT_SYMBOL(__down); | ||
243 | |||
244 | 240 | ||
245 | static noinline int __sched __down_interruptible(struct semaphore *sem) | 241 | static noinline int __sched __down_interruptible(struct semaphore *sem) |
246 | { | 242 | { |
@@ -257,7 +253,7 @@ static noinline int __sched __down_timeout(struct semaphore *sem, long jiffies) | |||
257 | return __down_common(sem, TASK_UNINTERRUPTIBLE, jiffies); | 253 | return __down_common(sem, TASK_UNINTERRUPTIBLE, jiffies); |
258 | } | 254 | } |
259 | 255 | ||
260 | noinline void __sched __up(struct semaphore *sem) | 256 | static noinline void __sched __up(struct semaphore *sem) |
261 | { | 257 | { |
262 | struct semaphore_waiter *waiter = list_first_entry(&sem->wait_list, | 258 | struct semaphore_waiter *waiter = list_first_entry(&sem->wait_list, |
263 | struct semaphore_waiter, list); | 259 | struct semaphore_waiter, list); |
@@ -265,4 +261,3 @@ noinline void __sched __up(struct semaphore *sem) | |||
265 | waiter->up = 1; | 261 | waiter->up = 1; |
266 | wake_up_process(waiter->task); | 262 | wake_up_process(waiter->task); |
267 | } | 263 | } |
268 | EXPORT_SYMBOL(__up); \ No newline at end of file | ||