2 * Copyright 2008-2010, Sine Nomine Associates and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #ifndef AFS_UTIL_THREAD_POOL_H
11 #define AFS_UTIL_THREAD_POOL_H 1
13 #include "thread_pool_types.h"
16 * public interfaces for thread_pool.
19 /* XXX move these into an et */
20 #define AFS_TP_ERROR -1 /**< fatal error in thread_pool package */
22 extern int afs_tp_create(struct afs_thread_pool
**,
23 struct afs_work_queue
*);
24 extern int afs_tp_destroy(struct afs_thread_pool
*);
26 extern int afs_tp_set_threads(struct afs_thread_pool
*, afs_uint32 threads
);
27 extern int afs_tp_set_entry(struct afs_thread_pool
*,
28 afs_tp_worker_func_t
*,
31 extern int afs_tp_start(struct afs_thread_pool
*);
32 extern int afs_tp_shutdown(struct afs_thread_pool
*,
35 extern int afs_tp_is_online(struct afs_thread_pool
*);
36 extern int afs_tp_worker_continue(struct afs_thread_pool_worker
*);
38 #endif /* AFS_UTIL_THREAD_POOL_H */