https://github.com/olebole/zsvjmp
longjmp for Fortran
https://github.com/olebole/zsvjmp
Last synced: 10 months ago
JSON representation
longjmp for Fortran
- Host: GitHub
- URL: https://github.com/olebole/zsvjmp
- Owner: olebole
- License: other
- Created: 2014-05-04T08:59:56.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2019-03-10T21:22:07.000Z (over 7 years ago)
- Last Synced: 2025-07-14T21:38:58.003Z (11 months ago)
- Language: Assembly
- Size: 20.5 KB
- Stars: 3
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
ZSVJMP, ZDOJMP -- Set up a jump (non-local goto) by saving the processor
registers in the buffer jmpbuf. A subsequent call to ZDOJMP restores
the registers, effecting a call in the context of the procedure which
originally called ZSVJMP, but with the new status code. These are Fortran
callable procedures.
zsvjmp (jmp_buf, status) # (returns status)
zdojmp (jmp_buf, status) # (passes status to zsvjmp)
These routines are directly comparable to the UNIX setjmp/longjmp, except
that they are Fortran callable kernel routines, i.e., trailing underscore,
call by reference, and no function returns. ZSVJMP requires an assembler
jacket routine to avoid modifying the call stack, but relies upon setjmp
to do the real work. ZDOJMP is implemented as a portable C routine in OS,
calling longjmp to do the restore. In these routines, JMP_BUF consists
of one longword containing the address of the STATUS variable, followed
by the "jmp_buf" used by setjmp/longjmp.
The files are initially extracted from the IRAF package in order to make
porting easier.