From: Alan Cox Date: Tue, 27 Jan 2015 23:54:15 +0000 (+0000) Subject: 6502/z80: finish fixing up signal types X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=78a0d4ff4c72e58f4925d9103a980841b5c2b5a0;p=FUZIX.git 6502/z80: finish fixing up signal types This now passes both compilers. 6809 still needs re-aligning --- diff --git a/Kernel/include/kernel.h b/Kernel/include/kernel.h index 486314c7..350f4537 100644 --- a/Kernel/include/kernel.h +++ b/Kernel/include/kernel.h @@ -298,8 +298,8 @@ struct mount { #define SIGSYS 31 #define SIGUNUSED 31 -#define SIG_DFL (int16_t (*)())0 /* Must be 0 */ -#define SIG_IGN (int16_t (*)())1 +#define SIG_DFL (int (*)(int))0 /* Must be 0 */ +#define SIG_IGN (int (*)(int))1 #define sigmask(sig) (1UL<<(sig)) @@ -374,7 +374,7 @@ typedef struct u_data { arg_t u_argn3; /* args n-3, n-2, n-1, and n */ void * u_isp; /* Value of initial sp (argv) */ usize_t u_top; /* Top of memory for this task */ - int (*u_sigvec[NSIGS])(); /* Array of signal vectors */ + int (*u_sigvec[NSIGS])(int); /* Array of signal vectors */ /**** If you change this top section, also update offsets in "kernel.def" ****/ char * u_base; /* Source or dest for I/O */ diff --git a/Kernel/process.c b/Kernel/process.c index dab50471..b109f451 100644 --- a/Kernel/process.c +++ b/Kernel/process.c @@ -434,7 +434,7 @@ void chksigs(void) { uint8_t j; uint32_t pending = udata.u_ptab->p_pending & ~udata.u_ptab->p_held; - int16_t (**svec)() = &udata.u_sigvec[0]; + int (**svec)(int) = &udata.u_sigvec[0]; uint32_t m; // any signals pending? diff --git a/Kernel/syscall_proc.c b/Kernel/syscall_proc.c index e113eb1c..534640a5 100644 --- a/Kernel/syscall_proc.c +++ b/Kernel/syscall_proc.c @@ -415,7 +415,7 @@ int16_t sig; int16_t (*func)(); ********************************************/ #define sig (int16_t)udata.u_argn -#define func (int (*)())udata.u_argn1 +#define func (int (*)(int))udata.u_argn1 arg_t _signal(void) {