+
+# if defined(IMMEDIATE_POST_MORTEM)
+
+/*
+ * If this feature is set, we are running on a stack managed by the OS,
+ * and no fancy delays are required for anything. Just do it.
+ */
+static void
+schedule_thread_post_mortem(struct thread *corpse)
+{
+ pthread_detach(pthread_self());
+ gc_assert(!pthread_attr_destroy(corpse->os_attr));
+ free(corpse->os_attr);
+#if defined(LISP_FEATURE_WIN32)
+ os_invalidate_free(corpse->os_address, THREAD_STRUCT_SIZE);
+#else
+ os_invalidate(corpse->os_address, THREAD_STRUCT_SIZE);
+#endif
+}
+
+# else
+