diff options
| author | Ingo Molnar <mingo@elte.hu> | 2002-12-01 16:29:39 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2002-12-01 16:29:39 -0800 |
| commit | 8a0611595372910f0ead55d294a48a89136b7006 (patch) | |
| tree | 81b0ab7c29568112f8d53479b27fd1576af785cf /include/linux | |
| parent | fe43697ec79a56d0421930fd068202fc1012b1a8 (diff) | |
[PATCH] tcore-fixes-2.5.50-E6
This fixes threaded coredumps and streamlines the code. The old code
caused crashes and hung coredumps. The new code has been tested for
some time already and appears to be robust. Changes:
- the code now uses completions instead of a semaphore and a waitqueue,
attached to mm_struct:
/* coredumping support */
int core_waiters;
struct completion *core_startup_done, core_done;
- extended the completion concept with a 'complete all' call - all pending
threads are woken up in that case.
- core_waiters is a plain integer now - it's always accessed from under
the mmap_sem. It's also used as the fastpath-check in the sys_exit()
path, instead of ->dumpable (which was incorrect).
- got rid of the ->core_waiter task flag - it's not needed anymore.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/completion.h | 1 | ||||
| -rw-r--r-- | include/linux/sched.h | 7 |
2 files changed, 3 insertions, 5 deletions
diff --git a/include/linux/completion.h b/include/linux/completion.h index e4d6817775be..b8d7ed948470 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h @@ -29,6 +29,7 @@ static inline void init_completion(struct completion *x) extern void FASTCALL(wait_for_completion(struct completion *)); extern void FASTCALL(complete(struct completion *)); +extern void FASTCALL(complete_all(struct completion *)); #define INIT_COMPLETION(x) ((x).done = 0) diff --git a/include/linux/sched.h b/include/linux/sched.h index f919a8ce52cb..80a9836df919 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -203,9 +203,8 @@ struct mm_struct { mm_context_t context; /* coredumping support */ - struct semaphore core_sem; - atomic_t core_waiters; - wait_queue_head_t core_wait; + int core_waiters; + struct completion *core_startup_done, core_done; /* aio bits */ rwlock_t ioctx_list_lock; @@ -397,8 +396,6 @@ struct task_struct { void *journal_info; struct dentry *proc_dentry; struct backing_dev_info *backing_dev_info; -/* threaded coredumping support */ - int core_waiter; unsigned long ptrace_message; }; |
