Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change the prototype of xbt_thread_create(), sorry.
[simgrid.git] / src / xbt / xbt_rl_synchro.c
index 1a74c0b..e5ead86 100644 (file)
@@ -39,7 +39,7 @@ static void *xbt_thread_create_wrapper(void *p)
 
 
 xbt_thread_t xbt_thread_create(const char *name, void_f_pvoid_t code,
 
 
 xbt_thread_t xbt_thread_create(const char *name, void_f_pvoid_t code,
-                               void *param)
+                               void *param, int joinable)
 {
 
   xbt_thread_t res = xbt_new0(s_xbt_thread_t, 1);
 {
 
   xbt_thread_t res = xbt_new0(s_xbt_thread_t, 1);
@@ -64,6 +64,7 @@ void xbt_thread_join(xbt_thread_t thread)
 {
   DEBUG1("Join thread %p", thread);
   xbt_os_thread_join(thread->os_thread, NULL);
 {
   DEBUG1("Join thread %p", thread);
   xbt_os_thread_join(thread->os_thread, NULL);
+  xbt_free(thread);
 }
 
 void xbt_thread_exit()
 }
 
 void xbt_thread_exit()