#endif
-/* pipe_thread
- */
-typedef thrd_t pipe_thread;
-
#define PIPE_THREAD_ROUTINE( name, param ) \
int name( void *param )
-static inline pipe_thread pipe_thread_create( PIPE_THREAD_ROUTINE((*routine), ), void *param )
+static inline thrd_t pipe_thread_create( PIPE_THREAD_ROUTINE((*routine), ), void *param )
{
- pipe_thread thread;
+ thrd_t thread;
#ifdef HAVE_PTHREAD
sigset_t saved_set, new_set;
int ret;
return thread;
}
-static inline int pipe_thread_wait( pipe_thread thread )
+static inline int pipe_thread_wait( thrd_t thread )
{
return thrd_join( thread, NULL );
}
-static inline int pipe_thread_destroy( pipe_thread thread )
+static inline int pipe_thread_destroy( thrd_t thread )
{
return thrd_detach( thread );
}
}
-static inline int pipe_thread_is_self( pipe_thread thread )
+static inline int pipe_thread_is_self( thrd_t thread )
{
#if defined(HAVE_PTHREAD)
# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
/* Return the time of a thread's CPU time clock. */
static inline int64_t
-pipe_thread_get_time_nano(pipe_thread thread)
+pipe_thread_get_time_nano(thrd_t thread)
{
#if defined(PIPE_OS_LINUX) && defined(HAVE_PTHREAD)
struct timespec ts;
cnd_init(&queue->has_queued_cond);
cnd_init(&queue->has_space_cond);
- queue->threads = (pipe_thread*)CALLOC(num_threads, sizeof(pipe_thread));
+ queue->threads = (thrd_t*)CALLOC(num_threads, sizeof(thrd_t));
if (!queue->threads)
goto fail;
mtx_t lock;
pipe_condvar has_queued_cond;
pipe_condvar has_space_cond;
- pipe_thread *threads;
+ thrd_t *threads;
int num_queued;
unsigned num_threads;
int kill_threads;
* their fences. Records with signalled fences are freed. On fence timeout,
* the thread dumps the record of the oldest unsignalled fence.
*/
- pipe_thread thread;
+ thrd_t thread;
mtx_t mutex;
int kill_thread;
struct pipe_resource *fence;
struct lp_rasterizer_task tasks[LP_MAX_THREADS];
unsigned num_threads;
- pipe_thread threads[LP_MAX_THREADS];
+ thrd_t threads[LP_MAX_THREADS];
/** For synchronizing the rasterization threads */
pipe_barrier barrier;
/* GPU load thread. */
mtx_t gpu_load_mutex;
- pipe_thread gpu_load_thread;
+ thrd_t gpu_load_thread;
union r600_mmio_counters mmio_counters;
volatile unsigned gpu_load_stop_thread; /* bool */
{
struct rbug_screen *rb_screen;
struct rbug_connection *con;
- pipe_thread thread;
+ thrd_t thread;
boolean running;
};
};
struct csmt_context {
- pipe_thread worker;
+ thrd_t worker;
struct nine_queue_pool* pool;
BOOL terminate;
pipe_condvar event_processed;
nine_csmt_destroy( struct NineDevice9 *device, struct csmt_context *ctx )
{
struct csmt_instruction* instr;
- pipe_thread render_thread = ctx->worker;
+ thrd_t render_thread = ctx->worker;
DBG("device=%p ctx=%p\n", device, ctx);
static int verbosity = 0;
-static pipe_thread threads[NUM_THREADS];
+static thrd_t threads[NUM_THREADS];
static pipe_barrier barrier;
static int thread_ids[NUM_THREADS];