#ifndef _SIGNALS_H_169f36e0_ #define _SIGNALS_H_169f36e0_ /* * APIs exported by signals.c. These are related to SIGINT processing. * * A SIGINT - when not blocked - jumps to the top JMP on an internal * stack, the SIGINT jump-to stack. Code that wishes to catch SIGINT * should push a JMP on this stack, then pop it when it's done. * SIGINT processing may also be blocked; while blocked, jumping is * disabled, but signals are remembered and provoke a jump when * processing is unblocked. */ #include "structs.h" /* * Initialize the signal-processing code. Called during startup. */ extern void initsignals(void); /* * Return a serial number, essentially a count of the SIGINTs handled. * This can be called before and after a section of code to find out * whether a SIGINT was handled during that section. */ extern int interrupted(void); /* * Push a JMP on the SIGINT jump-to stack. */ extern void push_sigint_throw(JMP *); /* * Push a JMP on the SIGINT jump-to stack. */ extern void pop_sigint_throw(void); /* * Block SIGINT processing. */ extern void block_int(void); /* * Unblock SIGINT processing. */ extern void unblock_int(void); #endif