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