logically these belong to the intersection of the stdio and pthread subsystems, and either place the declarations could go (stdio_impl.h or pthread_impl.h) requires a forward declaration for one of the argument types.
10 lines
172 B
C
10 lines
172 B
C
#include "stdio_impl.h"
|
|
#include "pthread_impl.h"
|
|
|
|
void flockfile(FILE *f)
|
|
{
|
|
if (!ftrylockfile(f)) return;
|
|
__lockfile(f);
|
|
__register_locked_file(f, __pthread_self());
|
|
}
|