Commit 06a6ea37 authored by liguang's avatar liguang Committed by Linus Torvalds

semaphore: use `bool' type for semaphore_waiter's up

Signed-off-by: default avatarliguang <lig.fnst@cn.fujitsu.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c74f66ce
...@@ -193,7 +193,7 @@ EXPORT_SYMBOL(up); ...@@ -193,7 +193,7 @@ EXPORT_SYMBOL(up);
struct semaphore_waiter { struct semaphore_waiter {
struct list_head list; struct list_head list;
struct task_struct *task; struct task_struct *task;
int up; bool up;
}; };
/* /*
...@@ -209,7 +209,7 @@ static inline int __sched __down_common(struct semaphore *sem, long state, ...@@ -209,7 +209,7 @@ static inline int __sched __down_common(struct semaphore *sem, long state,
list_add_tail(&waiter.list, &sem->wait_list); list_add_tail(&waiter.list, &sem->wait_list);
waiter.task = task; waiter.task = task;
waiter.up = 0; waiter.up = false;
for (;;) { for (;;) {
if (signal_pending_state(state, task)) if (signal_pending_state(state, task))
...@@ -258,6 +258,6 @@ static noinline void __sched __up(struct semaphore *sem) ...@@ -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 *waiter = list_first_entry(&sem->wait_list,
struct semaphore_waiter, list); struct semaphore_waiter, list);
list_del(&waiter->list); list_del(&waiter->list);
waiter->up = 1; waiter->up = true;
wake_up_process(waiter->task); wake_up_process(waiter->task);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment