diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-11-07 16:43:35 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-11-09 10:41:55 -0500 |
commit | 5fe11b94b38bfb4d43637e05ac24da0d7d72b9ea (patch) | |
tree | 0e04290919f28fa9858aa92c016af7b7808627b5 /src/ioq.h | |
parent | 163baf1c9af13be0ce705b133e41e0c3d6427398 (diff) | |
download | bfs-5fe11b94b38bfb4d43637e05ac24da0d7d72b9ea.tar.xz |
ioq: Implement a better non-blocking pop
Diffstat (limited to 'src/ioq.h')
-rw-r--r-- | src/ioq.h | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -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. |