X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d5eb84330f48589a19c1c88b96bfe322ff130b51..73d7467abad2b60a0d08c3bd371c047f258a4265:/src/xbt/xbt_os_thread.c diff --git a/src/xbt/xbt_os_thread.c b/src/xbt/xbt_os_thread.c index 81c86e9383..b023fe80fc 100644 --- a/src/xbt/xbt_os_thread.c +++ b/src/xbt/xbt_os_thread.c @@ -24,7 +24,6 @@ #include typedef struct xbt_os_thread_ { - /* KEEP IT IN SYNC WITH xbt_thread.c */ pthread_t t; void *param; pvoid_f_pvoid_t *start_routine; @@ -208,12 +207,16 @@ void xbt_os_cond_destroy(xbt_os_cond_t cond){ free(cond); } +void *xbt_os_thread_getparam(void) { + xbt_os_thread_t t = xbt_os_thread_self(); + return t->param; +} + /* ********************************* WINDOWS IMPLEMENTATION ************************************ */ #elif defined(WIN32) typedef struct xbt_os_thread_ { - /* KEEP IT IN SYNC WITH xbt_thread */ HANDLE handle; /* the win thread handle */ unsigned long id; /* the win thread id */ pvoid_f_pvoid_t *start_routine; @@ -289,6 +292,12 @@ xbt_os_thread_t xbt_os_thread_self(void) { return TlsGetValue(xbt_self_thread_key); } +void *xbt_os_thread_getparam(void) { + xbt_os_thread_t t = xbt_os_thread_self(); + return t->param; +} + + void xbt_os_thread_yield(void) { Sleep(0); }