summaryrefslogtreecommitdiffstats
path: root/src/sioman.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sioman.c')
-rw-r--r--src/sioman.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/sioman.c b/src/sioman.c
new file mode 100644
index 00000000..1a4b08b0
--- /dev/null
+++ b/src/sioman.c
@@ -0,0 +1,17 @@
+#include <assert.h>
+#include "sioman.h"
+
+static int stdio_inuse = 0;
+
+int pa_stdio_acquire(void) {
+ if (stdio_inuse)
+ return -1;
+
+ stdio_inuse = 1;
+ return 0;
+}
+
+void pa_stdio_release(void) {
+ assert(stdio_inuse);
+ stdio_inuse = 0;
+}