Temporary code for debugging purposes
[reactos.git] / posix / include / ucontext.h
1 /* $Id: ucontext.h,v 1.2 2002/02/20 09:17:55 hyperion Exp $
2 */
3 /*
4 * ucontext.h
5 *
6 * user context. Conforming to the Single UNIX(r) Specification Version 2,
7 * System Interface & Headers Issue 5
8 *
9 * This file is part of the ReactOS Operating System.
10 *
11 * Contributors:
12 * Created by KJK::Hyperion <noog@libero.it>
13 *
14 * THIS SOFTWARE IS NOT COPYRIGHTED
15 *
16 * This source code is offered for use in the public domain. You may
17 * use, modify or distribute it freely.
18 *
19 * This code is distributed in the hope that it will be useful but
20 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
21 * DISCLAMED. This includes but is not limited to warranties of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 *
24 */
25 #ifndef __UCONTEXT_H_INCLUDED__
26 #define __UCONTEXT_H_INCLUDED__
27
28 /* INCLUDES */
29 #include <signal.h>
30
31 /* OBJECTS */
32
33 /* TYPES */
34 typedef void * mcontext_t;
35
36 typedef struct __tagucontext_t ucontext_t;
37
38 struct __tagucontext_t
39 {
40 ucontext_t *uc_link; /* pointer to the context that will be resumed
41 when this context returns */
42 sigset_t uc_sigmask; /* the set of signals that are blocked when this
43 context is active */
44 stack_t uc_stack; /* the stack used by this context */
45 mcontext_t uc_mcontext; /* a machine-specific representation of the saved
46 context */
47 };
48
49 /* CONSTANTS */
50
51 /* PROTOTYPES */
52 int getcontext(ucontext_t *);
53 int setcontext(const ucontext_t *);
54 void makecontext(ucontext_t *, (void *)(), int, ...);
55 int swapcontext(ucontext_t *, const ucontext_t *);
56
57 /* MACROS */
58
59 #endif /* __UCONTEXT_H_INCLUDED__ */
60
61 /* EOF */
62