From 4f30e6308d8cb271fda65ccc8ebbef95f14be2c4 Mon Sep 17 00:00:00 2001 From: servostar Date: Fri, 12 Apr 2024 17:28:20 +0200 Subject: [PATCH] added function for notifying about exit --- src/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main.c b/src/main.c index d05ce36..aeca14c 100644 --- a/src/main.c +++ b/src/main.c @@ -1,13 +1,23 @@ +#include #include #include #define LOG_LEVEL LOG_LEVEL_DEBUG +void notify_exit(void) +{ + DEBUG("Exiting gemstone..."); +} + void setup(void) { log_init(); DEBUG("starting gemstone..."); + #if LOG_LEVEL <= LOG_LEVEL_DEBUG + atexit(¬ify_exit); + #endif + DEBUG("finished starting up gemstone..."); }