Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Declare variable DLL_EXPORT for Libs.
[simgrid.git] / src / win32 / win32_ucontext_src / ucontext.h
1 /*\r
2  *      win32-ucontext: Unix ucontext_t operations on Windows platforms\r
3  *      Copyright(C) 2007 Panagiotis E. Hadjidoukas\r
4  *\r
5  *      Contact Email: phadjido@cs.uoi.gr, xdoukas@ceid.upatras.gr\r
6  *\r
7  *      win32-ucontext is free software; you can redistribute it and/or\r
8  *      modify it under the terms of the GNU Lesser General Public\r
9  *      License as published by the Free Software Foundation; either\r
10  *      version 2 of the License, or (at your option) any later version.\r
11  *\r
12  *      win32-ucontext is distributed in the hope that it will be useful,\r
13  *      but WITHOUT ANY WARRANTY; without even the implied warranty of\r
14  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
15  *      Lesser General Public License for more details.\r
16  *\r
17  *      You should have received a copy of the GNU Lesser General Public\r
18  *      License along with QueueUserAPCEx in the file COPYING.LIB;\r
19  *      if not, write to the Free Software Foundation, Inc.,\r
20  *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\r
21  */\r
22 \r
23 #ifndef UCONTEXT_H\r
24 #define UCONTEXT_H\r
25 \r
26 #include <windows.h>\r
27 \r
28 typedef struct __stack {\r
29         void *ss_sp;\r
30         size_t ss_size;\r
31         int ss_flags;\r
32 } stack_t;\r
33 \r
34 typedef CONTEXT mcontext_t;\r
35 typedef unsigned long __sigset_t;\r
36 \r
37 typedef struct __ucontext {\r
38         unsigned long int       uc_flags;\r
39         struct __ucontext       *uc_link;\r
40         stack_t                         uc_stack;\r
41         mcontext_t                      uc_mcontext; \r
42         __sigset_t                      uc_sigmask;\r
43 } ucontext_t;\r
44 \r
45 \r
46 int getcontext(ucontext_t *ucp);\r
47 int setcontext(const ucontext_t *ucp);\r
48 int makecontext(ucontext_t *, void (*)(), int, ...);\r
49 int swapcontext(ucontext_t *, const ucontext_t *);\r
50 \r
51 #endif /* UCONTEXT_H */