SAM function SAM-Destroy()
From SoOS
Contents |
[edit] Name
SAM_Destroy - Destroy a SAM context
[edit] Synopsis
#include <sam.h> void SAM_Destroy(SAM_t *sam);
[edit] Description
The SAM_Destroy() function destroys the SAM Structure object referenced by sam; the SAM Structure object becomes, in effect, uninitialized. It will set the object referenced by sam to an invalid value. A destroyed SAM Structure object can be re-initialized using SAM_Init(); the results of otherwise referencing the object after it has been destroyed are undefined.
[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