CACAO
ucontext.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (c) 2003, 2004 *
3  * Panagiotis E. Hadjidoukas (peh@hpclab.ceid.upatras.gr) *
4  * HPCLab - University of Patras. All Rights Reserved. *
5  * Unix ucontext_t on Windows Operating System, May 2004 (revision 1) *
6  * *
7  * The author disclaims all warranties with regard to this software including *
8  * all implied warranties of merchantability and fitness for a particular *
9  * purpose. In no event shall HPCLab be liable for any special, indirect, *
10  * or consequential damages or any damages whatsoever resulting from *
11  * loss of use, data or profits, whether in action of contract negligence, *
12  * or other tortious action, arising out of or in connection with the use *
13  * or performance of this software. *
14  ********************************************************************************/
15 
16 #ifndef UCONTEXT_H
17 #define UCONTEXT_H
18 
19 #include <windows.h>
20 
21 typedef struct __stack {
22  void *ss_sp;
23  size_t ss_size;
24  int ss_flags;
25 } stack_t;
26 
27 typedef CONTEXT mcontext_t;
28 typedef unsigned long __sigset_t;
29 
30 typedef struct __ucontext {
31  unsigned long int uc_flags;
36 } ucontext_t;
37 
38 
39 int getcontext(ucontext_t *ucp);
40 int setcontext(const ucontext_t *ucp);
41 int makecontext(ucontext_t *, void (*)(), int, ...);
42 int swapcontext(ucontext_t *, const ucontext_t *);
43 
44 #endif /* UCONTEXT_H */
unsigned long int uc_flags
Definition: ucontext.h:31
int makecontext(ucontext_t *ucp, void(*func)(), int argc,...)
Definition: ucontext.c:39
__sigset_t uc_sigmask
Definition: ucontext.h:35
size_t ss_size
Definition: ucontext.h:23
#define ucontext_t
Definition: md-os.cpp:33
unsigned long __sigset_t
Definition: ucontext.h:28
int ss_flags
Definition: ucontext.h:24
void * ss_sp
Definition: ucontext.h:22
struct __stack stack_t
stack_t uc_stack
Definition: ucontext.h:33
CONTEXT mcontext_t
Definition: ucontext.h:27
mcontext_t uc_mcontext
Definition: ucontext.h:34
int getcontext(ucontext_t *ucp)
Definition: ucontext.c:18
struct __ucontext * uc_link
Definition: ucontext.h:32
int setcontext(const ucontext_t *ucp)
Definition: ucontext.c:29
int swapcontext(ucontext_t *oucp, const ucontext_t *ucp)
Definition: ucontext.c:75