aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kthread.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@hera.kernel.org>2006-03-23 17:05:47 +0000
committerAnton Altaparmakov <aia21@hera.kernel.org>2006-03-23 17:05:47 +0000
commita05ba4561fa3ad8b64a27577d0d38c190f60f762 (patch)
tree5eb7561113e006b7bad0bef50dec6821962b1b36 /kernel/kthread.c
parent74293759002aa7db0179158c20676a034614577b (diff)
parentb0e6e962992b76580f4900b166a337bad7c1e81b (diff)
downloadkernel_samsung_tuna-a05ba4561fa3ad8b64a27577d0d38c190f60f762.zip
kernel_samsung_tuna-a05ba4561fa3ad8b64a27577d0d38c190f60f762.tar.gz
kernel_samsung_tuna-a05ba4561fa3ad8b64a27577d0d38c190f60f762.tar.bz2
Merge branch 'master' of /home/aia21/ntfs-2.6/
Diffstat (limited to 'kernel/kthread.c')
-rw-r--r--kernel/kthread.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/kthread.c b/kernel/kthread.c
index e75950a..6a53738 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -12,6 +12,7 @@
#include <linux/unistd.h>
#include <linux/file.h>
#include <linux/module.h>
+#include <linux/mutex.h>
#include <asm/semaphore.h>
/*
@@ -41,7 +42,7 @@ struct kthread_stop_info
/* Thread stopping is done by setthing this var: lock serializes
* multiple kthread_stop calls. */
-static DECLARE_MUTEX(kthread_stop_lock);
+static DEFINE_MUTEX(kthread_stop_lock);
static struct kthread_stop_info kthread_stop_info;
int kthread_should_stop(void)
@@ -173,7 +174,7 @@ int kthread_stop_sem(struct task_struct *k, struct semaphore *s)
{
int ret;
- down(&kthread_stop_lock);
+ mutex_lock(&kthread_stop_lock);
/* It could exit after stop_info.k set, but before wake_up_process. */
get_task_struct(k);
@@ -194,7 +195,7 @@ int kthread_stop_sem(struct task_struct *k, struct semaphore *s)
wait_for_completion(&kthread_stop_info.done);
kthread_stop_info.k = NULL;
ret = kthread_stop_info.err;
- up(&kthread_stop_lock);
+ mutex_unlock(&kthread_stop_lock);
return ret;
}