From 868983b032bd55f798754dcba65073ff2089455f Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Mon, 23 Mar 2020 17:38:20 +0000 Subject: [PATCH] Add STANDARDS and HISTORY to getcontext(3), makecontext(3), and ucontext(3). Obtained from: NetBSD MFC after: 2 weeks Sponsored by: DARPA --- lib/libc/gen/getcontext.3 | 34 +++++++++++++++++++++++++++++++- lib/libc/gen/makecontext.3 | 40 +++++++++++++++++++++++++++++++++++++- lib/libc/gen/ucontext.3 | 14 ++++++++++++- 3 files changed, 85 insertions(+), 3 deletions(-) diff --git a/lib/libc/gen/getcontext.3 b/lib/libc/gen/getcontext.3 index 9e3e4fccb47b..f093f674edd1 100644 --- a/lib/libc/gen/getcontext.3 +++ b/lib/libc/gen/getcontext.3 @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 13, 2013 +.Dd March 23, 2020 .Dt GETCONTEXT 3 .Os .Sh NAME @@ -148,3 +148,35 @@ No memory was available to allocate for the context or some extended state. .Xr sigaltstack 2 , .Xr makecontext 3 , .Xr ucontext 3 +.Sh STANDARDS +The +.Fn getcontext +and +.Fn setcontext +functions conform to +.St -xsh5 +and +.St -p1003.1-2001 . +The +.Va errno +indications are an extension to the standard. +.Pp +The +.St -p1003.1-2004 +revision marked the functions +.Fn getcontext +and +.Fn setcontext +as obsolete, citing portability issues and recommending the use of +.Tn POSIX +threads instead. +The +.St -p1003.1-2008 +revision removed the functions from the specification. +.Sh HISTORY +The +.Fn getcontext +and +.Fn setcontext +functions first appeared in +.At V.4 . diff --git a/lib/libc/gen/makecontext.3 b/lib/libc/gen/makecontext.3 index 286a4be9950b..e75681795bee 100644 --- a/lib/libc/gen/makecontext.3 +++ b/lib/libc/gen/makecontext.3 @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 31, 2018 +.Dd March 23, 2020 .Dt MAKECONTEXT 3 .Os .Sh NAME @@ -123,3 +123,41 @@ to complete the operation. .Sh SEE ALSO .Xr setcontext 3 , .Xr ucontext 3 +.Sh STANDARDS +The +.Fn makecontext +and +.Fn swapcontext +functions conform to +.St -xsh5 +and +.St -p1003.1-2001 . +.Pp +The +.St -p1003.1-2004 +revision marked the functions +.Fn makecontext +and +.Fn swapcontext +as obsolete, citing portability issues and recommending the use of +.Tn POSIX +threads instead. +The +.St -p1003.1-2008 +revision removed the functions from the specification. +.Pp +.Bf -symbolic +The standard does not clearly define the type of integer arguments +passed to +.Fa func +via +.Fn makecontext ; +portable applications should not rely on the implementation detail that +it may be possible to pass pointer arguments to functions. +.Sh HISTORY +The +.Fn makecontext +and +.Fn swapcontext +functions first appeared in +.At V.4 . diff --git a/lib/libc/gen/ucontext.3 b/lib/libc/gen/ucontext.3 index 69ecbc1793e0..d6e05dc2c1fa 100644 --- a/lib/libc/gen/ucontext.3 +++ b/lib/libc/gen/ucontext.3 @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 10, 2002 +.Dd March 23, 2020 .Dt UCONTEXT 3 .Os .Sh NAME @@ -109,3 +109,15 @@ structures: .Xr getcontext 3 , .Xr getcontextx 3 , .Xr makecontext 3 +.Sh STANDARDS +The +.Vt ucontext_t +type conforms to +.St -xsh5 +and +.St -p1003.1-2001 . +The +.St -p1003.1-2008 +revision removed the +.Vt ucontext_t +from the specification.