longjmp for Fortran
Assembly Roff C Fortran Makefile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
AUTHORS
LICENSE
Makefile
README
jmptest.f
zdojmp.c
zsvjmp-amd64.s
zsvjmp-arm64.s
zsvjmp-armel.s
zsvjmp-armhf.s
zsvjmp-hurd-i386.s
zsvjmp-i386.s
zsvjmp-kfreebsd-amd64.s
zsvjmp-kfreebsd-i386.s
zsvjmp-libunwind.c
zsvjmp-mips.s
zsvjmp-mips64.S
zsvjmp-mipsel.s
zsvjmp-powerpc.s
zsvjmp-ppc64.S
zsvjmp-ppc64le.S
zsvjmp-s390.s
zsvjmp-s390x.s
zsvjmp-x32.s
zsvjmp.3
zzdebug.c

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.