mirror of
https://github.com/cc65/cc65.git
synced 2025-02-05 04:37:23 +00:00
use __sig_ign and __sig_dft instead of _sig_ign and _sig_dft
This commit is contained in:
parent
9246775ebe
commit
f70020a2b8
@ -49,8 +49,8 @@ SIGCOUNT = 6 ; Number of signals
|
||||
.global sigtable
|
||||
|
||||
; Function declarations
|
||||
.global __sig_ign
|
||||
.global __sig_dfl
|
||||
.global ___sig_ign
|
||||
.global ___sig_dfl
|
||||
.global _signal
|
||||
.global _raise
|
||||
|
||||
|
@ -45,12 +45,12 @@ typedef unsigned char sig_atomic_t;
|
||||
typedef void __fastcall__ (*__sigfunc) (int);
|
||||
|
||||
/* Functions that implement SIG_IGN and SIG_DFL */
|
||||
void __fastcall__ _sig_ign (int);
|
||||
void __fastcall__ _sig_dfl (int);
|
||||
void __fastcall__ __sig_ign (int);
|
||||
void __fastcall__ __sig_dfl (int);
|
||||
|
||||
/* Standard signal handling functions */
|
||||
#define SIG_DFL _sig_dfl
|
||||
#define SIG_IGN _sig_ign
|
||||
#define SIG_DFL __sig_dfl
|
||||
#define SIG_IGN __sig_ign
|
||||
#define SIG_ERR ((__sigfunc) 0x0000)
|
||||
|
||||
/* Signal numbers */
|
||||
|
@ -33,9 +33,9 @@ _raise:
|
||||
; introduce race conditions, but it's the simplest way to satisfy the
|
||||
; standard).
|
||||
|
||||
lda #<__sig_dfl
|
||||
lda #<___sig_dfl
|
||||
sta sigtable,x
|
||||
lda #>__sig_dfl
|
||||
lda #>___sig_dfl
|
||||
sta sigtable+1,x
|
||||
|
||||
; Restore the signal number and call the function
|
||||
|
@ -54,7 +54,7 @@ _signal:
|
||||
pla
|
||||
tax
|
||||
pla
|
||||
__sig_ign:
|
||||
___sig_ign:
|
||||
rts
|
||||
|
||||
; Error entry: We use our knowledge that SIG_ERR is zero here to save a byte
|
||||
@ -63,6 +63,6 @@ invalidsig:
|
||||
lda #<EINVAL
|
||||
jsr __seterrno ; Returns 0 in A
|
||||
tax ; A/X = 0
|
||||
__sig_dfl:
|
||||
___sig_dfl:
|
||||
rts
|
||||
|
||||
|
@ -14,11 +14,11 @@
|
||||
.data
|
||||
|
||||
sigtable:
|
||||
.word __sig_dfl ; SIGABRT
|
||||
.word __sig_dfl ; SIGFPE
|
||||
.word __sig_dfl ; SIGILL
|
||||
.word __sig_dfl ; SIGINT
|
||||
.word __sig_dfl ; SIGSEGV
|
||||
.word __sig_dfl ; SIGTERM
|
||||
.word ___sig_dfl ; SIGABRT
|
||||
.word ___sig_dfl ; SIGFPE
|
||||
.word ___sig_dfl ; SIGILL
|
||||
.word ___sig_dfl ; SIGINT
|
||||
.word ___sig_dfl ; SIGSEGV
|
||||
.word ___sig_dfl ; SIGTERM
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user