aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/semaphore.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/semaphore.c')
-rw-r--r--kernel/semaphore.c13
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
36noinline void __down(struct semaphore *sem); 36static noinline void __down(struct semaphore *sem);
37static noinline int __down_interruptible(struct semaphore *sem); 37static noinline int __down_interruptible(struct semaphore *sem);
38static noinline int __down_killable(struct semaphore *sem); 38static noinline int __down_killable(struct semaphore *sem);
39static noinline int __down_timeout(struct semaphore *sem, long jiffies); 39static noinline int __down_timeout(struct semaphore *sem, long jiffies);
40noinline void __up(struct semaphore *sem); 40static 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/*
194struct semaphore_waiter { 193struct 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
238noinline void __sched __down(struct semaphore *sem) 236static 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}
242EXPORT_SYMBOL(__down);
243
244 240
245static noinline int __sched __down_interruptible(struct semaphore *sem) 241static 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
260noinline void __sched __up(struct semaphore *sem) 256static 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}
268EXPORT_SYMBOL(__up); \ No newline at end of file