Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Windows compatibility.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 18 Jan 2011 14:39:15 +0000 (14:39 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 18 Jan 2011 14:39:15 +0000 (14:39 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9437 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/include/xbt/xbt_os_thread.h
src/xbt/xbt_os_thread.c

index c88e733..e4e07fc 100644 (file)
@@ -33,11 +33,12 @@ XBT_PUBLIC(int) xbt_os_thread_atfork(void (*prepare)(void),
                                      void (*parent)(void),
                                      void (*child)(void));
 
+
 XBT_PUBLIC(xbt_os_thread_t) xbt_os_thread_create(const char *name,
-                                                 pvoid_f_pvoid_t
-                                                 start_routine,
+                                                 pvoid_f_pvoid_t start_routine,
                                                  void *param,
                                                  void *data);
+
 XBT_PUBLIC(void) xbt_os_thread_exit(int *retcode);
 XBT_PUBLIC(void) xbt_os_thread_detach(xbt_os_thread_t thread);
 XBT_PUBLIC(xbt_os_thread_t) xbt_os_thread_self(void);
index c3f5688..a04779d 100644 (file)
@@ -620,6 +620,7 @@ typedef struct xbt_os_thread_ {
   unsigned long id;             /* the win thread id            */
   pvoid_f_pvoid_t start_routine;
   void *param;
+  void *extra_data;
 } s_xbt_os_thread_t;
 
 /* so we can specify the size of the stack of the threads */
@@ -670,7 +671,8 @@ static DWORD WINAPI wrapper_start_routine(void *s)
 
 xbt_os_thread_t xbt_os_thread_create(const char *name,
                                      pvoid_f_pvoid_t start_routine,
-                                     void *param)
+                                     void *param,
+                                     void *extra_data)
 {
 
   xbt_os_thread_t t = xbt_new(s_xbt_os_thread_t, 1);
@@ -678,7 +680,7 @@ xbt_os_thread_t xbt_os_thread_create(const char *name,
   t->name = xbt_strdup(name);
   t->start_routine = start_routine;
   t->param = param;
-
+  t->extra_data = extra_data;
   t->handle = CreateThread(NULL, XBT_DEFAULT_THREAD_STACK_SIZE,
                            (LPTHREAD_START_ROUTINE) wrapper_start_routine,
                            t, STACK_SIZE_PARAM_IS_A_RESERVATION, &(t->id));