#ifndef _UCONTEXT_H_
#define _UCONTEXT_H_

#include <signal.h>

typedef struct
{
    unsigned long long  cr0_lo;
    unsigned long long  cr0_hi;
    unsigned long long  cr1_lo;
    unsigned long long  cr1_hi;
    unsigned long long  sbr;     /* Stack base register: top of */
                                 /* local data (user) stack */
    unsigned long long  usd_lo;  /* Local data (user) stack */
    unsigned long long  usd_hi;  /* descriptor: base & size */
    unsigned long long  psp_lo;  /* Procedure stack pointer: */
    unsigned long long  psp_hi;  /* base & index & size */
    unsigned long long  pcsp_lo; /* Procedure chain stack */
    unsigned long long  pcsp_hi; /* pointer: base & index & size */
} mcontext_t;

typedef struct ucontext
{
    unsigned long uc_flags;
    struct ucontext  *uc_link;
    stack_t uc_stack;
    mcontext_t uc_mcontext;
    sigset_t uc_sigmask;
} ucontext_t;

#endif /* _UCONTEXT_H_ */

