From 78e51a8c6678b6e3dff3d619aa786669f531f4bc Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 14 Jan 2005 03:45:44 +0000 Subject: checkpoint --- man/man3/setjmp.html | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 man/man3/setjmp.html (limited to 'man/man3/setjmp.html') diff --git a/man/man3/setjmp.html b/man/man3/setjmp.html new file mode 100644 index 00000000..b22431fd --- /dev/null +++ b/man/man3/setjmp.html @@ -0,0 +1,110 @@ + +setjmp(3) - Plan 9 from User Space + + + + +
+
+
SETJMP(3)SETJMP(3) +
+
+

NAME
+ +
+ + setjmp, longjmp, notejmp – non-local goto
+ +
+

SYNOPSIS
+ +
+ + #include <u.h>
+ #include <libc.h> +
+
+ int    setjmp(jmp_buf env) +
+
+ void longjmp(jmp_buf env, int val) +
+
+ void notejmp(void *uregs, jmp_buf env, int val)
+
+
+

DESCRIPTION
+ +
+ + These routines are useful for dealing with errors and interrupts + encountered in a low-level subroutine of a program. +
+ + Setjmp saves its stack environment in env for later use by longjmp. + It returns value 0. +
+ + Longjmp restores the environment saved by the last call of setjmp. + It then causes execution to continue as if the call of setjmp + had just returned with value val. The invoker of setjmp must not + itself have returned in the interim. All accessible data have + values as of the time longjmp was called. +
+ + Notejmp is the same as longjmp except that it is to be called + from within a note handler (see notify(3)). The uregs argument + should be the first argument passed to the note handler. +
+ + Setjmp and longjmp can also be used to switch stacks.
+ +
+

SOURCE
+ +
+ + /usr/local/plan9/src/lib9/jmp.c
+
+
+

SEE ALSO
+ +
+ + notify(3)
+ +
+

BUGS
+ +
+ + +
+ + Notejmp cannot recover from an address trap or bus error (page + fault) on the 680x0 architectures. +
+ + To avoid name conflicts with the underlying system, setjmp, longjmp, + notejmp, and jmp_buf are preprocessor macros defined as p9setjmp, + p9longjmp, p9notejmp, and p9jmp_buf; see intro(3). +
+ + P9setjmp is implemented as a preprocessor macro that calls sigsetjmp + (see Unix’s setjmp(3)).
+ +
+ +

+
+
+ + +
+
+
+Space Glenda +
+
+ + -- cgit v1.2.3