summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/flockfile.c
blob: 88d90b8e4b165a37c7d67d5034da4d6faa53a8ac (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
/*	$OpenBSD: flockfile.c,v 1.9 2016/05/07 19:05:22 guenther Exp $	*/

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

void
flockfile(FILE *fp)
{
	FLOCKFILE(fp);
}
DEF_WEAK(flockfile);


int
ftrylockfile(FILE *fp)
{
	if (_thread_cb.tc_ftrylockfile != NULL)
		return (_thread_cb.tc_ftrylockfile(fp));

	return 0;
}
DEF_WEAK(ftrylockfile);

void
funlockfile(FILE *fp)
{
	FUNLOCKFILE(fp);
}
DEF_WEAK(funlockfile);