xref: /third_party/musl/src/stdio/funlockfile.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/musl/src/stdio/
1570af302Sopenharmony_ci#include "stdio_impl.h"
2570af302Sopenharmony_ci#include "pthread_impl.h"
3570af302Sopenharmony_ci
4570af302Sopenharmony_civoid funlockfile(FILE *f)
5570af302Sopenharmony_ci{
6570af302Sopenharmony_ci	if (f->lockcount == 1) {
7570af302Sopenharmony_ci		__unlist_locked_file(f);
8570af302Sopenharmony_ci		f->lockcount = 0;
9570af302Sopenharmony_ci		__unlockfile(f);
10570af302Sopenharmony_ci	} else {
11570af302Sopenharmony_ci		f->lockcount--;
12570af302Sopenharmony_ci	}
13570af302Sopenharmony_ci}
14

Indexes created Thu Nov 07 10:32:03 CST 2024