1.0.15.35: fix bitrotted GC sanity checks
[sbcl.git] / src / runtime / interrupt.h
index 4e0a45f..ff649ce 100644 (file)
@@ -26,9 +26,9 @@
 /* FIXME: do not rely on NSIG being a multiple of 8 */
 #define REAL_SIGSET_SIZE_BYTES ((NSIG/8))
 
-extern void check_blockables_blocked_or_lose();
-extern void check_gc_signals_unblocked_or_lose();
-extern void unblock_gc_signals();
+extern void check_blockables_blocked_or_lose(void);
+extern void check_gc_signals_unblocked_or_lose(void);
+extern void unblock_gc_signals(void);
 
 static inline void
 sigcopyset(sigset_t *new, sigset_t *old)
@@ -38,12 +38,30 @@ sigcopyset(sigset_t *new, sigset_t *old)
 
 /* maximum signal nesting depth
  *
- * Note: In CMU CL, this was 4096, but there was no explanation given,
- * and it's hard to see why we'd need that many nested interrupts, so
- * I've scaled it back (to 256) to see what happens. -- WHN 20000730
-
- * Nothing happened, so let's creep it back a bit further -- dan 20030411 */
-#define MAX_INTERRUPTS 32
+ * FIXME: In CMUCL this was 4096, and it was first scaled down to 256
+ * and then 32, until finally Stumpwm broke: it is possible to receive
+ * interrupts in sufficiently quick succession that handler nesting
+ * can become preposterous. Scaling this back up to 1024 is a bandaid:
+ * for a real fix we should consider the following things:
+ *
+ *   We should almost certainly always use
+ *   arrange_return_to_lisp_function, though it needs to be thought
+ *   about arguments, and it needs to be able to pass a frobbable
+ *   context to the callee...
+ *
+ *   There are cases when nesting handlers is exactly what we want:
+ *   eg. SIGINT.
+ *
+ *   There are cases when we probably want to drop duplicate signals
+ *   on the floor if they arrive before the previous one has been handled.
+ *   Eg. SIGPROF.
+ *
+ *   There are cases when we probably want to handle duplicate signals
+ *   after the previous handler has returned, not before. Eg. SIGALARM.
+ *
+ * -- NS 2007-01-29
+ */
+#define MAX_INTERRUPTS 1024
 
 union interrupt_handler {
     lispobj lisp;
@@ -62,7 +80,7 @@ struct interrupt_data {
 };
 
 
-extern void interrupt_init();
+extern void interrupt_init(void);
 extern void fake_foreign_function_call(os_context_t* context);
 extern void undo_fake_foreign_function_call(os_context_t* context);
 extern void arrange_return_to_lisp_function(os_context_t *, lispobj);
@@ -96,7 +114,7 @@ extern void sigaddset_deferrable(sigset_t *s);
 /* Set all blockable signals into *s. */
 extern void sigaddset_blockable(sigset_t *s);
 
-extern void block_blockable_signals();
+extern void block_blockable_signals(void);
 
 /* The void* casting here avoids having to mess with the various types
  * of function argument lists possible for signal handlers: