1 /* Copyright (c) 2010, 2014. The SimGrid Team.
\r
2 * All rights reserved. */
\r
4 /* This program is free software; you can redistribute it and/or modify it
\r
5 * under the terms of the license (GNU LGPL) which comes with this package. */
\r
8 * win32-ucontext: Unix ucontext_t operations on Windows platforms
\r
9 * Copyright(C) 2007 Panagiotis E. Hadjidoukas
\r
11 * Contact Email: phadjido@cs.uoi.gr, xdoukas@ceid.upatras.gr
\r
13 * win32-ucontext is free software; you can redistribute it and/or
\r
14 * modify it under the terms of the GNU Lesser General Public
\r
15 * License as published by the Free Software Foundation; either
\r
16 * version 2 of the License, or (at your option) any later version.
\r
18 * win32-ucontext is distributed in the hope that it will be useful,
\r
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
\r
21 * Lesser General Public License for more details.
\r
23 * You should have received a copy of the GNU Lesser General Public
\r
24 * License along with SimGrid in the file LICENSE-LGPL-2.1;
\r
25 * if not, write to the Free Software Foundation, Inc.,
\r
26 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
\r
32 #include <windows.h>
\r
33 typedef struct __stack {
\r
38 typedef CONTEXT mcontext_t;
\r
39 typedef unsigned long __sigset_t;
\r
40 typedef struct __ucontext {
\r
41 unsigned long int uc_flags;
\r
42 struct __ucontext *uc_link;
\r
44 mcontext_t uc_mcontext;
\r
45 __sigset_t uc_sigmask;
\r
47 int getcontext(ucontext_t * ucp);
\r
48 int setcontext(const ucontext_t * ucp);
\r
49 int makecontext(ucontext_t *, void (*)(), int, ...);
\r
50 int swapcontext(ucontext_t *, const ucontext_t *);
\r
52 #endif /* UCONTEXT_H */
\r