search for: linkctx

Displaying 3 results from an estimated 3 matches for "linkctx".

2010 Apr 11
0
[LLVMdev] Proposal: stack/context switching within a thread
...revious" context; when %func returns, this pointer is dereferenced and ; execution continues at the linked context. When the context begins executing, ; %func is called with a pointer to its corresponding context as its first ; parameter, and the values passed to llvm.makecontext after the %linkCtx ; parameter as its following parameters. %func must use the "C" calling ; convention. If execution unwinds past %func, undefined behavior results. If ; the memory pointed to by %newCtx is overwritten by anything other than a call ; to llvm.swapcontext, a later return from %func will...
2010 Apr 11
3
[LLVMdev] Proposal: stack/context switching within a thread
Kenneth Uildriks <kennethuil at gmail.com> wrote: > As I see it, the context switching mechanism itself needs to know > where to point the stack register when switching.  The C routines take > an initial stack pointer when creating the context, and keep track of > it from there.  If we don't actually need to interoperate with > contexts created from the C routines, we have
2010 Apr 07
2
[LLVMdev] Proposal: stack/context switching within a thread
...ndefined behavior results. If the memory pointed to by %newCtx is ; overwritten by anything other than a call to llvm.swapcontext, a later return ; from %func will result in undefined behavior. declare void llvm.makecontext({}* %newCtx, void({}*, {}*)* %func, i8* %stackbegin, i64 %stacksize, {}* %linkCtx, {}* %data) ; Retrieves the link context pointer from the given context. The link context ; pointer is the same one that was passed to llvm.makecontext to create the ; given context. If pCtx was populated by llvm.getcontext rather than ; llvm.makecontext, this function returns a null pointer. I...