Fix shutdown issues with scan and callback.

The main reason for this merge proposal is the change to "public" API functions.

Use atomic counter to resolve data race on threadsRunning in callback.

Split up callbackShutdown() and scanShutdown() into two phases *Stop() and
*Cleanup(). The *Stop() functions signal worker threads, and wait for them to
exit. The *Cleanup() functions actually reclaim global resources.

These two mechanisms have couplings which are quite complex. I/O Intr scans
involve both scan lists and callbacks.
This commit is contained in:
Michael Davidsaver
2015-07-16 11:48:29 -05:00
committed by Andrew Johnson
parent 5eb49ebaf0
commit fefe6fd1fc
7 changed files with 54 additions and 29 deletions
+2 -1
View File
@@ -184,7 +184,8 @@ MAIN(callbackParallelTest)
free(pcbt[i]);
}
callbackShutdown();
callbackStop();
callbackCleanup();
return testDone();
}