Skip to content

Commit

Permalink
remove Csetjmp__Jumpbuf_size from Modula-3 interface, will replace wi…
Browse files Browse the repository at this point in the history
…th private C/m3front-only

m3_jmpbuf_size
  • Loading branch information
jaykrell committed Aug 6, 2015
1 parent de2adc0 commit b65d81f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions m3-libs/m3core/src/C/Common/Csetjmp.i3
Expand Up @@ -5,11 +5,23 @@
UNSAFE INTERFACE Csetjmp;
FROM Ctypes IMPORT int;

(* jmp_buf is allocated with alloca(Csetjmp__Jumpbuf_size)
(* TODO? Move this to C?
"u" in "ulongjmp" is probably for "underscore".
This variant of longjmp never restores the signal mask.
Because we believe we never change it?
And restoring it is less efficient? (Requires possible kernel
interaction?)
If the platform only has "regular" longjmp and no signal mask,
e.g. Win32, then this is resolved to that.
This function does not return in the usual sense.
This is used to raise an exception.
This is subject to be removed, either by using C, or "libunwind", or
Win32 exceptions, or C++ exceptions.
*)
<*EXTERNAL "Csetjmp__Jumpbuf_size" *> VAR Jumpbuf_size: INTEGER;
<*EXTERNAL "Csetjmp__ulongjmp" *> PROCEDURE ulongjmp (env: ADDRESS; val: int);

END Csetjmp.

0 comments on commit b65d81f

Please sign in to comment.