X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fgc-common.c;h=7add9512717560b3535f0ae2be7c95e9fec85407;hb=debae3c18d31b5222be4d5de8dcb2601336e24a4;hp=490e4d1f05beaeb9133d623e1fd83b13322772a4;hpb=fc0f9907f434d087a0b57d782db66b6cb3f7d98b;p=sbcl.git diff --git a/src/runtime/gc-common.c b/src/runtime/gc-common.c index 490e4d1..7add951 100644 --- a/src/runtime/gc-common.c +++ b/src/runtime/gc-common.c @@ -2661,8 +2661,24 @@ maybe_gc(os_context_t *context) * we may even be in a WITHOUT-INTERRUPTS. */ gc_happened = funcall0(StaticSymbolFunction(SUB_GC)); FSHOW((stderr, "/maybe_gc: gc_happened=%s\n", - (gc_happened == NIL) ? "NIL" : "T")); - if ((gc_happened != NIL) && + (gc_happened == NIL) + ? "NIL" + : ((gc_happened == T) + ? "T" + : "0"))); + /* gc_happened can take three values: T, NIL, 0. + * + * T means that the thread managed to trigger a GC, and post-gc + * must be called. + * + * NIL means that the thread is within without-gcing, and no GC + * has occurred. + * + * Finally, 0 means that *a* GC has occurred, but it wasn't + * triggered by this thread; success, but post-gc doesn't have + * to be called. + */ + if ((gc_happened == T) && /* See if interrupts are enabled or it's possible to enable * them. POST-GC has a similar check, but we don't want to * unlock deferrables in that case and get a pending interrupt