summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-08-29 05:27:07 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-08-29 05:27:07 +0000
commita60c6812feb6ba35b5b8a9ee8a5ca3d01d1fcd5f (patch)
tree2290ff15f280314a063f3dfc523742c8934c4259 /include/linux
parent1a1d77dd589de5a567fa95e36aa6999c704ceca4 (diff)
Merge with Linux 2.4.0-test8-pre1.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pagemap.h1
-rw-r--r--include/linux/sched.h9
-rw-r--r--include/linux/wait.h7
3 files changed, 12 insertions, 5 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index a3b897378..89054f8fe 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -62,7 +62,6 @@ extern inline unsigned long _page_hashfn(struct address_space * mapping, unsigne
#define s(x) ((x)+((x)>>PAGE_HASH_BITS))
return s(i+index) & (PAGE_HASH_SIZE-1);
#undef i
-#undef o
#undef s
}
diff --git a/include/linux/sched.h b/include/linux/sched.h
index db6ec43cd..4357bb6fe 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -38,6 +38,7 @@ extern unsigned long event;
#define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */
#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */
#define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */
+#define CLONE_THREAD 0x00010000 /* set if we want to clone the "thread group" */
/*
* These are the constant used to fake the fixed-point load-average
@@ -311,6 +312,7 @@ struct task_struct {
pid_t pgrp;
pid_t tty_old_pgrp;
pid_t session;
+ pid_t tgid;
/* boolean value for session group leader */
int leader;
/*
@@ -319,6 +321,7 @@ struct task_struct {
* p->p_pptr->pid)
*/
struct task_struct *p_opptr, *p_pptr, *p_cptr, *p_ysptr, *p_osptr;
+ struct list_head thread_group;
/* PID hash table linkage. */
struct task_struct *pidhash_next;
@@ -435,6 +438,7 @@ struct task_struct {
prev_task: &tsk, \
p_opptr: &tsk, \
p_pptr: &tsk, \
+ thread_group: LIST_HEAD_INIT(tsk.thread_group), \
wait_chldexit: __WAIT_QUEUE_HEAD_INITIALIZER(tsk.wait_chldexit),\
real_timer: { \
function: it_real_fn \
@@ -558,8 +562,8 @@ extern int force_sig_info(int, struct siginfo *, struct task_struct *);
extern int kill_pg_info(int, struct siginfo *, pid_t);
extern int kill_sl_info(int, struct siginfo *, pid_t);
extern int kill_proc_info(int, struct siginfo *, pid_t);
-extern int kill_something_info(int, struct siginfo *, int);
extern void notify_parent(struct task_struct *, int);
+extern void do_notify_parent(struct task_struct *, int);
extern void force_sig(int, struct task_struct *);
extern int send_sig(int, struct task_struct *, int);
extern int kill_pg(pid_t, int, int);
@@ -800,6 +804,8 @@ do { \
#define for_each_task(p) \
for (p = &init_task ; (p = p->next_task) != &init_task ; )
+#define next_thread(p) \
+ list_entry((p)->thread_group.next, struct task_struct, thread_group)
static inline void del_from_runqueue(struct task_struct * p)
{
@@ -820,6 +826,7 @@ static inline void unhash_process(struct task_struct *p)
nr_threads--;
unhash_pid(p);
REMOVE_LINKS(p);
+ list_del(&p->thread_group);
write_unlock_irq(&tasklist_lock);
}
diff --git a/include/linux/wait.h b/include/linux/wait.h
index 222923aca..a3687bf53 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -4,8 +4,9 @@
#define WNOHANG 0x00000001
#define WUNTRACED 0x00000002
-#define __WALL 0x40000000
-#define __WCLONE 0x80000000
+#define __WNOTHREAD 0x20000000 /* Don't wait on children of other threads in this group */
+#define __WALL 0x40000000 /* Wait on all children, regardless of type */
+#define __WCLONE 0x80000000 /* Wait only on non-SIGCHLD children */
#ifdef __KERNEL__
@@ -184,7 +185,7 @@ extern inline void __add_wait_queue_tail(wait_queue_head_t *head,
if (!head->task_list.next || !head->task_list.prev)
WQ_BUG();
#endif
- list_add(&new->task_list, head->task_list.prev);
+ list_add_tail(&new->task_list, &head->task_list);
}
extern inline void __remove_wait_queue(wait_queue_head_t *head,