diff ProcrContext.h @ 77:fe5ec83f1baf

separated hardware dependent code
author Merten Sach <msach@mailbox.tu-berlin.de>
date Wed, 22 Jun 2011 16:12:27 +0200
parents SwitchAnimators.h@9ddbb071142d
children 521c75d64cef
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/ProcrContext.h	Wed Jun 22 16:12:27 2011 +0200
     1.3 @@ -0,0 +1,31 @@
     1.4 +/*
     1.5 + *  Copyright 2009 OpenSourceStewardshipFoundation.org
     1.6 + *  Licensed under GNU General Public License version 2
     1.7 + *
     1.8 + * Author: seanhalle@yahoo.com
     1.9 + * 
    1.10 + */
    1.11 +
    1.12 +#ifndef _ProcrContext_H
    1.13 +#define	_ProcrContext_H
    1.14 +#define _GNU_SOURCE
    1.15 +
    1.16 +void saveCoreLoopReturnAddr(void **returnAddress);
    1.17 +
    1.18 +void switchToVP(VirtProcr *nextProcr);
    1.19 +
    1.20 +void switchToCoreLoop(VirtProcr *nextProcr);
    1.21 +
    1.22 +void masterSwitchToCoreLoop(VirtProcr *nextProcr);
    1.23 +
    1.24 +void startVirtProcrFn();
    1.25 +
    1.26 +#define flushRegisters() \
    1.27 +        asm volatile ("":::"%rbx", "%r12", "%r13","%r14","%r15")
    1.28 +
    1.29 +inline VirtProcr *
    1.30 +create_procr_helper( VirtProcr *newPr,       VirtProcrFnPtr  fnPtr,
    1.31 +                     void      *initialData, void           *stackLocs );
    1.32 +
    1.33 +#endif	/* _ProcrContext_H */
    1.34 +