aboutsummaryrefslogtreecommitdiff
path: root/libs/libc
diff options
context:
space:
mode:
authorMarvin Borner2021-06-23 22:05:11 +0200
committerMarvin Borner2021-06-23 22:05:11 +0200
commitaf338d77ee7f6469530233a70ccb450171ec5c66 (patch)
treec02c86bc53908e62fee829ea8416854f229c7233 /libs/libc
parent73a55007a44d23be40be681c4882fd6ad1e30b60 (diff)
Started widgets and layout stuff
Diffstat (limited to 'libs/libc')
-rw-r--r--libs/libc/sys.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/libc/sys.c b/libs/libc/sys.c
index b00bd32..c6b7fa3 100644
--- a/libs/libc/sys.c
+++ b/libs/libc/sys.c
@@ -189,12 +189,20 @@ static void atexit_trigger(void)
if (!slot)
return;
+ static u8 cnt = 0;
+ if (cnt++ != 0) {
+ log("Couldn't execute all atexit routines\n");
+ return;
+ }
+
while (slot-- > 0) {
if (funcs[slot]) {
funcs[slot]();
funcs[slot] = NULL;
}
}
+
+ cnt = 0;
}
void atexit(void (*func)(void))