summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/stdio.cpp
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2021-11-07 17:19:16 +0100
committerAndreas Kling <kling@serenityos.org>2022-04-03 19:15:14 +0200
commit89ed0649f76801d224a3c10b8e7f38d64e5a15e6 (patch)
tree637f3b84db7ccdcbb05e0275d4bf6b18aadf9e98 /Userland/Libraries/LibC/stdio.cpp
parent9b543ddb16a71287eb1fb51c24a13f46190b5433 (diff)
downloadserenity-89ed0649f76801d224a3c10b8e7f38d64e5a15e6.zip
LibC: Implement __freadahead
Diffstat (limited to 'Userland/Libraries/LibC/stdio.cpp')
-rw-r--r--Userland/Libraries/LibC/stdio.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/stdio.cpp b/Userland/Libraries/LibC/stdio.cpp
index ebbccb3ab5..28486b2cb4 100644
--- a/Userland/Libraries/LibC/stdio.cpp
+++ b/Userland/Libraries/LibC/stdio.cpp
@@ -1328,6 +1328,17 @@ void __fpurge(FILE* stream)
stream->purge();
}
+size_t __freadahead(FILE* stream)
+{
+ VERIFY(stream);
+
+ ScopedFileLock lock(stream);
+
+ size_t available_size;
+ stream->readptr(available_size);
+ return available_size;
+}
+
char const* __freadptr(FILE* stream, size_t* sizep)
{
VERIFY(stream);