notejmp.c 226 B

12345678910111213141516
  1. #include <u.h>
  2. #include <libc.h>
  3. #include <ureg.h>
  4. void
  5. notejmp(void *vr, jmp_buf j, int ret)
  6. {
  7. struct Ureg *r = vr;
  8. r->ax = ret;
  9. if(ret == 0)
  10. r->ax = 1;
  11. r->pc = j[JMPBUFPC];
  12. r->sp = j[JMPBUFSP] + 4;
  13. noted(NCONT);
  14. }