various tweaks.
This commit is contained in:
parent
c197370550
commit
d51419bf43
13 changed files with 193 additions and 12 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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\
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue