view ProcrContext.h @ 180:3b67317d2e3f

cloned the sub-repositories (DynArray, Hash_impl, etc) now committing the clones
author Me@portablequad
date Wed, 04 Jan 2012 16:29:11 -0800
parents c11b9dcf6d24
children 6db9e4898978
line source
1 /*
2 * Copyright 2009 OpenSourceStewardshipFoundation.org
3 * Licensed under GNU General Public License version 2
4 *
5 * Author: seanhalle@yahoo.com
6 *
7 */
9 #ifndef _ProcrContext_H
10 #define _ProcrContext_H
11 #define _GNU_SOURCE
13 void saveCoreLoopReturnAddr(void **returnAddress);
15 void switchToVP(VirtProcr *nextProcr);
17 void switchToCoreLoop(VirtProcr *nextProcr);
19 void masterSwitchToCoreLoop(VirtProcr *nextProcr);
21 void startVirtProcrFn();
23 void *asmTerminateCoreLoop(VirtProcr *currPr);
25 #define flushRegisters() \
26 asm volatile ("":::"%rbx", "%r12", "%r13","%r14","%r15")
28 inline VirtProcr *
29 create_procr_helper( VirtProcr *newPr, VirtProcrFnPtr fnPtr,
30 void *initialData, void *stackLocs );
32 #endif /* _ProcrContext_H */