aboutsummaryrefslogtreecommitdiff
path: root/src/libfs/fs.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-02-29 22:10:26 +0000
committerrsc <devnull@localhost>2004-02-29 22:10:26 +0000
commit5a8e63b2f016735364d17866d5e2bcb35d20c78b (patch)
treed5d0ce11e087efaf81c77311bac9d30aed41783d /src/libfs/fs.c
parentd51419bf4397cf13d0c50bf84c125477c6bed307 (diff)
downloadplan9port-5a8e63b2f016735364d17866d5e2bcb35d20c78b.tar.gz
plan9port-5a8e63b2f016735364d17866d5e2bcb35d20c78b.tar.bz2
plan9port-5a8e63b2f016735364d17866d5e2bcb35d20c78b.zip
Fighting the good fight.
Move libfmt, libutf into subdirectories of lib9. Add poll-based socket i/o to libthread, so that we can avoid using multiple procs when possible, thus removing dependence on crappy pthreads implementations. Convert samterm, acme to the single-proc libthread. Bring libcomplete, acme up-to-date w.r.t. Plan 9 distribution.
Diffstat (limited to 'src/libfs/fs.c')
-rw-r--r--src/libfs/fs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libfs/fs.c b/src/libfs/fs.c
index 91d4af17..d912391f 100644
--- a/src/libfs/fs.c
+++ b/src/libfs/fs.c
@@ -5,6 +5,7 @@
#include <libc.h>
#include <fcall.h>
#include <fs.h>
+#include <thread.h>
#include "fsimpl.h"
static int _fssend(Mux*, void*);
@@ -270,7 +271,7 @@ _fsrecv(Mux *mux)
Fsys *fs;
fs = mux->aux;
- n = readn(fs->fd, buf, 4);
+ n = threadreadn(fs->fd, buf, 4);
if(n != 4)
return nil;
n = GBIT32(buf);
@@ -280,12 +281,12 @@ _fsrecv(Mux *mux)
return nil;
}
PBIT32(pkt, n);
- if(readn(fs->fd, pkt+4, n-4) != n-4){
+ if(threadreadn(fs->fd, pkt+4, n-4) != n-4){
free(pkt);
return nil;
}
if(pkt[4] == Ropenfd){
- if((nfd=recvfd(fs->fd)) < 0){
+ if((nfd=threadrecvfd(fs->fd)) < 0){
fprint(2, "recv fd error: %r\n");
free(pkt);
return nil;