[Top] [All Lists]

struct sigcontext for N32 userland

Subject: struct sigcontext for N32 userland
From: Atsushi Nemoto <>
Date: Tue, 13 Feb 2007 00:51:13 +0900 (JST)
Original-recipient: rfc822;
If N32 userland refers asm-mips/sigcontext.h, struct sigcontext cause
some troubles.


struct sigcontext {
        unsigned long   sc_regs[32];

The kernel use 64-bit for sc_regs[0], and both N32/N64 userland
expects it was 64-bit.  But size of 'long' on N32 is actually 32-bit.
So this definition make some confusion.

glibc has its own sigcontext.h and it uses 'unsigned long long' for
sc_regs, so no real problem with glibc.

Should we use 'unsigned long long' here as glibc does?

Or should we have separate definition just for N32 userland?  (kernel
does not use #if _MIPS_SIM == _MIPS_SIM_NABI32 block anyway since
kernel itself is compiled as n64)

Or should we make struct sigcontext private to kernel and do not
export for userland at all?

Or ... do nothing?

Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>