+ /* Frequent special case: resignalling to self. The idea is
+ * that leave_region safepoint will acknowledge the signal, so
+ * there is no need to take locks, roll thread to safepoint
+ * etc. */
+ /* Kludge (on safepoint builds): At the moment, this isn't just
+ * an optimization; rather it masks the fact that
+ * gc_stop_the_world() grabs the all_threads mutex without
+ * releasing it, and since we're not using recursive pthread
+ * mutexes, the pthread_mutex_lock() around the all_threads loop
+ * would go wrong. Why are we running interruptions while
+ * stopping the world though? Test case is (:ASYNC-UNWIND
+ * :SPECIALS), especially with s/10/100/ in both loops. */
+ if (os_thread == pthread_self()) {
+ pthread_kill(os_thread, signal);
+#ifdef LISP_FEATURE_WIN32
+ check_pending_thruptions(NULL);
+#endif
+ return 0;
+ }
+