diff options
author | Marek Olšák <[email protected]> | 2017-05-31 22:04:29 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-07 18:43:42 +0200 |
commit | 89b6c93ae3135a44b1aa2ce9285502a3898920bc (patch) | |
tree | fc4fd8d751b1dd244a40fbca9dc67400ce92999c /src/util/u_queue.h | |
parent | 6f2947fa79f9480934b17cc913a8bcdfbe9ffe45 (diff) |
util/u_queue: add an option to set the minimum thread priority
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/util/u_queue.h')
-rw-r--r-- | src/util/u_queue.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/u_queue.h b/src/util/u_queue.h index 9876865c651..916802c96d1 100644 --- a/src/util/u_queue.h +++ b/src/util/u_queue.h @@ -42,6 +42,8 @@ extern "C" { #endif +#define UTIL_QUEUE_INIT_USE_MINIMUM_PRIORITY (1 << 0) + /* Job completion fence. * Put this into your job structure. */ @@ -69,6 +71,7 @@ struct util_queue { thrd_t *threads; int num_queued; unsigned num_threads; + unsigned flags; int kill_threads; int max_jobs; int write_idx, read_idx; /* ring buffer pointers */ @@ -81,7 +84,8 @@ struct util_queue { bool util_queue_init(struct util_queue *queue, const char *name, unsigned max_jobs, - unsigned num_threads); + unsigned num_threads, + unsigned flags); void util_queue_destroy(struct util_queue *queue); void util_queue_fence_init(struct util_queue_fence *fence); void util_queue_fence_destroy(struct util_queue_fence *fence); |