diff options
Diffstat (limited to 'src/libthread')
-rw-r--r-- | src/libthread/iocall.c | 5 | ||||
-rw-r--r-- | src/libthread/iodial.c | 7 | ||||
-rw-r--r-- | src/libthread/iowrite.c | 7 | ||||
-rw-r--r-- | src/libthread/mkfile | 2 | ||||
-rw-r--r-- | src/libthread/note.c | 2 |
5 files changed, 16 insertions, 7 deletions
diff --git a/src/libthread/iocall.c b/src/libthread/iocall.c index d9cf9d04..0577f8a0 100644 --- a/src/libthread/iocall.c +++ b/src/libthread/iocall.c @@ -3,6 +3,7 @@ long iocall(Ioproc *io, long (*op)(va_list*), ...) { + char e[ERRMAX]; int ret, inted; Ioproc *msg; @@ -39,11 +40,13 @@ iocall(Ioproc *io, long (*op)(va_list*), ...) va_end(io->arg); ret = io->ret; if(ret < 0) - errstr(io->err, sizeof io->err); + strecpy(e, e+sizeof e, io->err); io->inuse = 0; /* release resources */ while(send(io->creply, &io) == -1) ; + if(ret < 0) + errstr(e, sizeof e); return ret; } diff --git a/src/libthread/iodial.c b/src/libthread/iodial.c index 8171156c..2e45cfe6 100644 --- a/src/libthread/iodial.c +++ b/src/libthread/iodial.c @@ -4,14 +4,17 @@ static long _iodial(va_list *arg) { char *addr, *local, *dir; - int *cdfp; + int *cdfp, fd; addr = va_arg(*arg, char*); local = va_arg(*arg, char*); dir = va_arg(*arg, char*); cdfp = va_arg(*arg, int*); - return dial(addr, local, dir, cdfp); +fprint(2, "before dial\n"); + fd = dial(addr, local, dir, cdfp); +fprint(2, "after dial\n"); + return fd; } int diff --git a/src/libthread/iowrite.c b/src/libthread/iowrite.c index 664a84bf..593224c2 100644 --- a/src/libthread/iowrite.c +++ b/src/libthread/iowrite.c @@ -5,13 +5,14 @@ _iowrite(va_list *arg) { int fd; void *a; - long n; + long n, nn; fd = va_arg(*arg, int); a = va_arg(*arg, void*); n = va_arg(*arg, long); - n = write(fd, a, n); - return n; + nn = write(fd, a, n); +fprint(2, "_iowrite %d %d %r\n", n, nn); + return nn; } long diff --git a/src/libthread/mkfile b/src/libthread/mkfile index 739aaf84..8854cde7 100644 --- a/src/libthread/mkfile +++ b/src/libthread/mkfile @@ -16,10 +16,12 @@ OFILES=\ id.$O\ iocall.$O\ ioclose.$O\ + iodial.$O\ ioopen.$O\ ioproc.$O\ ioread.$O\ ioreadn.$O\ + iosleep.$O\ iowrite.$O\ kill.$O\ lib.$O\ diff --git a/src/libthread/note.c b/src/libthread/note.c index b25f2b23..1136156c 100644 --- a/src/libthread/note.c +++ b/src/libthread/note.c @@ -92,7 +92,7 @@ _threadnote(void *v, char *s) // _exits(_threadexitsallstatus); // } - if(strcmp(s, "threadint")==0) + if(strcmp(s, "threadint")==0 || strcmp(s, "interrupt")==0) noted(NCONT); p = _threadgetproc(); |