aboutsummaryrefslogtreecommitdiff
path: root/src/stdio/flockfile.c
blob: 624503d4be41586b636dbdad3fe07e86d51cd8fa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "stdio_impl.h"
#include "pthread_impl.h"

void flockfile(FILE *f)
{
	if (!ftrylockfile(f)) return;
	__lockfile(f);
	__register_locked_file(f, __pthread_self());
}


#ifdef TEST
int
main(void) {
	return 0;
}
#endif