From 0f30d227497418c6d3bef7d52244407e30454504 Mon Sep 17 00:00:00 2001 From: Kacper Date: Mon, 22 Dec 2025 23:27:56 +0100 Subject: Added c11 threads, fixed some locks and add *_unlocked functions --- lib/libc/stdio/fgetc_unlocked.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lib/libc/stdio/fgetc_unlocked.c (limited to 'lib/libc/stdio/fgetc_unlocked.c') diff --git a/lib/libc/stdio/fgetc_unlocked.c b/lib/libc/stdio/fgetc_unlocked.c new file mode 100644 index 00000000..5cccfd87 --- /dev/null +++ b/lib/libc/stdio/fgetc_unlocked.c @@ -0,0 +1,11 @@ +#include + +int fgetc_unlocked(FILE *stream) +{ + int c; + + if (fread_unlocked(&c, 1, 1, stream) < 0) + return -1; + + return c; +} -- cgit v1.2.3