]> git.sesse.net Git - x264/blob - common/threadpool.h
Correct X header path usage in configure
[x264] / common / threadpool.h
1 /*****************************************************************************
2  * threadpool.h: x264 threadpool module
3  *****************************************************************************
4  * Copyright (C) 2010 Steven Walters <kemuri9@gmail.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
19  *****************************************************************************/
20
21 #ifndef X264_THREADPOOL_H
22 #define X264_THREADPOOL_H
23
24 typedef struct x264_threadpool_t x264_threadpool_t;
25
26 #if HAVE_PTHREAD
27 int   x264_threadpool_init( x264_threadpool_t **p_pool, int threads,
28                             void (*init_func)(void *), void *init_arg );
29 void  x264_threadpool_run( x264_threadpool_t *pool, void *(*func)(void *), void *arg );
30 void *x264_threadpool_wait( x264_threadpool_t *pool, void *arg );
31 void  x264_threadpool_delete( x264_threadpool_t *pool );
32 #else
33 #define x264_threadpool_init(p,t,f,a) -1
34 #define x264_threadpool_run(p,f,a)
35 #define x264_threadpool_wait(p,a)     NULL
36 #define x264_threadpool_delete(p)
37 #endif
38
39 #endif