util/u_queue: add an option to resize the queue when it's full
[mesa.git] / src / util / u_queue.h
index edd6babb5c71d8f454a54c16b3ca7d5ef6b97f9a..ff713ae54d68afe4ef392118d20f037edfd3560d 100644 (file)
@@ -43,6 +43,7 @@ extern "C" {
 #endif
 
 #define UTIL_QUEUE_INIT_USE_MINIMUM_PRIORITY      (1 << 0)
+#define UTIL_QUEUE_INIT_RESIZE_IF_FULL            (1 << 1)
 
 /* Job completion fence.
  * Put this into your job structure.
@@ -69,6 +70,7 @@ struct util_queue {
    cnd_t has_queued_cond;
    cnd_t has_space_cond;
    thrd_t *threads;
+   unsigned flags;
    int num_queued;
    unsigned num_threads;
    int kill_threads;