From 6d20a3a2c9d09f8501319253e6fe94018f4f0d8c Mon Sep 17 00:00:00 2001 From: cristianrosa Date: Tue, 1 Feb 2011 12:37:25 +0000 Subject: [PATCH] Use the extra data field of the xbt_os_thread to store the worker id. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9549 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/xbt/parmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xbt/parmap.c b/src/xbt/parmap.c index fcf8857aff..8492f38f2a 100644 --- a/src/xbt/parmap.c +++ b/src/xbt/parmap.c @@ -95,6 +95,7 @@ static void *_xbt_parmap_worker_main(void *arg) /* Fetch a worker id */ worker_id = __sync_fetch_and_add(&parmap->workers_max_id, 1); + xbt_os_thread_set_extra_data((void *)(unsigned long)worker_id); DEBUG1("New worker thread created (%u)", worker_id); -- 2.20.1