From: HJ Lu (hlu@luke.eecs.wsu.edu)
Date: 04/01/93


From: hlu@luke.eecs.wsu.edu (HJ Lu)
Subject: Re: Porting xspim (MIPS R3000 simulator) sigvec to signal, HELP!!!
Date: Fri, 2 Apr 1993 05:39:08 GMT

In article <1pg4ulINNhjo@shelley.u.washington.edu> opium@shelley.u.washington.edu (Eric Nelson) writes:
> These are all the grep'd occurances of sigvec in spim-5.0.tar.Z source,
> -trying to port xspim (MIPS R3000 simulator), from Ultrix/Sun to Linux.
>
> the first two are part of an ifdef-elsif-endif, not sure about the rest
>
>cl-except.c:extern int sigvec (int, struct sigvec *, struct sigvec *);
>cl-except.c:extern int sigvec ();
>cl-except.c: struct sigvec handler;
>cl-except.c: sigvec (x, &handler, NULL);
>cl-except.c: sigvec (SIGINT, &handler, NULL);
>mips-syscall.c: static struct sigvec sighandler[NSIG];
>mips-syscall.c:
> {SYS_sigvec, SPC_SYSCALL, NO_ARG, NO_ARG, NO_ARG, NO_ARG, NO_ARG, "sigvec"},
>mips-syscall.c: case SYS_sigvec:
>mips-syscall.c: bcopy (&HANDLE(R[REG_A0]), tmp, sizeof(struct sigvec));
>mips-syscall.c: bcopy (R[REG_A1], &HANDLE(R[REG_A0]), sizeof(struct sigvec));
>mips-syscall.c: * (struct sigvec *)R[REG_A2]=sighandler[R[REG_A0]];
>mips-syscall.c: PC = (int) find_symbol_address ("sigvec") + 44;
>cl-except.h: struct sigvec sv[NSIG];
>
>My question is how do I get around all this sigvec stuff?
>How do I change all this using signal?
> I know I must sound like a complete idiot here, but I know very little
> about C, and even less about programming in general.
>

Please get FAQ from tsx-11.mit.edu under pub/linux/GCC.

Linux doesn't support struct sigvec. You have to modify
the code not to use struct sigvec.

H.J.