Mercury
mercury_thread_pool.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Argonne National Laboratory, Department of Energy,
3  *                    UChicago Argonne, LLC and The HDF Group.
4  * All rights reserved.
5  *
6  * The full copyright notice, including terms governing use, modification,
7  * and redistribution, is contained in the COPYING file that can be
8  * found at the root of the source code distribution tree.
9  */
10 
11 #ifndef MERCURY_THREAD_POOL_H
12 #define MERCURY_THREAD_POOL_H
13 
14 #include "mercury_util_config.h"
15 #include "mercury_thread.h"
16 
17 typedef struct hg_thread_pool hg_thread_pool_t;
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
32 HG_UTIL_EXPORT int
33 hg_thread_pool_init(unsigned int thread_count, hg_thread_pool_t **pool);
34 
42 HG_UTIL_EXPORT int
44 
56 HG_UTIL_EXPORT int
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 #endif /* MERCURY_THREAD_POOL_H */
HG_UTIL_EXPORT int hg_thread_pool_destroy(hg_thread_pool_t *pool)
Destroy the thread pool.
HG_UTIL_EXPORT int hg_thread_pool_post(hg_thread_pool_t *pool, hg_thread_func_t f, void *args)
Post the work function f to the pool.
struct hg_thread_pool hg_thread_pool_t
void *(* hg_thread_func_t)(void *)
HG_UTIL_EXPORT int hg_thread_pool_init(unsigned int thread_count, hg_thread_pool_t **pool)
Initialize the thread pool.