{
struct task_struct *tsk = current;
struct mm_struct *mm = tsk->mm;
- struct completion startup_done;
+ struct core_state core_state;
struct completion *vfork_done;
int core_waiters;
init_completion(&mm->core_done);
- init_completion(&startup_done);
- mm->core_startup_done = &startup_done;
+ init_completion(&core_state.startup);
+ mm->core_state = &core_state;
core_waiters = zap_threads(tsk, mm, exit_code);
up_write(&mm->mmap_sem);
}
if (core_waiters)
- wait_for_completion(&startup_done);
+ wait_for_completion(&core_state.startup);
fail:
BUG_ON(mm->core_waiters);
return core_waiters;
#endif
};
+struct core_state {
+ struct completion startup;
+};
+
struct mm_struct {
struct vm_area_struct * mmap; /* list of VMAs */
struct rb_root mm_rb;
unsigned long flags; /* Must use atomic bitops to access the bits */
/* coredumping support */
- struct completion *core_startup_done, core_done;
+ struct core_state *core_state;
+ struct completion core_done;
/* aio bits */
rwlock_t ioctx_list_lock; /* aio lock */
up_read(&mm->mmap_sem);
down_write(&mm->mmap_sem);
if (!--mm->core_waiters)
- complete(mm->core_startup_done);
+ complete(&mm->core_state->startup);
up_write(&mm->mmap_sem);
wait_for_completion(&mm->core_done);