| plan 9 kernel history: overview | file list | diff list |
1991/1112/gnot/trap.c (diff list | history)
| 1991/1108/sys/src/9/gnot/trap.c:88,95 – 1991/1112/sys/src/9/gnot/trap.c:88,97 (short | long | prev | next) | ||
| 1990/03091 | user = !(ur->sr&SUPER); | |
| 1991/1112 | if(u) { | |
| 1990/03091 | u->p->pc = ur->pc; /* BUG */ | |
| 1991/1112 | u->dbgreg = ur; } | |
| 1990/03091 | if(user){ | |
| 1991/0705 | sprint(buf, "sys: %s pc=0x%lux", excname(ur->vo), ur->pc); | |
| 1990/03091 | postnote(u->p, 1, buf, NDebug); | |
| 1991/1108/sys/src/9/gnot/trap.c:99,110 – 1991/1112/sys/src/9/gnot/trap.c:101,108 | ||
| 1990/03091 | exit(); } | |
| 1991/0705 | ||
| 1991/1108 |
| |
| 1991/1112 | if(user) notify(ur); | |
| 1990/03091 | } void | |
| 1991/1108/sys/src/9/gnot/trap.c:147,157 – 1991/1112/sys/src/9/gnot/trap.c:145,156 | ||
| 1990/03091 | { ulong sp; | |
| 1991/1112 | if(u->p->procctl) procctl(u->p); if(u->nnote==0) | |
| 1990/03091 | return; | |
| 1991/1112 | lock(&u->p->debug); | |
| 1991/0727 | u->p->notepending = 0; | |
| 1990/03091 | if(u->note[0].flag!=NUser && (u->notified || u->notify==0)){ if(u->note[0].flag == NDebug) | |
| 1991/1108/sys/src/9/gnot/trap.c:259,264 – 1991/1112/sys/src/9/gnot/trap.c:258,264 | ||
| 1990/03091 | u->p->insyscall = 1; ur = aur; | |
| 1991/1112 | u->dbgreg = aur; | |
| 1990/0312 | u->p->pc = ur->pc; | |
| 1990/03091 | if(ur->sr & SUPER) panic("recursive system call"); | |
| 1991/1108/sys/src/9/gnot/trap.c:306,320 – 1991/1112/sys/src/9/gnot/trap.c:306,317 | ||
| 1990/0511 | } | |
| 1991/0705 | ||
| 1991/1108 | u->nerrlab = 0; | |
| 1991/0705 | ||
| 1990/03091 | u->p->insyscall = 0; | |
| 1991/0926 | u->p->psstate = 0; | |
| 1991/0705 | if(r0 == NOTED) /* ugly hack */ | |
| 1991/0717 | noted(aur, *(ulong*)(sp+BY2WD)); /* doesn't return */ | |
| 1991/0725 |
| |
| 1991/1112 | if(u->p->procctl || (u->nnote && r0!=FORK)){ | |
| 1990/03091 | ur->r0 = ret; notify(ur); } | |
| 1991/1108/sys/src/9/gnot/trap.c:325,328 – 1991/1112/sys/src/9/gnot/trap.c:322,349 | ||
| 1990/1226 | execpc(ulong entry) { ((Ureg*)UREGADDR)->pc = entry; | |
| 1991/1112 | } /* This routine must save the values of registers the user is not permitted to write * from devproc and the restore the saved values before returning */ void setregisters(Ureg *xp, char *pureg, char *uva, int n) { ushort sr; ulong magic; ushort vo; char microstate[UREGVARSZ]; sr = xp->sr; vo = xp->vo; magic = xp->magic; memmove(microstate, xp->microstate, UREGVARSZ); memmove(pureg, uva, n); xp->sr = (sr&0xff00) |(xp->sr&0xff); xp->vo = vo; xp->magic = magic; memmove(xp->microstate, microstate, UREGVARSZ); | |
| 1990/03091 | } | |