Skip to content

Commit 7674fed

Browse files
committed
kernel: when using julia_gc, call jl_atexit_hook in SyExit
1 parent 4540a49 commit 7674fed

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/system.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
#include "hpc/misc.h"
3434
#endif
3535

36+
#ifdef USE_JULIA_GC
37+
#include "julia.h"
38+
#endif
39+
3640
#include <assert.h>
3741
#include <fcntl.h>
3842
#include <stdarg.h>
@@ -547,7 +551,10 @@ void SyUSleep ( UInt msecs )
547551
void SyExit (
548552
UInt ret )
549553
{
550-
exit( (int)ret );
554+
#ifdef USE_JULIA_GC
555+
jl_atexit_hook(ret);
556+
#endif
557+
exit( (int)ret );
551558
}
552559

553560

0 commit comments

Comments
 (0)