summaryrefslogtreecommitdiff
path: root/src/bio.h
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-09-14 18:39:29 +0200
committerantirez <antirez@gmail.com>2011-09-15 18:20:53 +0200
commitfde4e4c428e58ec9a7c951f57cc523ed82dec1ca (patch)
treee9aed2e7b2801970c3ceaf7bd6e7e5afa4eb38c0 /src/bio.h
parentf1907057221cc1601a914c7626d896483999fb39 (diff)
downloadredis-fde4e4c428e58ec9a7c951f57cc523ed82dec1ca.tar.gz
Background I/O library enhanced so that the main thread can query for the number of pending jobs of the specified type.
Diffstat (limited to 'src/bio.h')
-rw-r--r--src/bio.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bio.h b/src/bio.h
index 3721fa2b6..ded0d2dce 100644
--- a/src/bio.h
+++ b/src/bio.h
@@ -1,6 +1,11 @@
/* Exported API */
void bioInit(void);
void bioCreateBackgroundJob(int type, void *data);
+unsigned long long bioPendingJobsOfType(int type);
+void bioWaitPendingJobsLE(int type, unsigned long long num);
/* Background job opcodes */
-#define REDIS_BIO_CLOSE_FILE 1
+#define REDIS_BIO_ZERO_OP_ID 0 /* We don't use zero as it is the most likely
+ * passed value in case of bugs/races. */
+#define REDIS_BIO_CLOSE_FILE 1 /* Deferred close(2) syscall. */
+#define REDIS_BIO_MAX_OP_ID 1