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:[EMAIL PROTECTED]
SCC Internetworking & Databases http://www.scc.nl/
The FreeBSD project mailto:[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message