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:
parent
aa0db4e4b0
commit
8515d7d5ab
Notes:
sideshowbarker
2024-07-17 21:51:59 +09:00
Author: https://github.com/caoimhebyrne
Commit: 8515d7d5ab
Pull-request: https://github.com/SerenityOS/serenity/pull/11529
2 changed files with 11 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue