Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
comparison PR.c @ 285:7b6f8cf08b1f
Minor -- gave malloc its own lock and renamed TopLevelFn to BirthFn
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Wed, 12 Jun 2013 14:12:06 -0700 |
| parents | 2fc69e6c14ea |
| children | b02b34681414 |
comparison
equal
deleted
inserted
replaced
| 2:0b0e13987366 | 3:ddb9ccfe3aa0 |
|---|---|
| 63 PR__start() | 63 PR__start() |
| 64 { | 64 { |
| 65 PR_SS__create_topEnv(); | 65 PR_SS__create_topEnv(); |
| 66 | 66 |
| 67 #ifdef DEBUG__TURN_ON_SEQUENTIAL_MODE | 67 #ifdef DEBUG__TURN_ON_SEQUENTIAL_MODE |
| 68 printf( "\n\n Running in SEQUENTIAL mode \n\n" ); | 68 printf( "\n\n Running in SEQUENTIAL mode -- NUM_CORES: %d \n\n", NUM_CORES ); |
| 69 //Only difference between version with an OS thread pinned to each core and | 69 //Only difference between version with an OS thread pinned to each core and |
| 70 // the sequential version of PR is PR__init_Seq, this, and coreCtlr_Seq. | 70 // the sequential version of PR is PR__init_Seq, this, and coreCtlr_Seq. |
| 71 | 71 |
| 72 //Don't do anything here -- using main thread for all PR activity, so | 72 //Don't do anything here -- using main thread for all PR activity, so |
| 73 // do PR activity when main thread calls "wait for process to end" | 73 // do PR activity when main thread calls "wait for process to end" |
| 98 * inside the process. | 98 * inside the process. |
| 99 *-] Counter of num live slaves and num live tasks in the process | 99 *-] Counter of num live slaves and num live tasks in the process |
| 100 * | 100 * |
| 101 */ | 101 */ |
| 102 PRProcess * | 102 PRProcess * |
| 103 PR__create_process( TopLevelFnPtr seed_Fn, void *seedData ) | 103 PR__create_process( BirthFnPtr seed_Fn, void *seedData ) |
| 104 { SlaveVP *seedSlv; | 104 { SlaveVP *seedSlv; |
| 105 PRProcess *process; | 105 PRProcess *process; |
| 106 PRLangEnv **langEnvs, **langEnvsList; | 106 PRLangEnv **langEnvs, **langEnvsList; |
| 107 | 107 |
| 108 //This runs outside of the master lock, so use PR_WL form of malloc | 108 //This runs outside of the master lock, so use PR_WL form of malloc |
