summaryrefslogtreecommitdiffstats
path: root/src/sioman.c
blob: 1a4b08b042a3fe6ba4be97b34a84d210629358cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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;
}