Module Name: src
Committed By: wiz
Date: Thu Apr 16 18:37:30 UTC 2009
Modified Files:
src/lib/libc/gen: makecontext.3
src/lib/libc/sys: sigaltstack.2
src/lib/libpthread: README pthread.3
Log Message:
Add CAVEATS section:
Due to limitations in the current pthread implementation, makecontext(3)
and sigaltstack(2) should not be used in programs which link against
libpthread (whether threads are used or not).
Wording from drochner@ and ad@
Bump date for man pages.
Add note in libpthread/README so it's not forgotten to update the man
pages when the problem is fixed.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/gen/makecontext.3
cvs rdiff -u -r1.21 -r1.22 src/lib/libc/sys/sigaltstack.2
cvs rdiff -u -r1.5 -r1.6 src/lib/libpthread/README
cvs rdiff -u -r1.10 -r1.11 src/lib/libpthread/pthread.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/gen/makecontext.3
diff -u src/lib/libc/gen/makecontext.3:1.5 src/lib/libc/gen/makecontext.3:1.6
--- src/lib/libc/gen/makecontext.3:1.5 Wed Apr 30 13:10:50 2008
+++ src/lib/libc/gen/makecontext.3 Thu Apr 16 18:37:30 2009
@@ -1,6 +1,6 @@
-.\" $NetBSD: makecontext.3,v 1.5 2008/04/30 13:10:50 martin Exp $
+.\" $NetBSD: makecontext.3,v 1.6 2009/04/16 18:37:30 wiz Exp $
.\"
-.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2001, 2009 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd June 13, 2001
+.Dd April 16, 2009
.Dt MAKECONTEXT 3
.Os
.Sh NAME
@@ -114,9 +114,8 @@
.It Bq Er EFAULT
The
.Fa oucp
-argument points to an invalid address.
-.It Bq Er EFAULT
-The
+argument or the
+the
.Fa ucp
argument points to an invalid address.
.It Bq Er EINVAL
@@ -154,3 +153,9 @@
.Fn swapcontext
functions first appeared in
.At V.4 .
+.Sh CAVEATS
+Due to limitations in the current pthread implementation,
+.Nm
+should not be used in programs which link against the
+.Xr pthread 3
+library (whether threads are used or not).
Index: src/lib/libc/sys/sigaltstack.2
diff -u src/lib/libc/sys/sigaltstack.2:1.21 src/lib/libc/sys/sigaltstack.2:1.22
--- src/lib/libc/sys/sigaltstack.2:1.21 Tue Mar 22 20:25:31 2005
+++ src/lib/libc/sys/sigaltstack.2 Thu Apr 16 18:37:29 2009
@@ -1,4 +1,4 @@
-.\" $NetBSD: sigaltstack.2,v 1.21 2005/03/22 20:25:31 kleink Exp $
+.\" $NetBSD: sigaltstack.2,v 1.22 2009/04/16 18:37:29 wiz Exp $
.\"
.\" Copyright (c) 1983, 1991, 1992, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)sigaltstack.2 8.2 (Berkeley) 5/1/95
.\"
-.Dd May 1, 1995
+.Dd April 16, 2009
.Dt SIGALTSTACK 2
.Os
.Sh NAME
@@ -170,3 +170,9 @@
.Fn sigstack
system call, appeared in
.Bx 4.2 .
+.Sh CAVEATS
+Due to limitations in the current pthread implementation,
+.Nm
+should not be used in programs which link against the
+.Xr pthread 3
+library (whether threads are used or not).
Index: src/lib/libpthread/README
diff -u src/lib/libpthread/README:1.5 src/lib/libpthread/README:1.6
--- src/lib/libpthread/README:1.5 Tue Oct 16 15:21:54 2007
+++ src/lib/libpthread/README Thu Apr 16 18:37:30 2009
@@ -1,4 +1,9 @@
-$NetBSD: README,v 1.5 2007/10/16 15:21:54 ad Exp $
+$NetBSD: README,v 1.6 2009/04/16 18:37:30 wiz Exp $
When making changes to libpthread, please ensure that libpthread_dbg
still compiles.
+
+Due to limitations in the current pthread implementation, makecontext(3)
+and sigaltstack(2) should not be used in programs which link against
+libpthread (whether threads are used or not). This has been noted in the
+makecontext(3), sigaltstack(2), and pthread(3) man pages.
Index: src/lib/libpthread/pthread.3
diff -u src/lib/libpthread/pthread.3:1.10 src/lib/libpthread/pthread.3:1.11
--- src/lib/libpthread/pthread.3:1.10 Sat Apr 11 16:51:28 2009
+++ src/lib/libpthread/pthread.3 Thu Apr 16 18:37:30 2009
@@ -1,6 +1,6 @@
-.\" $NetBSD: pthread.3,v 1.10 2009/04/11 16:51:28 wiz Exp $
+.\" $NetBSD: pthread.3,v 1.11 2009/04/16 18:37:30 wiz Exp $
.\"
-.\" Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2003, 2007, 2009 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd October 8, 2008
+.Dd April 16, 2009
.Dt PTHREAD 3
.Os
.Sh NAME
@@ -158,3 +158,11 @@
.Nm
library conforms to
.St -p1003.1-2001 .
+.Sh CAVEATS
+Due to limitations in the current pthread implementation,
+.Xr makecontext 3
+and
+.Xr sigaltstack 2
+should not be used in programs which link against the
+.Nm
+library (whether threads are used or not).