Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Factorize stack creation.
[simgrid.git] / src / xbt / xbt_sg_stubs.c
index ba5d8e3..149fb39 100644 (file)
@@ -2,14 +2,14 @@
 
 /* This is always part of SG, never of RL. Content:                         */
 /*  - a bunch of stub functions of the thread related function that we need */
-/*    to add to the lib to please the linker when using ucontextes.         */
+/*    to add to the lib to please the linker when using ucontexts.          */
 /*  - a bunch of stub functions of the java related function when we don't  */
 /*    compile java bindings.                                                */
 
 /* In RL, java is useless, and threads are always part of the picture,      */
 /*  ucontext never */
 
-/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2007-2010, 2013-2014. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -22,7 +22,7 @@
 
 #ifndef CONTEXT_THREADS
 #ifndef WIN32
-
+#ifdef HAVE_PTHREAD_H
 /* xbt_threads is loaded in libsimgrid when they are used to implement the xbt_context.
  * The decision (and the loading) is made in xbt/context.c.
  */
@@ -47,7 +47,7 @@ void xbt_os_thread_mod_postexit(void)
 
 xbt_os_thread_t xbt_os_thread_create(const char *name,
                                      pvoid_f_pvoid_t start_routine,
-                                     void *param)
+                                     void *param, void *data)
 {
   xbt_backtrace_display_current();
   xbt_die
@@ -61,6 +61,13 @@ void xbt_os_thread_exit(int *retcode)
       ("No pthread in SG when compiled against the ucontext (xbt_os_thread_exit)");
 }
 
+void xbt_os_thread_detach(xbt_os_thread_t worker)
+{
+  xbt_backtrace_display_current();
+  xbt_die
+      ("No pthread in SG when compiled against the ucontext (xbt_os_thread_exit)");
+}
+
 xbt_os_thread_t xbt_os_thread_self(void)
 {
   xbt_backtrace_display_current();
@@ -149,3 +156,4 @@ void xbt_os_cond_destroy(xbt_os_cond_t cond)
 }
 #endif
 #endif
+#endif