makecontext.3 (108030) | makecontext.3 (108087) |
---|---|
1.\" Copyright (c) 2002 Packet Design, LLC. 2.\" All rights reserved. 3.\" 4.\" Subject to the following obligations and disclaimer of warranty, 5.\" use and redistribution of this software, in source or object code 6.\" forms, with or without modifications are expressly permitted by 7.\" Packet Design; provided, however, that: 8.\" --- 19 unchanged lines hidden (view full) --- 28.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE, OR CONSEQUENTIAL 29.\" DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF 30.\" USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY THEORY OF 31.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 32.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 33.\" THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF 34.\" THE POSSIBILITY OF SUCH DAMAGE. 35.\" | 1.\" Copyright (c) 2002 Packet Design, LLC. 2.\" All rights reserved. 3.\" 4.\" Subject to the following obligations and disclaimer of warranty, 5.\" use and redistribution of this software, in source or object code 6.\" forms, with or without modifications are expressly permitted by 7.\" Packet Design; provided, however, that: 8.\" --- 19 unchanged lines hidden (view full) --- 28.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE, OR CONSEQUENTIAL 29.\" DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF 30.\" USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY THEORY OF 31.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 32.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 33.\" THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF 34.\" THE POSSIBILITY OF SUCH DAMAGE. 35.\" |
36.\" $FreeBSD: head/lib/libc/gen/makecontext.3 108030 2002-12-18 10:13:54Z ru $ | 36.\" $FreeBSD: head/lib/libc/gen/makecontext.3 108087 2002-12-19 09:40:28Z ru $ |
37.\" 38.Dd September 10, 2002 39.Dt MAKECONTEXT 3 40.Os 41.Sh NAME 42.Nm makecontext , swapcontext 43.Nd modify and exchange user thread contexts 44.Sh LIBRARY --- 15 unchanged lines hidden (view full) --- 60modifies the user thread context pointed to by 61.Fa ucp , 62which must have previously been initialized by a call to 63.Xr getcontext 3 64and had a stack allocated for it. 65The context is modified so that it will continue execution by invoking 66.Fn func 67with the arguments provided. | 37.\" 38.Dd September 10, 2002 39.Dt MAKECONTEXT 3 40.Os 41.Sh NAME 42.Nm makecontext , swapcontext 43.Nd modify and exchange user thread contexts 44.Sh LIBRARY --- 15 unchanged lines hidden (view full) --- 60modifies the user thread context pointed to by 61.Fa ucp , 62which must have previously been initialized by a call to 63.Xr getcontext 3 64and had a stack allocated for it. 65The context is modified so that it will continue execution by invoking 66.Fn func 67with the arguments provided. |
68The |
|
68.Fa argc | 69.Fa argc |
70argument |
|
69must be equal to the number of additional arguments provided to 70.Fn makecontext | 71must be equal to the number of additional arguments provided to 72.Fn makecontext |
71and also equal to the number of parameters to | 73and also equal to the number of arguments to |
72.Fn func , 73or else the behavior is undefined. 74.Pp | 74.Fn func , 75or else the behavior is undefined. 76.Pp |
77The |
|
75.Fa "ucp->uc_link" | 78.Fa "ucp->uc_link" |
79argument |
|
76must be initialized before calling 77.Fn makecontext 78and determines the action to take when 79.Fn func 80returns: 81if equal to 82.Dv NULL , 83the process exits; --- 33 unchanged lines hidden --- | 80must be initialized before calling 81.Fn makecontext 82and determines the action to take when 83.Fn func 84returns: 85if equal to 86.Dv NULL , 87the process exits; --- 33 unchanged lines hidden --- |