[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1362128628-18457-2-git-send-email-lig.fnst@cn.fujitsu.com>
Date: Fri, 1 Mar 2013 17:03:48 +0800
From: liguang <lig.fnst@...fujitsu.com>
To: luciarosculete@...il.com, jkosina@...e.cz,
linux-kernel@...r.kernel.org
Cc: liguang <lig.fnst@...fujitsu.com>
Subject: [PATCH 2/2] semaphore: boolize semaphore_waiter's up
Signed-off-by: liguang <lig.fnst@...fujitsu.com>
---
kernel/semaphore.c | 6 +++---
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);
}
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists