summaryrefslogtreecommitdiff
path: root/src/user/include/pland/pcrt.h
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2020-09-19 14:53:29 -0400
committerBenji Dial <benji6283@gmail.com>2020-09-19 14:53:29 -0400
commitde20d7430df08731d9108acb83e1234ba7f1fe16 (patch)
tree8646f3d1bae3d30391df34766e3e58c0c2af8aab /src/user/include/pland/pcrt.h
parent20853582d5385d12421433d21910e783caa00764 (diff)
downloadportland-os-de20d7430df08731d9108acb83e1234ba7f1fe16.tar.gz
file manager
Diffstat (limited to 'src/user/include/pland/pcrt.h')
-rw-r--r--src/user/include/pland/pcrt.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/user/include/pland/pcrt.h b/src/user/include/pland/pcrt.h
new file mode 100644
index 0000000..07ad453
--- /dev/null
+++ b/src/user/include/pland/pcrt.h
@@ -0,0 +1,16 @@
+#ifndef PLAND_PCRT_H
+#define PLAND_PCRT_H
+
+#define BEFORE_MAIN(f) \
+ __attribute__ ((section (".__pcrt_before_main"))) \
+ __attribute__ ((unused)) \
+ void (*const __pcrt_bm_##f)() = &f;
+
+#define BEFORE_QUIT(f) \
+ __attribute__ ((section (".__pcrt_before_quit"))) \
+ __attribute__ ((unused)) \
+ void (*const __pcrt_bq_##f)() = &f;
+
+void __pcrt_quit() __attribute__ ((noreturn));
+
+#endif \ No newline at end of file