SAM function SAM-Execution-finish()
From SoOS
Contents |
[edit] Name
SAM_Execution_finish - Finish the execution of a worker thread
[edit] Synopsis
#include <sam.h> void SAM_Execution_finish(SAM_t sam);
[edit] Description
The SAM_Execution_finish() function merges the speculative memory written by the calling worker thread and joins it with the main execution thread (using the function SAM_Execution_join()). This is the last function that shall be called in the worker thread routine before returning.
[edit] Return value
None.
[edit] Errors
None, assumes correct input parameters.
[edit] Examples
Example 1 - Creating a basic worker thread
Example 2 - Sending and retrieving information to worker threads
Example 3 A - Executing speculatively and flashing back a worker thread (inefficient version)
Example 3 B - Executing speculatively and flashing back a worker thread (efficient version)
Example 4 - Executing speculatively, flashing back, and speculative writing
Example 5 - Using multiple protected memory regions within the same SAM context
[edit] See also
SAM_Execution_create(), SAM_Execution_join(), SAM_Execution_start(), SAM_Execution_restart(), SAM_Execution_cancel(), <sam.h>.