Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
diff PR.c @ 286:b02b34681414
VReo V2 -- saves checker and doer fn with the port, where triggered
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Wed, 10 Jul 2013 14:49:04 -0700 |
| parents | 7b6f8cf08b1f |
| children | 744b5ff9851e |
line diff
1.1 --- a/PR.c Wed Jun 12 14:12:06 2013 -0700 1.2 +++ b/PR.c Wed Jul 10 14:49:04 2013 -0700 1.3 @@ -232,9 +232,11 @@ 1.4 process->executionIsComplete = TRUE; 1.5 } 1.6 #else 1.7 - //First get the "ACK" lock, then do normal wait for signal, then release 1.8 - // ACK lock, to let end-process know it can free the process struct 1.9 - pthread_mutex_lock( &(process->doneAckLock) ); 1.10 + //This is called from main thread, so must use OS thread constructs to 1.11 + // force the main thread to block (suspend) until it is signalled that 1.12 + // the process is complete. One issue is that the mutex and cond variable 1.13 + // are inside the process data struct, which is freed when the process 1.14 + // ends! 1.15 pthread_mutex_lock( &(process->doneLock) ); 1.16 while( process->executionIsComplete != TRUE ) 1.17 {
