This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
wait for CLONE_THREAD
- From: "Liu Xin" <Liu dot Xin at fujixerox dot co dot jp>
- To: <libc-help at sourceware dot org>
- Cc: <navy dot xliu at gmail dot com>
- Date: Wed, 22 Jul 2009 20:31:40 +0900
- Subject: wait for CLONE_THREAD
hi, list,
redirect me if i am sent wrong mail-list. I am making my speficalized thread
library.
i separated thread into 2 kinds -- leader and task. A group of tasks is
generated by a leader with THREAD_CLONE flags using linux clone(2).
a leader is responsible for fireing up his tasks by tkill(2). however, i
found trouble to track progresses in leader thread .
i tried waitpid, but it reported that leader thread does not have children.
document says, actually task threads are "siblings" of leader.
for each task,
while (1)
{
do_work...
pause();
}
Does anybody here know how leader is notified when all his worker suspend?
it is possible that using glibc signal?
thanks
--lx