aboutsummaryrefslogtreecommitdiff
path: root/src/libthread/pid.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-12-25 21:56:33 +0000
committerrsc <devnull@localhost>2004-12-25 21:56:33 +0000
commit1544f90960275dc9211bde30329c3258e0e1bf38 (patch)
treef55e7a73c03aaa24daa7cc2ad02822b921c477f9 /src/libthread/pid.c
parent7788fd54094693384ef5c92c475656dba8819feb (diff)
downloadplan9port-1544f90960275dc9211bde30329c3258e0e1bf38.tar.gz
plan9port-1544f90960275dc9211bde30329c3258e0e1bf38.tar.bz2
plan9port-1544f90960275dc9211bde30329c3258e0e1bf38.zip
New thread library
Diffstat (limited to 'src/libthread/pid.c')
-rw-r--r--src/libthread/pid.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/libthread/pid.c b/src/libthread/pid.c
deleted file mode 100644
index bbc7dbbf..00000000
--- a/src/libthread/pid.c
+++ /dev/null
@@ -1,25 +0,0 @@
- mypid = getpid();
-
- /*
- * signal others.
- * copying all the pids first avoids other thread's
- * teardown procedures getting in the way.
- */
- lock(&_threadpq.lock);
- npid = 0;
- for(p=_threadpq.head; p; p=p->next)
- npid++;
- pid = _threadmalloc(npid*sizeof(pid[0]), 0);
- npid = 0;
- for(p = _threadpq.head; p; p=p->next)
- pid[npid++] = p->pid;
- unlock(&_threadpq.lock);
- for(i=0; i<npid; i++){
- _threaddebug(DBGSCHED, "threadexitsall kill %d", pid[i]);
- if(pid[i]==0 || pid[i]==-1)
- fprint(2, "bad pid in threadexitsall: %d\n", pid[i]);
- else if(pid[i] != mypid){
- kill(pid[i], SIGTERM);
- }
- }
-