summaryrefslogblamecommitdiff
path: root/src/stdio/flockfile.c
blob: 8e2206514c67db4bd05aef79484ad110a07170ed (plain) (tree)
1
2
3
4
5
6
7
8
9




                         


                                                    
 
#include "stdio_impl.h"
#include "pthread_impl.h"

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