Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / include / xbt / win32_ucontext.h
index 12665bf..76360db 100644 (file)
@@ -4,49 +4,57 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-/*\r
- *      win32-ucontext: Unix ucontext_t operations on Windows platforms\r
- *      Copyright(C) 2007 Panagiotis E. Hadjidoukas\r
- *\r
- *      Contact Email: phadjido@cs.uoi.gr, xdoukas@ceid.upatras.gr\r
- *\r
- *      win32-ucontext is free software; you can redistribute it and/or\r
- *      modify it under the terms of the GNU Lesser General Public\r
- *      License as published by the Free Software Foundation; either\r
- *      version 2 of the License, or (at your option) any later version.\r
- *\r
- *      win32-ucontext is distributed in the hope that it will be useful,\r
- *      but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- *      Lesser General Public License for more details.\r
- *\r
- *      You should have received a copy of the GNU Lesser General Public\r
- *      License along with SimGrid in the file LICENSE-LGPL-2.1;\r
- *      if not, write to the Free Software Foundation, Inc.,\r
- *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\r
- */  \r
-    \r
-#ifndef UCONTEXT_H\r
-#define UCONTEXT_H\r
-    \r
-#include <windows.h>\r
-    typedef struct __stack {\r
-  void *ss_sp;\r
-  size_t ss_size;\r
-  int ss_flags;\r
-} stack_t;\r
-typedef CONTEXT mcontext_t;\r
-typedef unsigned long __sigset_t;\r
-typedef struct __ucontext {\r
-  unsigned long int uc_flags;\r
-  struct __ucontext *uc_link;\r
-  stack_t uc_stack;\r
-  mcontext_t uc_mcontext;\r
-  __sigset_t uc_sigmask;\r
-} ucontext_t;\r
-int getcontext(ucontext_t * ucp);\r
-int setcontext(const ucontext_t * ucp);\r
-int makecontext(ucontext_t *, void (*)(), int, ...);\r
-int swapcontext(ucontext_t *, const ucontext_t *);\r
-\r
-#endif  /* UCONTEXT_H */\r
+/*
+ *      win32-ucontext: Unix ucontext_t operations on Windows platforms
+ *      Copyright(C) 2007 Panagiotis E. Hadjidoukas
+ *
+ *      Contact Email: phadjido@cs.uoi.gr, xdoukas@ceid.upatras.gr
+ *
+ *      win32-ucontext is free software; you can redistribute it and/or
+ *      modify it under the terms of the GNU Lesser General Public
+ *      License as published by the Free Software Foundation; either
+ *      version 2 of the License, or (at your option) any later version.
+ *
+ *      win32-ucontext is distributed in the hope that it will be useful,
+ *      but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *      Lesser General Public License for more details.
+ *
+ *      You should have received a copy of the GNU Lesser General Public
+ *      License along with SimGrid in the file LICENSE-LGPL-2.1;
+ *      if not, write to the Free Software Foundation, Inc.,
+ *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */  
+    
+#ifndef UCONTEXT_H
+#define UCONTEXT_H
+    
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <windows.h>
+    typedef struct __stack {
+  void *ss_sp;
+  size_t ss_size;
+  int ss_flags;
+} stack_t;
+typedef CONTEXT mcontext_t;
+typedef unsigned long __sigset_t;
+typedef struct __ucontext {
+  unsigned long int uc_flags;
+  struct __ucontext *uc_link;
+  stack_t uc_stack;
+  mcontext_t uc_mcontext;
+  __sigset_t uc_sigmask;
+} ucontext_t;
+int getcontext(ucontext_t * ucp);
+int setcontext(const ucontext_t * ucp);
+int makecontext(ucontext_t *, void (*)(), int, ...);
+int swapcontext(ucontext_t *, const ucontext_t *);
+
+#ifdef __cplusplus
+}
+#endif
+#endif  /* UCONTEXT_H */