summaryrefslogtreecommitdiff
path: root/05/musl-0.6.0/src/stdio/fgetc.c
diff options
context:
space:
mode:
Diffstat (limited to '05/musl-0.6.0/src/stdio/fgetc.c')
-rw-r--r--05/musl-0.6.0/src/stdio/fgetc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/05/musl-0.6.0/src/stdio/fgetc.c b/05/musl-0.6.0/src/stdio/fgetc.c
index 3a7f1e3..8810f35 100644
--- a/05/musl-0.6.0/src/stdio/fgetc.c
+++ b/05/musl-0.6.0/src/stdio/fgetc.c
@@ -8,3 +8,12 @@ int fgetc(FILE *f)
FUNLOCK(f);
return c;
}
+
+int fgetc_unlocked(FILE *f)
+{
+ int c;
+ FLOCK(f);
+ c = f->rpos < f->rstop ? *f->rpos++ : __uflow(f);
+ FUNLOCK(f);
+ return c;
+}