Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/gen more about sigsetjmp/siglongjmp.



details:   https://anonhg.NetBSD.org/src/rev/ce795b43b64e
branches:  trunk
changeset: 535097:ce795b43b64e
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sat Aug 10 05:05:24 2002 +0000

description:
more about sigsetjmp/siglongjmp.
from openbsd.

diffstat:

 lib/libc/gen/setjmp.3 |  27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r 48c6a6afc404 -r ce795b43b64e lib/libc/gen/setjmp.3
--- a/lib/libc/gen/setjmp.3     Sat Aug 10 04:50:39 2002 +0000
+++ b/lib/libc/gen/setjmp.3     Sat Aug 10 05:05:24 2002 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: setjmp.3,v 1.10 2002/07/10 14:37:14 yamt Exp $
+.\"    $NetBSD: setjmp.3,v 1.11 2002/08/10 05:05:24 yamt Exp $
 .\"
 .\" Copyright (c) 1990, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -137,7 +137,30 @@
 function
 pairs save and restore the signal mask if the argument
 .Fa savemask
-is non-zero, otherwise only the register set and the stack are saved.
+is non-zero.
+Otherwise, only the register set and the stack are saved.
+.Pp
+In other words,
+.Fn setjmp Ns / Ns Fn longjmp
+are functionally equivalent to
+.Fn sigsetjmp Ns / Ns Fn siglongjmp
+when
+.Fn sigsetjmp
+is called with a non-zero
+.Fa savemask
+argument.
+Conversely,
+.Fn _setjmp Ns / Ns Fn _longjmp
+are functionally equivalent to
+.Fn sigsetjmp Ns / Ns Fn siglongjmp
+when
+.Fn sigsetjmp
+is called with a zero-value
+.Fa savemask .
+.Pp
+The
+.Fn sigsetjmp Ns / Ns Fn siglongjmp
+interfaces are preferred for maximum portability.
 .Sh ERRORS
 If the contents of the
 .Fa env



Home | Main Index | Thread Index | Old Index