1 /* Copyright (c) 2004, 2005, 2007, 2009, 2010. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #ifndef _XBT_THREADPOOL_PRIVATE_H
8 #define _XBT_THREADPOOL_PRIVATE_H
10 #include "xbt/parmap.h"
11 #include "xbt/xbt_os_thread.h"
12 #include "xbt/sysdep.h"
13 #include "xbt/dynar.h"
20 } e_xbt_parmap_flag_t;
22 typedef struct s_xbt_parmap {
23 xbt_os_mutex_t mutex; /* pool's mutex */
24 xbt_os_cond_t job_posted; /* job is posted */
25 xbt_os_cond_t all_done; /* job is done */
26 e_xbt_parmap_flag_t *flags; /* Per thread flag + lastone for the parmap */
27 unsigned int num_workers;
28 unsigned int num_idle_workers;
29 unsigned int workers_max_id;