4 #include "threadimpl.h"
6 static void tinterrupt(Proc*, Thread*);
9 threadxxxgrp(int grp, int dokill)
14 lock(&_threadpq.lock);
15 for(p=_threadpq.head; p; p=p->next){
17 for(t=p->threads.head; t; t=t->nextt)
25 unlock(&_threadpq.lock);
30 threadxxx(int id, int dokill)
35 lock(&_threadpq.lock);
36 for(p=_threadpq.head; p; p=p->next){
38 for(t=p->threads.head; t; t=t->nextt)
44 unlock(&_threadpq.lock);
50 unlock(&_threadpq.lock);
51 _threaddebug(DBGNOTE, "Can't find thread to kill");
56 threadkillgrp(int grp)
80 tinterrupt(Proc *p, Thread *t)
87 snprint(buf, sizeof(buf), "/proc/%d/ctl", p->pid);
88 fd = open(buf, OWRITE|OCEXEC);
90 if(write(fd, "interrupt", 9) == 9){
96 postnote(PNPROC, p->pid, "threadint");