SAM function SAM-Execution-finish()
SAM_Execution_finish - Finish the execution of a worker thread
#include <sam.h> void SAM_Execution_finish(SAM_t sam);
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.
 Return value
None, assumes correct input parameters.
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