/*static char *SCCSID = "@(#)sigdef.h	6.2 91/01/10";*/
/*      SCCSID = @(#)sigdef.h	6.2 91/01/10 */

#define NSIG            8

//      Signal numbers

#define SIGINTR         1                       // Ctrl-C
#define SIGTERM         3                       // program termination
#define SIGBREAK        4                       // Ctrl-Break
#define SIGPFA          5                       // Process flag A
#define SIGPFB          6                       // Process flag B
#define SIGPFC          7                       // Process flag C
#define SIGAPTERM       8                       // Asyncronous PTERM
#define SIGGCHARMED    16                       // Used as flag

//      Signal bits

#define SIGINTRF        (1 << (SIGINTR - 1))    // Ctrl-C
#define SIGTERMF        (1 << (SIGTERM - 1))    // program termination
#define SIGBREAKF       (1 << (SIGBREAK - 1))   // Ctrl-Break
#define SIGPFAF         (1 << (SIGPFA - 1))     // Process flag A
#define SIGPFBF         (1 << (SIGPFB - 1))     // Process flag B
#define SIGPFCF         (1 << (SIGPFC - 1))     // Process flag C
#define SIGAPTERMF      (1 << (SIGAPTERM - 1))  // Asyncronous PTERM

//      Signal flag. Used in the global PendingSignals field
#define SIGGCHARMEDF    (1 << (SIGGCHARMED - 1)) // Context hook has been
                                                 //  dispatched.

#define SIG_FLAGS (SIGPFAF | SIGPFBF | SIGPFCF)
#define SIG_DFKIL (SIGTERMF | SIGINTRF | SIGBREAKF)
#define SIG_DFKIL32 (SIG_DFKIL | SIGAPTERMF)
#define SIG_HOLDABLE (SIGINTRF | SIGBREAKF | SIGTERMF | SIGPFAF | SIGPFBF \
        | SIGPFCF)
#define SIG_MCHOLDABLE (SIG_HOLDABLE | SIGAPTERMF)
#define SIG_SENDABLE (SIGTERMF | SIGPFAF | SIGPFBF | SIGPFCF)
#define SIG_SIGNALS (SIGINTRF | SIGTERMF | SIGBREAKF | SIGPFAF | SIGPFBF \
        | SIGPFCF | SIGAPTERMF | SIGGCHARMEDF)


//      Signal actions

#define SIG_DFL         0                       // terminate process on receipt
#define SIG_IGN         1                       // ignore
#define SIG_GET         2                       // signal is accepted
#define SIG_ERR         3                       // sender gets error
#define SIG_ACK         4                       // acknowledge received signal

//      Signal focus structure

struct  SigFoci {
        ushort_t        sfi_sigintr;            // PID of SIGINTR focus
        ushort_t        sfi_sigbreak;           // PID of SIGBREAK focus
};

/* ASM

;**     sigbit
;
;       sigbit translates a signal number to a signal bitmask
;
;       ENTRY   (AX) = signal number
;
;       EXIT    (ECX) = signal bitmask
;
;       USES    ECX, Flags

SigBit macro
        .386p
        xor     ecx,ecx                 ; Zero bitmask
        bts     ecx,eax                 ; Set bit 1 higher than signal
        shr     ecx,1                   ; Shift so signal bit is set
        CpuMode reset
endm

*/
