Blob
1 /*2 * Implement threadexitsall by sending a signal to every proc.3 *4 * To be included from another C file (e.g., Linux-clone.c).5 */7 void8 _threadexitallproc(char *exitstr)9 {10 Proc *p;11 int mypid;13 mypid = getpid();14 lock(&_threadpq.lock);15 for(p=_threadpq.head; p; p=p->next)16 if(p->pid > 1 && p->pid != mypid)17 kill(p->pid, SIGUSR2);18 exits(exitstr);19 }21 void22 _threadexitproc(char *exitstr)23 {24 _exits(exitstr);25 }