diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-04-12 14:34:46 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-04-12 14:34:46 +0000 |
commit | e077e67057050ae1c8f4faac4ba0f57ae7ed74e1 (patch) | |
tree | a5ff6f0e33e5efe65ecb8e74203763333cadaaa0 | |
parent | 2ae14dc1eac094ab12a8f2a4530025568f48eab3 (diff) |
Clarify thread-localness in the wake of rfork's removal
-rw-r--r-- | lib/libarch/amd64/amd64_get_fsbase.2 | 16 | ||||
-rw-r--r-- | lib/libarch/i386/i386_get_fsbase.2 | 15 | ||||
-rw-r--r-- | lib/libarch/i386/i386_get_gsbase.2 | 15 |
3 files changed, 28 insertions, 18 deletions
diff --git a/lib/libarch/amd64/amd64_get_fsbase.2 b/lib/libarch/amd64/amd64_get_fsbase.2 index c15c78598e1..73b525e8ab2 100644 --- a/lib/libarch/amd64/amd64_get_fsbase.2 +++ b/lib/libarch/amd64/amd64_get_fsbase.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: amd64_get_fsbase.2,v 1.1 2011/04/05 21:14:00 guenther Exp $ +.\" $OpenBSD: amd64_get_fsbase.2,v 1.2 2012/04/12 14:34:45 guenther Exp $ .\" $NetBSD: i386_get_ioperm.2,v 1.3 1996/02/27 22:57:17 jtc Exp $ .\" .\" Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: April 5 2011 $ +.Dd $Mdocdate: April 12 2012 $ .Dt AMD64_GET_FSBASE 2 amd64 .Os .Sh NAME @@ -52,10 +52,11 @@ referenced by sets the base address of the %fs segment to the address .Fa base . .Pp -When rfork(RFPROC | RFTHREAD) is used, the segment base address -for the above calls is a per-thread value. -When a new thread is created, -it inherits the base from the thread that created it. +The segment base address is local to each thread. +The initial thread of a new process inherits its segment base address +from the parent thread. +.Fn __tfork +sets the initial segment base address for threads that it creates. .Pp .Sy Note: Code using the @@ -81,6 +82,9 @@ will fail if: .Fa base points outside the process's allocated address space. .El +.Sh SEE ALSO +.Xr fork 2 , +.Xr __tfork 2 .Sh WARNING The ELF Thread-Local Storage ABI reserves %fs for its own use and requires that the dynamic linker and thread library set it to diff --git a/lib/libarch/i386/i386_get_fsbase.2 b/lib/libarch/i386/i386_get_fsbase.2 index 13519f043a1..c0451e8213b 100644 --- a/lib/libarch/i386/i386_get_fsbase.2 +++ b/lib/libarch/i386/i386_get_fsbase.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: i386_get_fsbase.2,v 1.1 2011/03/12 04:12:29 guenther Exp $ +.\" $OpenBSD: i386_get_fsbase.2,v 1.2 2012/04/12 14:34:45 guenther Exp $ .\" $NetBSD: i386_get_ioperm.2,v 1.3 1996/02/27 22:57:17 jtc Exp $ .\" .\" Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: March 12 2011 $ +.Dd $Mdocdate: April 12 2012 $ .Dt I386_GET_FSBASE 2 i386 .Os .Sh NAME @@ -53,10 +53,11 @@ sets the base address of the segment that, by default, is referenced by %fs to the address .Fa base . .Pp -When rfork(RFPROC | RFTHREAD) is used, the segment base address -for the above calls is a per-thread value. -When a new thread is created, -it inherits the base from the thread that created it. +The segment base address is local to each thread. +The initial thread of a new process inherits its segment base address +from the parent thread. +.Fn __tfork +sets the initial segment base address for threads that it creates. .Pp .Sy Note: Code using the @@ -83,6 +84,8 @@ will fail if: points outside the process's allocated address space. .El .Sh SEE ALSO +.Xr fork 2 , +.Xr __tfork 2 .Rs .%A Intel .%T i386 Microprocessor Programmer's Reference Manual diff --git a/lib/libarch/i386/i386_get_gsbase.2 b/lib/libarch/i386/i386_get_gsbase.2 index dfccbdcde02..3db82c63a2d 100644 --- a/lib/libarch/i386/i386_get_gsbase.2 +++ b/lib/libarch/i386/i386_get_gsbase.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: i386_get_gsbase.2,v 1.1 2011/03/12 04:12:29 guenther Exp $ +.\" $OpenBSD: i386_get_gsbase.2,v 1.2 2012/04/12 14:34:45 guenther Exp $ .\" $NetBSD: i386_get_ioperm.2,v 1.3 1996/02/27 22:57:17 jtc Exp $ .\" .\" Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: March 12 2011 $ +.Dd $Mdocdate: April 12 2012 $ .Dt I386_GET_GSBASE 2 i386 .Os .Sh NAME @@ -53,10 +53,11 @@ sets the base address of the segment that, by default, is referenced by %gs to the address .Fa base . .Pp -When rfork(RFPROC | RFTHREAD) is used, the segment base address -for the above calls is a per-thread value. -When a new thread is created, -it inherits the base from the thread that created it. +The segment base address is local to each thread. +The initial thread of a new process inherits its segment base address +from the parent thread. +.Fn __tfork +sets the initial segment base address for threads that it creates. .Pp .Sy Note: Code using the @@ -83,6 +84,8 @@ will fail if: points outside the process's allocated address space. .El .Sh SEE ALSO +.Xr fork 2 , +.Xr __tfork 2 .Rs .%A Intel .%T i386 Microprocessor Programmer's Reference Manual |