From 722c2c8c8785d215ec3ec8757168b82c9600f4a3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 4 Jul 2004 17:40:15 +0000 Subject: add kill_* and default_* commands to CLI make module-cli unload itself on EOF clean up stdio usage add sink pointer to monitor sources git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@50 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/sioman.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/sioman.c (limited to 'src/sioman.c') 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 +#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; +} -- cgit