-struct xbt_thread_ {
- /* KEEP IT IN SYNC WITH xbt_os_thread (both win and lin parts) */
-#ifdef HAVE_PTHREAD_H
- pthread_t t;
- void *param;
- pvoid_f_pvoid_t *start_routine;
-#elif defined(WIN32)
- HANDLE handle; /* the win thread handle */
- unsigned long id; /* the win thread id */
- pvoid_f_pvoid_t *start_routine;
- void* param;
-#endif
-};
+typedef struct s_xbt_thread_ {
+ xbt_os_thread_t os_thread;
+ void_f_pvoid_t *code;
+ void *userparam;
+}s_xbt_thread_t;
+
+static void *xbt_thread_create_wrapper(void *p) {
+ xbt_thread_t t = (xbt_thread_t)p;
+ (*t->code)(t->userparam);
+ return NULL;
+}
+
+
+xbt_thread_t xbt_thread_create(void_f_pvoid_t* code, void* param) {