ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/include/thunks.h
(Generate patch)

Comparing SheepShaver/src/include/thunks.h (file contents):
Revision 1.10 by gbeauche, 2004-11-22T21:22:58Z vs.
Revision 1.12 by gbeauche, 2004-11-22T22:04:38Z

# Line 85 | Line 85 | extern uint32 NativeRoutineDescriptor(in
85  
86   /*
87   *  Helpers to share 32-bit addressable data with MacOS
88 + *
89 + *  There are two distinct allocatable regions:
90 + *
91 + *  - The Data region is used to share data between MacOS and
92 + *    SheepShaver. This is stack-like allocation since it is
93 + *    meant to only hold temporary data which dies at the end
94 + *    of the current function scope.
95 + *
96 + *  - The Procedure region is used to hold permanent M68K or
97 + *    PowerPC code to assist native routine implementations.
98 + *
99 + *  - The Procedure region grows up whereas the Data region
100 + *    grows down. They may intersect into the ZeroPage, which
101 + *    is a read-only page with all bits set to zero. In practise,
102 + *    the intersection is unlikely since the Procedure region is
103 + *    static and the Data region is meant to be small (< 256 KB).
104   */
105  
106   class SheepMem {
# Line 150 | Line 166 | static inline uint32 SheepProc(const uin
166          return mac_proc;
167   }
168  
169 + #define BUILD_SHEEPSHAVER_PROCEDURE(PROC)                                                       \
170 +        static uint32 PROC = 0;                                                                                 \
171 +        if (PROC == 0)                                                                                                  \
172 +                PROC = SheepProc(PROC##_template, sizeof(PROC##_template))
173 +
174   class SheepVar
175   {
176          uint32 m_base;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines