summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/os/os_thread.h5
-rw-r--r--src/gallium/auxiliary/util/u_queue.c3
-rw-r--r--src/gallium/drivers/ddebug/dd_draw.c3
-rw-r--r--src/gallium/drivers/ddebug/dd_pipe.h3
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.c3
-rw-r--r--src/gallium/drivers/radeon/r600_gpu_load.c3
-rw-r--r--src/gallium/drivers/rbug/rbug_core.c6
-rw-r--r--src/gallium/state_trackers/nine/nine_state.c3
-rw-r--r--src/gallium/tests/unit/pipe_barrier_test.c3
9 files changed, 19 insertions, 13 deletions
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h
index b15dd053c3d..bb767fa12d2 100644
--- a/src/gallium/auxiliary/os/os_thread.h
+++ b/src/gallium/auxiliary/os/os_thread.h
@@ -47,10 +47,7 @@
#endif
-#define PIPE_THREAD_ROUTINE( name, param ) \
- int name( void *param )
-
-static inline thrd_t pipe_thread_create( PIPE_THREAD_ROUTINE((*routine), ), void *param )
+static inline thrd_t pipe_thread_create(int (*routine)(void *), void *param)
{
thrd_t thread;
#ifdef HAVE_PTHREAD
diff --git a/src/gallium/auxiliary/util/u_queue.c b/src/gallium/auxiliary/util/u_queue.c
index b20abc8f45d..a3aed29795b 100644
--- a/src/gallium/auxiliary/util/u_queue.c
+++ b/src/gallium/auxiliary/util/u_queue.c
@@ -135,7 +135,8 @@ struct thread_input {
int thread_index;
};
-static PIPE_THREAD_ROUTINE(util_queue_thread_func, input)
+static int
+util_queue_thread_func(void *input)
{
struct util_queue *queue = ((struct thread_input*)input)->queue;
int thread_index = ((struct thread_input*)input)->thread_index;
diff --git a/src/gallium/drivers/ddebug/dd_draw.c b/src/gallium/drivers/ddebug/dd_draw.c
index 59afde88694..e01d2aef800 100644
--- a/src/gallium/drivers/ddebug/dd_draw.c
+++ b/src/gallium/drivers/ddebug/dd_draw.c
@@ -899,7 +899,8 @@ dd_dump_record(struct dd_context *dctx, struct dd_draw_record *record,
fclose(f);
}
-PIPE_THREAD_ROUTINE(dd_thread_pipelined_hang_detect, input)
+int
+dd_thread_pipelined_hang_detect(void *input)
{
struct dd_context *dctx = (struct dd_context *)input;
struct dd_screen *dscreen = dd_screen(dctx->base.screen);
diff --git a/src/gallium/drivers/ddebug/dd_pipe.h b/src/gallium/drivers/ddebug/dd_pipe.h
index 64d5510e6b8..deb1ab73349 100644
--- a/src/gallium/drivers/ddebug/dd_pipe.h
+++ b/src/gallium/drivers/ddebug/dd_pipe.h
@@ -251,7 +251,8 @@ dd_context_create(struct dd_screen *dscreen, struct pipe_context *pipe);
void
dd_init_draw_functions(struct dd_context *dctx);
-PIPE_THREAD_ROUTINE(dd_thread_pipelined_hang_detect, input);
+int
+dd_thread_pipelined_hang_detect(void *input);
static inline struct dd_context *
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index 9e56c962d2d..2f222d00589 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -781,7 +781,8 @@ lp_rast_finish( struct lp_rasterizer *rast )
* 2. do work
* 3. signal that we're done
*/
-static PIPE_THREAD_ROUTINE( thread_function, init_data )
+static int
+thread_function(void *init_data)
{
struct lp_rasterizer_task *task = (struct lp_rasterizer_task *) init_data;
struct lp_rasterizer *rast = task->rast;
diff --git a/src/gallium/drivers/radeon/r600_gpu_load.c b/src/gallium/drivers/radeon/r600_gpu_load.c
index b5b03599510..df43a6e8752 100644
--- a/src/gallium/drivers/radeon/r600_gpu_load.c
+++ b/src/gallium/drivers/radeon/r600_gpu_load.c
@@ -132,7 +132,8 @@ static void r600_update_mmio_counters(struct r600_common_screen *rscreen,
#undef UPDATE_COUNTER
-static PIPE_THREAD_ROUTINE(r600_gpu_load_thread, param)
+static int
+r600_gpu_load_thread(void *param)
{
struct r600_common_screen *rscreen = (struct r600_common_screen*)param;
const int period_us = 1000000 / SAMPLES_PER_SEC;
diff --git a/src/gallium/drivers/rbug/rbug_core.c b/src/gallium/drivers/rbug/rbug_core.c
index a5d3ee49ce4..5752e5e739c 100644
--- a/src/gallium/drivers/rbug/rbug_core.c
+++ b/src/gallium/drivers/rbug/rbug_core.c
@@ -58,7 +58,8 @@ struct rbug_rbug
boolean running;
};
-PIPE_THREAD_ROUTINE(rbug_thread, void_rbug);
+int
+rbug_thread(void *void_rbug);
/**********************************************************
@@ -799,7 +800,8 @@ rbug_con(struct rbug_rbug *tr_rbug)
tr_rbug->con = NULL;
}
-PIPE_THREAD_ROUTINE(rbug_thread, void_tr_rbug)
+int
+rbug_thread(void *void_tr_rbug)
{
struct rbug_rbug *tr_rbug = void_tr_rbug;
uint16_t port = 13370;
diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
index e6d215ac742..5ec3d348487 100644
--- a/src/gallium/state_trackers/nine/nine_state.c
+++ b/src/gallium/state_trackers/nine/nine_state.c
@@ -88,7 +88,8 @@ nine_csmt_wait_processed(struct csmt_context *ctx)
/* CSMT worker thread */
static
-PIPE_THREAD_ROUTINE(nine_csmt_worker, arg)
+int
+nine_csmt_worker(void *arg)
{
struct csmt_context *ctx = arg;
struct csmt_instruction *instr;
diff --git a/src/gallium/tests/unit/pipe_barrier_test.c b/src/gallium/tests/unit/pipe_barrier_test.c
index d5d7fb747af..34a77b8196f 100644
--- a/src/gallium/tests/unit/pipe_barrier_test.c
+++ b/src/gallium/tests/unit/pipe_barrier_test.c
@@ -66,7 +66,8 @@ static volatile int proceeded = 0;
}
-static PIPE_THREAD_ROUTINE(thread_function, thread_data)
+static int
+thread_function(void *thread_data)
{
int thread_id = *((int *) thread_data);