PPL Logo

util/uJcontext.C File Reference

Go to the source code of this file.

Functions

static void * getStack (void)
 VERBOSE ()
int getJcontext (uJcontext_t *u)
int setJcontext (const uJcontext_t *u)
int swapJcontext (uJcontext_t *o, const uJcontext_t *u)
void makeJcontext (uJcontext_t *u, uJcontext_fn_t __func, int __argc, void *a, void *b)

Variables

char * _dummyAllocaSetJcontext


Function Documentation

static void* getStack ( void   )  [static]

Definition at line 34 of file uJcontext.C.

References p, and x.

Referenced by getJcontext(), and VERBOSE().

Here is the caller graph for this function:

VERBOSE (  ) 

Definition at line 40 of file uJcontext.C.

References getStack().

Referenced by DLOOP_Dataloop_create_flattened_struct(), makeJcontext(), setJcontext(), and swapJcontext().

Here is the call graph for this function:

Here is the caller graph for this function:

int getJcontext ( uJcontext_t u  ) 

int setJcontext ( const uJcontext_t u  ) 

Some machines reference variables (e.g., arguments, saved link) from their caller's stack frame, so we need to leave a little extra space before the new stack pointer.

Microsoft's _alloca is too smart-- it checks the pages being allocated to see if they're all valid stack pages, so our hack of using a huge alloca to change the stack pointer instead results in an address error (from "chkstk").

Manually changing the stack pointer seems to work properly; and because local variables are referenced via the frame pointer (ebp), this is all that's needed.

Definition at line 70 of file uJcontext.C.

References uJcontext_t::_uc_args, uJcontext_t::_uc_fn, uJcontext_t::_uc_jmp_buf, setJcontext(), uJcontext_stack_t::ss_size, uJcontext_stack_t::ss_sp, uJcontext_t::uc_link, uJcontext_t::uc_stack, uJcontext_t::uc_swap, and VERBOSE().

Here is the call graph for this function:

int swapJcontext ( uJcontext_t o,
const uJcontext_t u 
)

Definition at line 166 of file uJcontext.C.

References uJcontext_t::_uc_jmp_buf, setJcontext(), and VERBOSE().

Here is the call graph for this function:

void makeJcontext ( uJcontext_t u,
uJcontext_fn_t  __func,
int  __argc,
void *  a,
void *  b 
)

Definition at line 185 of file uJcontext.C.

References uJcontext_t::_uc_args, uJcontext_t::_uc_fn, and VERBOSE().

Here is the call graph for this function:


Variable Documentation

Definition at line 67 of file uJcontext.C.


Generated on Mon Sep 21 08:12:24 2020 for Charm++ by  doxygen 1.5.5