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
38 typedef struct __stack {
43 typedef CONTEXT mcontext_t;
44 typedef unsigned long __sigset_t;
45 typedef struct __ucontext {
46 unsigned long int uc_flags;
47 struct __ucontext *uc_link;
49 mcontext_t uc_mcontext;
50 __sigset_t uc_sigmask;
52 int getcontext(ucontext_t * ucp);
53 int setcontext(const ucontext_t * ucp);
54 int makecontext(ucontext_t *, void (*)(), int, ...);
55 int swapcontext(ucontext_t *, const ucontext_t *);
60 #endif /* UCONTEXT_H */