summaryrefslogtreecommitdiffstats
path: root/src/ioq.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-11-07 16:43:35 -0500
committerTavian Barnes <tavianator@tavianator.com>2023-11-09 10:41:55 -0500
commit5fe11b94b38bfb4d43637e05ac24da0d7d72b9ea (patch)
tree0e04290919f28fa9858aa92c016af7b7808627b5 /src/ioq.h
parent163baf1c9af13be0ce705b133e41e0c3d6427398 (diff)
downloadbfs-5fe11b94b38bfb4d43637e05ac24da0d7d72b9ea.tar.xz
ioq: Implement a better non-blocking pop
Diffstat (limited to 'src/ioq.h')
-rw-r--r--src/ioq.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/ioq.h b/src/ioq.h
index eab89ec..87727cb 100644
--- a/src/ioq.h
+++ b/src/ioq.h
@@ -8,6 +8,7 @@
#ifndef BFS_IOQ_H
#define BFS_IOQ_H
+#include "config.h"
#include "dir.h"
#include <stddef.h>
@@ -136,17 +137,7 @@ int ioq_closedir(struct ioq *ioq, struct bfs_dir *dir, void *ptr);
* @return
* The next response, or NULL.
*/
-struct ioq_ent *ioq_pop(struct ioq *ioq);
-
-/**
- * Pop a response from the queue, without blocking.
- *
- * @param ioq
- * The I/O queue.
- * @return
- * The next response, or NULL.
- */
-struct ioq_ent *ioq_trypop(struct ioq *ioq);
+struct ioq_ent *ioq_pop(struct ioq *ioq, bool block);
/**
* Free a queue entry.