#include <stddef.h>
#include <signal.h>
#include <sys/ucontext.h>

--

SIG_BLOCK
SIG_SETMASK

UC_FLAGS	offsetof (ucontext_t, uc_flags)
UC_LINK		offsetof (ucontext_t, uc_link)
UC_SIGMASK	offsetof (ucontext_t, uc_sigmask)
UC_STACK	offsetof (ucontext_t, uc_stack)
UC_MCONTEXT	offsetof (ucontext_t, uc_mcontext)
MC_GREGS	offsetof (mcontext_t, gregs)
MC_GWINS	offsetof (mcontext_t, gwins)
MC_FPREGS	offsetof (mcontext_t, fpregs)
MC_XRS		offsetof (mcontext_t, xrs)
MC_FILLER	offsetof (mcontext_t, filler)
GREG_PSR	(REG_PSR * sizeof(greg_t))
GREG_PC		(REG_PC * sizeof(greg_t))
GREG_NPC	(REG_nPC * sizeof(greg_t))
GREG_Y		(REG_Y * sizeof(greg_t))
GREG_G1		(REG_G1 * sizeof(greg_t))
GREG_G2		(REG_G2 * sizeof(greg_t))
GREG_G3		(REG_G3 * sizeof(greg_t))
GREG_G4		(REG_G4 * sizeof(greg_t))
GREG_G5		(REG_G5 * sizeof(greg_t))
GREG_G6		(REG_G6 * sizeof(greg_t))
GREG_G7		(REG_G7 * sizeof(greg_t))
GREG_O0		(REG_O0 * sizeof(greg_t))
GREG_O1		(REG_O1 * sizeof(greg_t))
GREG_O2		(REG_O2 * sizeof(greg_t))
GREG_O3		(REG_O3 * sizeof(greg_t))
GREG_O4		(REG_O4 * sizeof(greg_t))
GREG_O5		(REG_O5 * sizeof(greg_t))
GREG_O6		(REG_O6 * sizeof(greg_t))
GREG_O7		(REG_O7 * sizeof(greg_t))
FPU_D0		offsetof (fpregset_t, fpu_fr.fpu_dregs[0])
FPU_D2		offsetof (fpregset_t, fpu_fr.fpu_dregs[1])
FPU_D4		offsetof (fpregset_t, fpu_fr.fpu_dregs[2])
FPU_D6		offsetof (fpregset_t, fpu_fr.fpu_dregs[3])
FPU_D8		offsetof (fpregset_t, fpu_fr.fpu_dregs[4])
FPU_D10		offsetof (fpregset_t, fpu_fr.fpu_dregs[5])
FPU_D12		offsetof (fpregset_t, fpu_fr.fpu_dregs[6])
FPU_D14		offsetof (fpregset_t, fpu_fr.fpu_dregs[7])
FPU_D16		offsetof (fpregset_t, fpu_fr.fpu_dregs[8])
FPU_D18		offsetof (fpregset_t, fpu_fr.fpu_dregs[9])
FPU_D20		offsetof (fpregset_t, fpu_fr.fpu_dregs[10])
FPU_D22		offsetof (fpregset_t, fpu_fr.fpu_dregs[11])
FPU_D24		offsetof (fpregset_t, fpu_fr.fpu_dregs[12])
FPU_D26		offsetof (fpregset_t, fpu_fr.fpu_dregs[13])
FPU_D28		offsetof (fpregset_t, fpu_fr.fpu_dregs[14])
FPU_D30		offsetof (fpregset_t, fpu_fr.fpu_dregs[15])
FPU_Q		offsetof (fpregset_t, fpu_q)
FPU_FSR		offsetof (fpregset_t, fpu_fsr)
FPU_QCNT	offsetof (fpregset_t, fpu_qcnt)
FPU_Q_ENTRY_SZ	offsetof (fpregset_t, fpu_q_entrysize)
FPU_EN		offsetof (fpregset_t, fpu_en)
XRS_ID		offsetof (xrs_t, xrs_id)
XRS_PTR		offsetof (xrs_t, xrs_ptr)