SAM function SAM-Execution-create()
SAM_Execution_create - Create a worker thread
#include <sam.h> SAM_Workerid_t SAM_Execution_create(SAM_t sam, void *(*start_routine)(void*), void *arg);
The SAM_Execution_create() is used to create a new worker thread within a process and the SAM Structure object sam. The worker thread is created executing start_routine with arg as its sole argument.
 Return value
Upon completion SAM_Execution_create() returns the unique identifier of the new created worker thread.
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