jehanne/sys/src/lib/jehanne/amd64/notejmp.c

17 lines
238 B
C
Raw Normal View History

#include <u.h>
#include <libc.h>
#include <ureg.h>
void
jehanne_notejmp(void *vr, jmp_buf j, int ret)
{
struct Ureg *r = vr;
r->ax = ret;
if(ret == 0)
r->ax = 1;
r->ip = j[JMPBUFPC];
r->sp = j[JMPBUFSP] + 8;
2019-11-26 02:25:23 +01:00
sys_noted(NCONT);
}