Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Use ucontext_t instead of void* in some places
authorGabriel Corona <gabriel.corona@loria.fr>
Wed, 10 Feb 2016 15:40:34 +0000 (16:40 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 11 Feb 2016 16:15:45 +0000 (17:15 +0100)
src/include/mc/datatypes.h
src/include/mc/mc.h
src/mc/mc_ignore.cpp

index 763b60d..0b45c09 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef MC_DATATYPE_H
 #define MC_DATATYPE_H
 
 #ifndef MC_DATATYPE_H
 #define MC_DATATYPE_H
 
+#include <ucontext.h>
+
 #include "xbt/misc.h"
 #include "xbt/swag.h"
 #include "xbt/fifo.h"
 #include "xbt/misc.h"
 #include "xbt/swag.h"
 #include "xbt/fifo.h"
@@ -26,7 +28,7 @@ typedef struct s_mc_transition *mc_transition_t;
 
 typedef struct s_stack_region{
   void *address;
 
 typedef struct s_stack_region{
   void *address;
-  void *context;
+  ucontext_t* context;
   size_t size;
   int block;
   int process_index;
   size_t size;
   int block;
   int process_index;
index eaeb396..d3eadea 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef _MC_MC_H
 #define _MC_MC_H
 
 #ifndef _MC_MC_H
 #define _MC_MC_H
 
+#include <ucontext.h>
+
 #include "xbt/base.h"
 #include "xbt/misc.h"
 #include "xbt/fifo.h"
 #include "xbt/base.h"
 #include "xbt/misc.h"
 #include "xbt/fifo.h"
@@ -87,7 +89,7 @@ XBT_PUBLIC(void) MC_ignore_heap(void *address, size_t size);
 XBT_PUBLIC(void) MC_remove_ignore_heap(void *address, size_t size);
 XBT_PUBLIC(void) MC_ignore_local_variable(const char *var_name, const char *frame);
 XBT_PUBLIC(void) MC_ignore_global_variable(const char *var_name);
 XBT_PUBLIC(void) MC_remove_ignore_heap(void *address, size_t size);
 XBT_PUBLIC(void) MC_ignore_local_variable(const char *var_name, const char *frame);
 XBT_PUBLIC(void) MC_ignore_global_variable(const char *var_name);
-XBT_PUBLIC(void) MC_register_stack_area(void *stack, smx_process_t process, void *context, size_t size);
+XBT_PUBLIC(void) MC_register_stack_area(void *stack, smx_process_t process, ucontext_t* context, size_t size);
 
 /********************************* Memory *************************************/
 XBT_PUBLIC(void) MC_memory_init(void);  /* Initialize the memory subsystem */
 
 /********************************* Memory *************************************/
 XBT_PUBLIC(void) MC_memory_init(void);  /* Initialize the memory subsystem */
index ccac733..6017779 100644 (file)
@@ -77,7 +77,7 @@ void MC_ignore_global_variable(const char *name)
  *  @param context
  *  @param size    Size of the stack
  */
  *  @param context
  *  @param size    Size of the stack
  */
-void MC_register_stack_area(void *stack, smx_process_t process, void *context, size_t size)
+void MC_register_stack_area(void *stack, smx_process_t process, ucontext_t* context, size_t size)
 {
   if (mc_mode != MC_MODE_CLIENT)
     return;
 {
   if (mc_mode != MC_MODE_CLIENT)
     return;