summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorliguang <lig.fnst@cn.fujitsu.com>2013-04-30 15:28:33 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 17:04:08 -0700
commit06a6ea3702143e0af38270ac07d102a68810d564 (patch)
tree66e76bcaa0b76258bbfec40540f9118b288c083e /kernel
parentc74f66ce102e2cfb61c185f7451538e29de640b9 (diff)
downloadop-kernel-dev-06a6ea3702143e0af38270ac07d102a68810d564.zip
op-kernel-dev-06a6ea3702143e0af38270ac07d102a68810d564.tar.gz
semaphore: use `bool' type for semaphore_waiter's up
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/semaphore.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/semaphore.c b/kernel/semaphore.c
index 9c7017d..6815171 100644
--- a/kernel/semaphore.c
+++ b/kernel/semaphore.c
@@ -193,7 +193,7 @@ EXPORT_SYMBOL(up);
struct semaphore_waiter {
struct list_head list;
struct task_struct *task;
- int up;
+ bool up;
};
/*
@@ -209,7 +209,7 @@ static inline int __sched __down_common(struct semaphore *sem, long state,
list_add_tail(&waiter.list, &sem->wait_list);
waiter.task = task;
- waiter.up = 0;
+ waiter.up = false;
for (;;) {
if (signal_pending_state(state, task))
@@ -258,6 +258,6 @@ static noinline void __sched __up(struct semaphore *sem)
struct semaphore_waiter *waiter = list_first_entry(&sem->wait_list,
struct semaphore_waiter, list);
list_del(&waiter->list);
- waiter->up = 1;
+ waiter->up = true;
wake_up_process(waiter->task);
}
OpenPOWER on IntegriCloud