6502/z80: finish fixing up signal types
authorAlan Cox <alan@linux.intel.com>
Tue, 27 Jan 2015 23:54:15 +0000 (23:54 +0000)
committerAlan Cox <alan@linux.intel.com>
Tue, 27 Jan 2015 23:54:15 +0000 (23:54 +0000)
This now passes both compilers. 6809 still needs re-aligning

Kernel/include/kernel.h
Kernel/process.c
Kernel/syscall_proc.c

index 486314c..350f453 100644 (file)
@@ -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 */
index dab5047..b109f45 100644 (file)
@@ -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?
index e113eb1..534640a 100644 (file)
@@ -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)
 {