Date: Sat, 02 Oct 1999 01:41:03 +0200 From: Marcel Moolenaar <marcel@scc.nl> To: Nate Williams <nate@mt.sri.com> Cc: current@FreeBSD.org, Bruce Evans <bde@zeta.org.au>, John Polstra <jdp@polstra.com>, Alan Cox <alc@cs.rice.edu>, Peter Wemm <peter@netplex.com.au> Subject: Re: sigset_t: a summary Message-ID: <37F5468F.7F214FB3@scc.nl> References: <37F47CD8.9F676F08@scc.nl> <199910011506.JAA03438@mt.sri.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Nate Williams wrote: > > > 1. Should the ucontext_t changes be backed out, or is this the > > way we would like to go? (but only it better :-) > > We need something. Rather than say 'something better', I'd need to see > what that better things is. However, given Bruce's comments earlier, it > seems like we need to have ucontext_t to stay compatible. This is better: typedef struct __ucontext_t { /* * Keep the order of the first two fields. Also, * keep them the first to fields in the structure. * This way we can have a union with struct * sigcontext and ucontext_t. This allows us to * support them both at the same time. * note: the union is not defined, though. */ mcontext_t uc_mcontext; sigset_t uc_sigmask; struct __ucontext_t *uc_link; stack_t uc_stack; int __spare__[8]; } ucontext_t; typedef struct __mcontext_t { /* * The first 3 fields are must match the definition * of sigcontext. So that we can support sigcontext * and ucontext at the same time. */ int mc_onstack; /* XXX - struct sigcontext compat. */ int mc_gs; struct trapframe mc_tf; int mc_fpregs[28]; /* env87 + fpacc87 + u_long */ int __spare__[16]; } mcontext_t; struct sigcontext { int sc_onstack; /* sigstack state to restore */ int sc_gs; int sc_fs; int sc_es; int sc_ds; int sc_edi; int sc_esi; int sc_ebp; int sc_isp; int sc_ebx; int sc_edx; int sc_ecx; int sc_eax; int sc_trapno; int sc_err; int sc_eip; int sc_cs; int sc_efl; int sc_esp; /* machine state */ int sc_ss; int sc_fpregs[28]; /* XXX - mcontext_t compat. */ int sc_spare[16]; /* XXX - mcontext_t compat. */ sigset_t sc_mask; /* signal mask to restore */ }; The Alpha port has similar construct... The third argument can now be defined as either struct sigcontext or as ucontext_t. <Yawn> -- Off to bed... -- Marcel Moolenaar mailto:marcel@scc.nl SCC Internetworking & Databases http://www.scc.nl/ The FreeBSD project mailto:marcel@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37F5468F.7F214FB3>