[EMAIL PROTECTED] said:
> Doh, totally forgot about that. Will this work:
> save_current = current;
> current = find_task_by_pid(1);
> waitpid(...);
> current = save_current;
Changing the thread's parent to current->pid would be better than modifying
current. Still sucks though....
> In any case, we -really- need a wait_for_kernel_thread_to_die()
> function.
up_and_exit() would do it. Or preferably passing the address of the
semaphore as an extra argument to kernel_thread() in the first place.
In the meantime, enough other places in the kernel have this same race that
I'm not too concerned about it. Hopefully, we'll get the extra arg to
kernel_thread before the final cut of 2.4, and this code can get converted
along with everything else.
> > + spin_lock_irq(¤t->sigmask_lock);
> > + sigfillset(¤t->blocked);
> > + recalc_sigpending(current);
> > + spin_unlock_irq(¤t->sigmask_lock);
> what does this do?
Well, I _hope_ it blocks all signals, so that we can sleep in
TASK_INTERRUPTIBLE without adding 1 to the load average, and without having
to worry about the pesky things actually interrupting us.
[EMAIL PROTECTED] said:
> why do you store the event_thread_pid but never use it?
Because I got half way through doing waitpid() before I realised it was
sucky. We store it short-term so we can print it. No reason why we can't
shift the static declaration into init_pcmcia_cs() though.
--
dwmw2
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/