flockfile.c\stdio\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/stdio/flockfile.c
blob: a196c1efe0af11663f5e0537a0de1db02c3982ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#include "stdio_impl.h"
#include "pthread_impl.h"
void flockfile(FILE *f)
{
	while (ftrylockfile(f)) {
		int owner = f->lock;
		if (owner) __wait(&f->lock, &f->waiters, owner, 1);
	}
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月10日 03:06:34 +0000

AltStyle によって変換されたページ (->オリジナル) /