+static void
+sigtrap_handler(int signal, siginfo_t *info, void *void_context)
+{
+ os_context_t *context = arch_os_get_context(&void_context);
+ unsigned int code = (os_context_insn(context) >> 6) & 0xfffff;
+#ifdef LISP_FEATURE_LINUX
+ os_restore_fp_control(context);
+#endif
+ /* FIXME: This magic number is pseudo-atomic-trap from parms.lisp.
+ * Genesis should provide the proper #define, but it specialcases
+ * pseudo-atomic-trap to work around some oddity on SPARC.
+ * Eventually this should go into handle_trap. */
+ if (code==0x10) {
+ arch_clear_pseudo_atomic_interrupted(context);