summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@nuclecu.unam.mx>1997-08-06 19:14:48 +0000
committerMiguel de Icaza <miguel@nuclecu.unam.mx>1997-08-06 19:14:48 +0000
commite2819e52a162873ff5061de81bb749831bdb5de9 (patch)
tree6067ea700202750ba335a423696f2972700e5f76 /kernel
parent17a005074429bbf143e40401f405ae4363e56828 (diff)
Merge to 2.1.38.
IMPORTANT NOTE: I could not figure out what information is the one that should be used for the following files (ie, those that were in our tree, or those that came from Linus' patch), please, check these: include/asm-mips/jazz.h include/asm-mips/jazzdma.h include/asm-mips/ioctls.h
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c31
-rw-r--r--kernel/ksyms.c1
-rw-r--r--kernel/sched.c5
3 files changed, 20 insertions, 17 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index afa3e5393..23f0da655 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -119,12 +119,12 @@ int send_sig(unsigned long sig,struct task_struct * p,int priv)
return 0;
}
-void notify_parent(struct task_struct * tsk)
+void notify_parent(struct task_struct * tsk, int signal)
{
- if (tsk->p_pptr == task[smp_num_cpus]) /* Init */
- tsk->exit_signal = SIGCHLD;
- send_sig(tsk->exit_signal, tsk->p_pptr, 1);
- wake_up_interruptible(&tsk->p_pptr->wait_chldexit);
+ struct task_struct * parent = tsk->p_pptr;
+
+ send_sig(signal, parent, 1);
+ wake_up_interruptible(&parent->wait_chldexit);
}
void release(struct task_struct * p)
@@ -346,11 +346,10 @@ static inline void forget_original_parent(struct task_struct * father)
read_lock(&tasklist_lock);
for_each_task(p) {
- if (p->p_opptr == father)
- if (task[smp_num_cpus]) /* init */
- p->p_opptr = task[smp_num_cpus];
- else
- p->p_opptr = task[0];
+ if (p->p_opptr == father) {
+ p->exit_signal = SIGCHLD;
+ p->p_opptr = task[smp_num_cpus] ? : task[0]; /* init */
+ }
}
read_unlock(&tasklist_lock);
}
@@ -488,7 +487,7 @@ static void exit_notify(void)
kill_pg(current->pgrp,SIGCONT,1);
}
/* Let father know we died */
- notify_parent(current);
+ notify_parent(current, current->exit_signal);
/*
* This loop does two things:
@@ -502,15 +501,13 @@ static void exit_notify(void)
current->p_cptr = p->p_osptr;
p->p_ysptr = NULL;
p->flags &= ~(PF_PTRACED|PF_TRACESYS);
- if (task[smp_num_cpus] && task[smp_num_cpus] != current) /* init */
- p->p_pptr = task[smp_num_cpus];
- else
- p->p_pptr = task[0];
+
+ p->p_pptr = p->p_opptr;
p->p_osptr = p->p_pptr->p_cptr;
p->p_osptr->p_ysptr = p;
p->p_pptr->p_cptr = p;
if (p->state == TASK_ZOMBIE)
- notify_parent(p);
+ notify_parent(p, p->exit_signal);
/*
* process group orphan check
* Case ii: Our child is in a different pgrp
@@ -651,7 +648,7 @@ repeat:
REMOVE_LINKS(p);
p->p_pptr = p->p_opptr;
SET_LINKS(p);
- notify_parent(p);
+ notify_parent(p, SIGCHLD);
} else
release(p);
#ifdef DEBUG_PROC_TREE
diff --git a/kernel/ksyms.c b/kernel/ksyms.c
index 8e55af454..e75cfcc5e 100644
--- a/kernel/ksyms.c
+++ b/kernel/ksyms.c
@@ -156,6 +156,7 @@ EXPORT_SYMBOL(d_add);
EXPORT_SYMBOL(d_move);
EXPORT_SYMBOL(d_instantiate);
EXPORT_SYMBOL(__mark_inode_dirty);
+EXPORT_SYMBOL(init_private_file);
EXPORT_SYMBOL(insert_file_free);
EXPORT_SYMBOL(check_disk_change);
EXPORT_SYMBOL(invalidate_buffers);
diff --git a/kernel/sched.c b/kernel/sched.c
index 5d35e45e0..7330129ec 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1379,6 +1379,11 @@ asmlinkage int sys_sched_getparam(pid_t pid, struct sched_param *param)
asmlinkage int sys_sched_yield(void)
{
+ /*
+ * This is not really right. We'd like to reschedule
+ * just _once_ with this process having a zero count.
+ */
+ current->counter = 0;
spin_lock(&scheduler_lock);
spin_lock_irq(&runqueue_lock);
move_last_runqueue(current);