Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
comparison VMS.c @ 49:4fbc2165e493
Merge not sure what it did, actually -- still learning how merge works
| author | Me |
|---|---|
| date | Tue, 26 Oct 2010 18:31:34 -0700 |
| parents | 72373405c816 |
| children | 984f7d78bfdf |
comparison
equal
deleted
inserted
replaced
| 19:a02b366f0cd7 | 20:12fa3731f956 |
|---|---|
| 110 } | 110 } |
| 111 _VMSMasterEnv->readyToAnimateQs = readyToAnimateQs; | 111 _VMSMasterEnv->readyToAnimateQs = readyToAnimateQs; |
| 112 _VMSMasterEnv->masterVPs = masterVPs; | 112 _VMSMasterEnv->masterVPs = masterVPs; |
| 113 _VMSMasterEnv->allSchedSlots = allSchedSlots; | 113 _VMSMasterEnv->allSchedSlots = allSchedSlots; |
| 114 | 114 |
| 115 | 115 //============================= MEASUREMENT STUFF ======================== |
| 116 #ifdef MEAS__TIME_MASTER | |
| 117 | |
| 118 _VMSMasterEnv->stats->masterTimeHist = makeHistogram( 25, 500, 800 ); | |
| 119 _VMSMasterEnv->stats->masterLockHist = makeHistogram( 25, 0, 100000 ); | |
| 120 _VMSMasterEnv->stats->createHist = makeHistogram( 25, 0, 5000 ); | |
| 121 #endif | |
| 122 //======================================================================== | |
| 116 | 123 |
| 117 //Aug 19, 2010: no longer need to place initial masterVP into queue | 124 //Aug 19, 2010: no longer need to place initial masterVP into queue |
| 118 // because coreLoop now controls -- animates its masterVP when no work | 125 // because coreLoop now controls -- animates its masterVP when no work |
| 119 | 126 |
| 120 | 127 |
| 302 */ | 309 */ |
| 303 VirtProcr * | 310 VirtProcr * |
| 304 VMS__create_procr( VirtProcrFnPtr fnPtr, void *initialData ) | 311 VMS__create_procr( VirtProcrFnPtr fnPtr, void *initialData ) |
| 305 { VirtProcr *newPr; | 312 { VirtProcr *newPr; |
| 306 char *stackLocs, *stackPtr; | 313 char *stackLocs, *stackPtr; |
| 314 | |
| 315 //============================= MEASUREMENT STUFF ======================== | |
| 316 #ifdef MEAS__TIME_MASTER | |
| 317 int32 startStamp; | |
| 318 saveLowTimeStampCountInto( startStamp ); | |
| 319 #endif | |
| 320 //======================================================================== | |
| 307 | 321 |
| 308 newPr = malloc( sizeof(VirtProcr) ); | 322 newPr = malloc( sizeof(VirtProcr) ); |
| 309 newPr->procrID = numProcrsCreated++; | 323 newPr->procrID = numProcrsCreated++; |
| 310 newPr->nextInstrPt = fnPtr; | 324 newPr->nextInstrPt = fnPtr; |
| 311 newPr->initialData = initialData; | 325 newPr->initialData = initialData; |
| 325 *( (int *)stackPtr + 2 ) = (int) newPr; //rightmost param -- 32bit pointer | 339 *( (int *)stackPtr + 2 ) = (int) newPr; //rightmost param -- 32bit pointer |
| 326 *( (int *)stackPtr + 1 ) = (int) initialData; //next param to left | 340 *( (int *)stackPtr + 1 ) = (int) initialData; //next param to left |
| 327 newPr->stackPtr = stackPtr; //core loop will switch to this, then | 341 newPr->stackPtr = stackPtr; //core loop will switch to this, then |
| 328 newPr->framePtr = stackPtr; //suspend loop will save new stack & frame ptr | 342 newPr->framePtr = stackPtr; //suspend loop will save new stack & frame ptr |
| 329 | 343 |
| 344 //============================= MEASUREMENT STUFF ======================== | |
| 345 #ifdef MEAS__TIME_MASTER | |
| 346 int32 endStamp; | |
| 347 saveLowTimeStampCountInto( endStamp ); | |
| 348 addIntervalToHist( startStamp, endStamp, | |
| 349 _VMSMasterEnv->stats->createHist ); | |
| 350 #endif | |
| 351 //======================================================================== | |
| 352 | |
| 330 return newPr; | 353 return newPr; |
| 331 } | 354 } |
| 332 | 355 |
| 333 | 356 |
| 334 /*there is a label inside this function -- save the addr of this label in | 357 /*there is a label inside this function -- save the addr of this label in |
