xref: /aosp_15_r20/external/musl/src/stdio/flockfile.c (revision c9945492fdd68bbe62686c5b452b4dc1be3f8453)
1 #include "stdio_impl.h"
2 #include "pthread_impl.h"
3 
flockfile(FILE * f)4 void flockfile(FILE *f)
5 {
6 	if (!ftrylockfile(f)) return;
7 	__lockfile(f);
8 	__register_locked_file(f, __pthread_self());
9 }
10