1570af302Sopenharmony_ci#include "stdio_impl.h" 2570af302Sopenharmony_ci#include "pthread_impl.h" 3570af302Sopenharmony_ci 4570af302Sopenharmony_civoid flockfile(FILE *f) 5570af302Sopenharmony_ci{ 6570af302Sopenharmony_ci if (!ftrylockfile(f)) return; 7570af302Sopenharmony_ci __lockfile(f); 8570af302Sopenharmony_ci __register_locked_file(f, __pthread_self()); 9570af302Sopenharmony_ci} 10