summaryrefslogtreecommitdiff
path: root/user/lib/fclose.c
diff options
context:
space:
mode:
authorIan McFarlane <i.mcfarlane2002@gmail.com>2025-05-06 15:14:11 -0400
committerIan McFarlane <i.mcfarlane2002@gmail.com>2025-05-06 15:14:11 -0400
commitda396afa8b612b8f8ff07d71c57761a627b158eb (patch)
treeb4935b29aca686c6ee17a583cffe149d7bb3c819 /user/lib/fclose.c
parentupdate forkman with spinlock (diff)
parentstart docs (diff)
downloadcomus-da396afa8b612b8f8ff07d71c57761a627b158eb.tar.gz
comus-da396afa8b612b8f8ff07d71c57761a627b158eb.tar.bz2
comus-da396afa8b612b8f8ff07d71c57761a627b158eb.zip
merge main into forkmanforkman
Diffstat (limited to 'user/lib/fclose.c')
-rw-r--r--user/lib/fclose.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/user/lib/fclose.c b/user/lib/fclose.c
new file mode 100644
index 0000000..be31421
--- /dev/null
+++ b/user/lib/fclose.c
@@ -0,0 +1,10 @@
+#include <stdio.h>
+#include <unistd.h>
+
+void fclose(FILE *stream)
+{
+ int fd;
+
+ fd = (uintptr_t)stream;
+ close(fd);
+}