SAM function SAM-Init()
From SoOS
Contents |
[edit] Name
SAM_Init - Initialize a SAM context
[edit] Synopsis
#include <sam.h> void SAM_Init(SAM_t *sam);
[edit] Description
The SAM_Init() function initializes the SAM Structure object referenced by sam. It must be called before any other SAM function.
Attempting to initialize an already initialized SAM Structure results in undefined behavior.
[edit] Return value
None.
[edit] Errors
None, assumes correct input parameters.
[edit] Examples
Example 0 - Initialization
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