This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]