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