SAM function SAM-Execution-start()
From SoOS
Contents |
[edit] Name
SAM_Execution_start - Start the execution of a worker thread
[edit] Synopsis
#include <sam.h> void SAM_Execution_start(void *args, SAM_t *sam, void **arg);
[edit] Description
The SAM_Execution_start() function initializes a worker thread and sets the context of the SAM Structure object sam. This is the first function that shall be called in the worker thread routine. On its return, it extracts in sam and arg the SAM Structure object and the routine parameters from the args pointer, respectively.
[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_finish(), SAM_Execution_restart(), SAM_Execution_cancel(), <sam.h>.