summaryrefslogtreecommitdiff
path: root/pfinet
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-09-06 19:34:03 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-09-06 19:34:03 +0000
commit5eb11ac75440e8ad1354b6514e28d7f697809acc (patch)
treeec11f3eb0b0d3233c2306afdd6875ee46507889b /pfinet
parentc57bdaabf7d36c869812821626ad6046457621aa (diff)
Formerly sched.c.~7~
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