This was made unnecessary with
fd33a6bcd7f12.
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>
#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
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;
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);
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 *
* 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;
#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;
boolean running;
};
-PIPE_THREAD_ROUTINE(rbug_thread, void_rbug);
+int
+rbug_thread(void *void_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;
/* 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;
}
-static PIPE_THREAD_ROUTINE(thread_function, thread_data)
+static int
+thread_function(void *thread_data)
{
int thread_id = *((int *) thread_data);