notejmp.c 222 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->r1 = ret;
  9. if(ret == 0)
  10. r->r1 = 1;
  11. r->pc = j[JMPBUFPC];
  12. r->sp = j[JMPBUFSP];
  13. noted(NCONT);
  14. }