• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

sst/elements/genericProc/programs/qthread-1.4/include/osx_compat/power-ucontext.h

00001 #define setcontext(u)   _setmcontext(&(u)->mc)
00002 #define getcontext(u)   _getmcontext(&(u)->mc)
00003 typedef struct mcontext mcontext_t;
00004 typedef struct ucontext ucontext_t;
00005 struct mcontext
00006 {
00007         unsigned long   pc;             /* lr */
00008         unsigned long   cr;             /* condition register (mfcr) */
00009         unsigned long   ctr;            /* count register, for branching (mfcr) */
00010         unsigned long   xer;            /* xer register, an optional-condition register (mfcr) */
00011         unsigned long   sp;             /* callee saved: r1 */
00012         unsigned long   toc;            /* callee saved: r2 */
00013         unsigned long   r3;             /* first arg to function, return register: r3 */
00014         unsigned long   gpr[19];        /* callee saved: r13-r31 */
00015         /* double-aligned for performance */
00016         unsigned long pad;
00017         double fpregs[18];              /* callee saved: r14-r31 */
00018 /*
00019 // XXX: currently do not save vector registers
00020 //      unsigned long   vr[4*12];       / * callee saved: v20-v31, 256-bits each * /
00021 //      unsigned long   vrsave;         / * which v regs should be saved? * /
00022 */
00023 };
00024 
00025 struct ucontext
00026 {
00027         struct {
00028                 void *ss_sp;
00029                 uint ss_size;
00030         } uc_stack;
00031         sigset_t uc_sigmask;
00032         mcontext_t mc;
00033         struct ucontext * uc_link; /* unused */
00034 };
00035 
00036 void makecontext(ucontext_t*, void(*)(void), int, ...);
00037 int swapcontext(ucontext_t*, ucontext_t*);
00038 int _getmcontext(mcontext_t*);
00039 void _setmcontext(mcontext_t*);
00040 

Generated on Fri Oct 22 2010 11:02:24 for SST by  doxygen 1.7.1