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);
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 */
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);
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));