summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/flockfile.c
blob: d720aee991a3b7a31ac912756136ebd7b0d14e97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*	$OpenBSD: flockfile.c,v 1.1 1998/11/20 11:18:48 d Exp $	*/

#include <stdio.h>
#include "thread_private.h"

#ifndef _THREAD_SAFE

/*
 * Subroutine versions of the macros in <stdio.h>
 * Note that these are all no-ops because libc does not do threads.
 */

#undef flockfile
#undef ftrylockfile
#undef funlockfile
#undef _flockfile_debug

void
flockfile(fp)
	FILE * fp;
{
}

int
ftrylockfile(fp)
	FILE * fp;
{
	return 0;
}

void
funlockfile(fp)
	FILE * fp;
{
}

void
_flockfile_debug(fp, fname, lineno)
	FILE * fp;
	const char * fname;
	int lineno;
{
}

#else /* _THREAD_SAFE */

/* Actual implementation of file locking in libc_r/uthread/uthread_file.c */

#endif /* _THREAD_SAFE */