summaryrefslogtreecommitdiff
path: root/src/stdio/ofl_add.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/ofl_add.c')
-rw-r--r--src/stdio/ofl_add.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/stdio/ofl_add.c b/src/stdio/ofl_add.c
new file mode 100644
index 00000000..d7de9f15
--- /dev/null
+++ b/src/stdio/ofl_add.c
@@ -0,0 +1,11 @@
+#include "stdio_impl.h"
+
+FILE *__ofl_add(FILE *f)
+{
+ FILE **head = __ofl_lock();
+ f->next = *head;
+ if (*head) (*head)->prev = f;
+ *head = f;
+ __ofl_unlock();
+ return f;
+}