1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 02:13:56 +09:00

LibC: Implement `flockfile and funlockfile`

To do this, we must set the type attribute when initializing a FILE to
``__PTHREAD_MUTEX_RECURSIVE``.
This commit is contained in:
Conor Byrne 2022-01-01 00:18:21 +00:00 committed by Brian Gianforcaro
parent aa0db4e4b0
commit 8515d7d5ab
Notes: sideshowbarker 2024-07-17 21:51:59 +09:00
2 changed files with 11 additions and 10 deletions

View file

@ -1228,15 +1228,17 @@ int vscanf(const char* fmt, va_list ap)
}
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/flockfile.html
void flockfile([[maybe_unused]] FILE* filehandle)
void flockfile(FILE* filehandle)
{
dbgln("FIXME: Implement flockfile()");
VERIFY(filehandle);
filehandle->lock();
}
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/funlockfile.html
void funlockfile([[maybe_unused]] FILE* filehandle)
void funlockfile(FILE* filehandle)
{
dbgln("FIXME: Implement funlockfile()");
VERIFY(filehandle);
filehandle->unlock();
}
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/tmpfile.html