*
* The sthread_* symbols are those actual implementations, used in the pthread_* redefinitions. */
+#ifndef SIMGRID_STHREAD_H
+#define SIMGRID_STHREAD_H
+
+#if defined(__ELF__)
+#define XBT_PUBLIC __attribute__((visibility("default")))
+#else
+#define XBT_PUBLIC
+#endif
+
#if defined(__cplusplus)
extern "C" {
#endif
-extern volatile int sthread_inside_simgrid; // Only intercept pthread calls in user code
+// Launch the simulation. The old main function (passed as a parameter) is launched as an actor
int sthread_main(int argc, char** argv, char** envp, int (*raw_main)(int, char**, char**));
+XBT_PUBLIC void sthread_enable(void); // Start intercepting all pthread calls
+XBT_PUBLIC void sthread_disable(void); // Stop intercepting all pthread calls
typedef unsigned long int sthread_t;
int sthread_create(sthread_t* thread, const /*pthread_attr_t*/ void* attr, void* (*start_routine)(void*), void* arg);
#if defined(__cplusplus)
}
#endif
+
+#endif
\ No newline at end of file