Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
comparison VMS.h @ 215:10a72bcedbf0
fixed include paths, and various minor fixes, while updating SSR to use this brch
| author | Some Random Person <seanhalle@yahoo.com> |
|---|---|
| date | Fri, 09 Mar 2012 22:30:26 -0800 |
| parents | 64737d3deeb4 |
| children | 712218cdc4ba |
comparison
equal
deleted
inserted
replaced
| 101:27f1469cc11b | 102:81384f7fc3d3 |
|---|---|
| 9 #ifndef _VMS_H | 9 #ifndef _VMS_H |
| 10 #define _VMS_H | 10 #define _VMS_H |
| 11 #define _GNU_SOURCE | 11 #define _GNU_SOURCE |
| 12 | 12 |
| 13 #include "VMS_primitive_data_types.h" | 13 #include "VMS_primitive_data_types.h" |
| 14 #include "C_Libraries/DynArray/DynArray.h" | 14 #include "DynArray/DynArray.h" |
| 15 #include "C_Libraries/Hash_impl/PrivateHash.h" | 15 #include "Hash_impl/PrivateHash.h" |
| 16 #include "C_Libraries/Histogram/Histogram.h" | 16 #include "Histogram/Histogram.h" |
| 17 #include "C_Libraries/Queue_impl/PrivateQueue.h" | 17 #include "Queue_impl/PrivateQueue.h" |
| 18 #include "vmalloc.h" | 18 #include "vmalloc.h" |
| 19 | 19 |
| 20 #include <pthread.h> | 20 #include <pthread.h> |
| 21 #include <sys/time.h> | 21 #include <sys/time.h> |
| 22 | 22 |
| 105 | 105 |
| 106 /*WARNING: re-arranging this data structure could cause Slv switching | 106 /*WARNING: re-arranging this data structure could cause Slv switching |
| 107 * assembly code to fail -- hard-codes offsets of fields | 107 * assembly code to fail -- hard-codes offsets of fields |
| 108 */ | 108 */ |
| 109 struct _SlaveVP | 109 struct _SlaveVP |
| 110 { int procrID; //each slave given a unique ID | 110 { int slaveID; //each slave given a unique ID |
| 111 int coreAnimatedBy; | 111 int coreAnimatedBy; |
| 112 void *startOfStack; | 112 void *startOfStack; |
| 113 void *stackPtr; | 113 void *stackPtr; |
| 114 void *framePtr; | 114 void *framePtr; |
| 115 void *resumeInstrPtr; | 115 void *resumeInstrPtr; |
| 210 } | 210 } |
| 211 ThdParams; | 211 ThdParams; |
| 212 | 212 |
| 213 //============================= Global Vars ================================ | 213 //============================= Global Vars ================================ |
| 214 | 214 |
| 215 volatile MasterEnv *_VMSMasterEnv __align_to_cacheline__; | |
| 216 | |
| 215 pthread_t coreLoopThdHandles[ NUM_CORES ]; //pthread's virt-procr state | 217 pthread_t coreLoopThdHandles[ NUM_CORES ]; //pthread's virt-procr state |
| 216 ThdParams *coreLoopThdParams [ NUM_CORES ]; | 218 ThdParams *coreLoopThdParams [ NUM_CORES ]; |
| 217 pthread_mutex_t suspendLock; | 219 pthread_mutex_t suspendLock = PTHREAD_MUTEX_INITIALIZER; |
| 218 pthread_cond_t suspend_cond; | 220 pthread_cond_t suspendCond = PTHREAD_COND_INITIALIZER; |
| 219 | |
| 220 volatile MasterEnv *_VMSMasterEnv __align_to_cacheline__; | |
| 221 | |
| 222 pthread_mutex_t suspendLock = PTHREAD_MUTEX_INITIALIZER; | |
| 223 pthread_cond_t suspend_cond = PTHREAD_COND_INITIALIZER; | |
| 224 | 221 |
| 225 //========================= Function Prototypes =========================== | 222 //========================= Function Prototypes =========================== |
| 226 | 223 |
| 227 /* MEANING OF WL PI SS int | 224 /* MEANING OF WL PI SS int |
| 228 * These indicate which places the function is safe to use. They stand for: | 225 * These indicate which places the function is safe to use. They stand for: |
| 235 //========== Setup and shutdown ========== | 232 //========== Setup and shutdown ========== |
| 236 void | 233 void |
| 237 VMS_SS__init(); | 234 VMS_SS__init(); |
| 238 | 235 |
| 239 //Fix; | 236 //Fix; |
| 240 /*seed-procr creation -- put box around language, have lang register stuff | 237 /*seed-slaveVP creation -- put box around language, have lang register stuff |
| 241 with VMS. | 238 with VMS. |
| 242 have main program explicitly INIT Lang! -- makes more sense to | 239 have main program explicitly INIT Lang! -- makes more sense to |
| 243 C programmers -- makes it clear that there's a transition. | 240 C programmers -- makes it clear that there's a transition. |
| 244 (might need to have the pthreads remain waiting for | 241 (might need to have the pthreads remain waiting for |
| 245 cond until work is scheduled) | 242 cond until work is scheduled) |
