aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-05-12 18:22:54 +0000
committerrsc <devnull@localhost>2004-05-12 18:22:54 +0000
commit30387d7ba615e35e72e433df15fed2e918debf61 (patch)
tree69ea051ac9a0c7076a03e65b3ec011b9bbc7ffe3 /src
parentc4097c29512269f4547ebefb8abdc57a2892b479 (diff)
downloadplan9port-30387d7ba615e35e72e433df15fed2e918debf61.tar.gz
plan9port-30387d7ba615e35e72e433df15fed2e918debf61.tar.bz2
plan9port-30387d7ba615e35e72e433df15fed2e918debf61.zip
Noblock is nonsense.
Diffstat (limited to 'src')
-rw-r--r--src/libthread/fdwait.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/libthread/fdwait.c b/src/libthread/fdwait.c
index a6890332..e583da60 100644
--- a/src/libthread/fdwait.c
+++ b/src/libthread/fdwait.c
@@ -8,7 +8,6 @@
#include <fcntl.h>
#define debugpoll 0
-static int noblocked[4096/32];
#ifdef __APPLE__
#include <sys/time.h>
@@ -228,25 +227,7 @@ threadsleep(int ms)
void
threadfdnoblock(int fd)
{
- Thread *t;
-
- if(fd<0)
- return;
- if(fd < 8*sizeof(int)*nelem(noblocked)
- && (noblocked[fd/(8*sizeof(int))] & (1<<(fd%(8*sizeof(int))))))
- return;
- t = _threadgetproc()->thread;
- if(t && t->lastfd == fd)
- return;
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0)|O_NONBLOCK);
- if(t)
- t->lastfd = fd;
-
- /* We could lock this but we're probably single-threaded
- * and the worst that will happen is we'll run fcntl
- * a few more times.
- */
- noblocked[fd/(8*sizeof(int))] |= 1<<(fd%(8*sizeof(int)));
}
long