summaryrefslogtreecommitdiff
path: root/pfinet
diff options
context:
space:
mode:
Diffstat (limited to 'pfinet')
-rw-r--r--pfinet/sched.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/pfinet/sched.c b/pfinet/sched.c
index 38a419ff..916a7e1f 100644
--- a/pfinet/sched.c
+++ b/pfinet/sched.c
@@ -21,37 +21,31 @@
#include <asm/system.h>
#include <linux/sched.h>
-struct mutex global_interrupt_lock = MUTEX_INITIALIZER;
+struct mutex global_lock = MUTEX_INITIALIZER;
struct task_struct *current;
-struct mutex user_kernel_lock = MUTEX_INITIALIZER;
-
/* Call this before doing kernel-level calls; this enforces the
non-preemptibility of the kernel. */
void
start_kernel (struct task_struct *task)
{
- mutex_lock (&user_kernel_lock);
- mutex_lock (&global_interrupt_lock);
+ mutex_lock (&global_lock);
current = task;
- mutex_unlock (&global_interrupt_lock);
}
/* Call this when done doing a kernel-level call. */
void
end_kernel (void)
{
- mutex_lock (&global_interrupt_lock);
current = 0;
- mutex_unlock (&global_interrupt_lock);
- mutex_unlock (&user_kernel_lock);
+ mutex_unlock (&global_lock);
}
void
interruptible_sleep_on (struct wait_queue **p)
{
- condition_wait (&(*p)->c, &user_kernel_lock);
+ condition_wait (&(*p)->c, &global_lock);
}
void