gallium/util: remove PIPE_THREAD_ROUTINE()

This was made unnecessary with fd33a6bcd7.

This was mostly done with:
find ./src -type f -exec sed -i -- \
's:PIPE_THREAD_ROUTINE(\([^,]*\), \([^)]*\)):int\n\1(void \*\2):g' {} \;

With some small manual tidy ups.

Reviewed-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Timothy Arceri 2017-03-06 11:58:26 +11:00
parent e92293a601
commit da40ac65c7
9 changed files with 19 additions and 13 deletions

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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 *

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);