From f568417427d1845e224f8cef3c24b50cf469626b Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Thu, 25 Jul 1991 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1991-07-25 --- gnot/l.s | 1 - gnot/trap.c | 3 +-- pc/trap.c | 7 +++---- power/devhotrod.c | 7 +++++++ power/trap.c | 3 +-- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/gnot/l.s b/gnot/l.s index db3da7f5f1f7642a80a8e88a648956643ce0d04c..2a4d6bd3798ca25af2c55aba8b9c8e162d208913 100644 --- a/gnot/l.s +++ b/gnot/l.s @@ -170,7 +170,6 @@ TEXT rfnote(SB), $0 MOVL A0, USP MOVEM (A7), $0x7FFF ADDL $((8+8+1+1)*BY2WD), A7 - MOVL $-1, R0 /* note causes error in sys call */ RTE TEXT illegal(SB), $0 diff --git a/gnot/trap.c b/gnot/trap.c index 1bf8261228a1ec06a513479ec137f5ff1f379efd..9ebd7f2cc71cf96966b08207418bd6e11080d05a 100644 --- a/gnot/trap.c +++ b/gnot/trap.c @@ -211,7 +211,6 @@ noted(Ureg *ur, ulong arg0) } u->notified = 0; memmove(ur, u->ureg, sizeof(Ureg)); - ur->r0 = -1; /* return error from the interrupted call */ switch(arg0){ case NCONT: splhi(); @@ -344,7 +343,7 @@ syscall(Ureg *aur) if(r0 == NOTED) /* ugly hack */ noted(aur, *(ulong*)(sp+BY2WD)); /* doesn't return */ - if(u->nnote){ + if(u->nnote && r0!=FORK){ ur->r0 = ret; notify(ur); } diff --git a/pc/trap.c b/pc/trap.c index 7ff17ba6731366fd0d78489185c5db4569863fd2..971ced4005306571c1802933ac071e73f86591eb 100644 --- a/pc/trap.c +++ b/pc/trap.c @@ -256,10 +256,9 @@ syscall(Ureg *ur) panic("error stack"); } u->p->insyscall = 0; - if(ax == NOTED){ + if(ax == NOTED) noted(ur, *(ulong*)(sp+BY2WD)); - ret = -1; - } else if(u->nnote && ax!=FORK){ + else if(u->nnote && ax!=FORK){ ur->ax = ret; notify(ur); } @@ -346,7 +345,7 @@ noted(Ureg *ur, ulong arg0) u->notified = 0; nur->flags = (u->svflags&0xffffff00) | (ur->flags&0xff); memmove(ur, u->ureg, sizeof(Ureg)); - ur->ax = -1; /* return error from the interrupted syscall */ +/* ur->ax = -1; /* return error from the interrupted syscall */ switch(arg0){ case NCONT: splhi(); diff --git a/power/devhotrod.c b/power/devhotrod.c index e2debd461c5fe49ba9befa5537b8652a784e3da3..8e9b758816c8b96ecc6381f22b4e682257c04def 100644 --- a/power/devhotrod.c +++ b/power/devhotrod.c @@ -204,7 +204,14 @@ hotrodopen(Chan *c, int omode) hotwait(hmp); delay(100); print("testing addr %lux size %ld\n", mp->param[0], mp->param[1]); + if(mp->param[0] == MP2VME(testbuf)){ + print("no way jose\n"); + unlock(&hp->busy); + error(Egreg); + } + for(;;){ +for(;;); print("-"); mem(hp->addr, &hp->addr->ram[(mp->param[0]-0x40000)/sizeof(ulong)], mp->param[1]); } diff --git a/power/trap.c b/power/trap.c index ee6858195e2bb8b8cf5232c01f7b7a4dd5f46393..d9b54dbc67afb33591a02f7981bf05eace7ce487 100644 --- a/power/trap.c +++ b/power/trap.c @@ -438,7 +438,6 @@ noted(Ureg **urp, ulong arg0) } u->notified = 0; memmove(*urp, u->ureg, sizeof(Ureg)); - (*urp)->r1 = -1; /* return error from the interrupted call */ switch(arg0){ case NCONT: splhi(); @@ -572,7 +571,7 @@ syscall(Ureg *aur) u->p->insyscall = 0; if(r1 == NOTED) /* ugly hack */ noted(&aur, *(ulong*)(sp+BY2WD)); /* doesn't return */ - if(u->nnote){ + if(u->nnote && r1!=FORK){ ur->r1 = ret; notify(ur); }