- e_xbt_parmap_flag_t status;
-#ifdef HAVE_FUTEX_H
- xbt_event_t sync_event;
-#endif
- unsigned int num_workers;
- unsigned int workers_max_id;
- void_f_pvoid_t fun;
- xbt_dynar_t data;
- unsigned int index;
+ e_xbt_parmap_flag_t status; /* is the parmap active or being destroyed? */
+
+ int work; /* index of the current round (1 is the first) */
+ int done; /* number of rounds already done */
+ unsigned int thread_counter; /* number of threads currently working */
+ unsigned int num_workers; /* total number of worker threads */
+ unsigned int workers_max_id; /* id of the next worker thread to create */
+ void_f_pvoid_t fun; /* function to run in parallel on each element of data */
+ xbt_dynar_t data; /* parameters to pass to fun in parallel */
+ unsigned int index; /* index of the next element of data to pick */