patch-2.1.48 linux/include/linux/sched.h
Next file: linux/include/linux/selection.h
Previous file: linux/include/linux/proc_fs.h
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Mon Aug 4 13:59:23 1997
- Orig file:
v2.1.47/linux/include/linux/sched.h
- Orig date:
Mon Jul 7 16:02:03 1997
diff -u --recursive --new-file v2.1.47/linux/include/linux/sched.h linux/include/linux/sched.h
@@ -384,33 +384,36 @@
extern __inline__ void hash_pid(struct task_struct *p)
{
struct task_struct **htable = &pidhash[pid_hashfn(p->pid)];
+ unsigned long flags;
- spin_lock(&pidhash_lock);
+ spin_lock_irqsave(&pidhash_lock, flags);
if((p->pidhash_next = *htable) != NULL)
(*htable)->pidhash_pprev = &p->pidhash_next;
*htable = p;
p->pidhash_pprev = htable;
- spin_unlock(&pidhash_lock);
+ spin_unlock_irqrestore(&pidhash_lock, flags);
}
extern __inline__ void unhash_pid(struct task_struct *p)
{
- spin_lock(&pidhash_lock);
+ unsigned long flags;
+
+ spin_lock_irqsave(&pidhash_lock, flags);
if(p->pidhash_next)
p->pidhash_next->pidhash_pprev = p->pidhash_pprev;
*p->pidhash_pprev = p->pidhash_next;
- spin_unlock(&pidhash_lock);
+ spin_unlock_irqrestore(&pidhash_lock, flags);
}
extern __inline__ struct task_struct *find_task_by_pid(int pid)
{
- struct task_struct **htable = &pidhash[pid_hashfn(pid)];
- struct task_struct *p;
+ struct task_struct *p, **htable = &pidhash[pid_hashfn(pid)];
+ unsigned long flags;
- spin_lock(&pidhash_lock);
+ spin_lock_irqsave(&pidhash_lock, flags);
for(p = *htable; p && p->pid != pid; p = p->pidhash_next)
;
- spin_unlock(&pidhash_lock);
+ spin_unlock_irqrestore(&pidhash_lock, flags);
return p;
}
@@ -441,7 +444,7 @@
extern void wake_up_interruptible(struct wait_queue ** p);
extern void wake_up_process(struct task_struct * tsk);
-extern void notify_parent(struct task_struct * tsk);
+extern void notify_parent(struct task_struct * tsk, int signal);
extern void force_sig(unsigned long sig,struct task_struct * p);
extern int send_sig(unsigned long sig,struct task_struct * p,int priv);
extern int in_group_p(gid_t grp);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov