From de20d7430df08731d9108acb83e1234ba7f1fe16 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sat, 19 Sep 2020 14:53:29 -0400 Subject: file manager --- src/user/include/pland/pcrt.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/user/include/pland/pcrt.h (limited to 'src/user/include/pland/pcrt.h') 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 -- cgit v1.2.3