SAM function SAM-My-workid()
SAM_My_workid - Get calling thread's worker ID
#include <sam.h> SAM_Workerid_t SAM_My_workid(SAM_t sam);
The SAM_My_workid() function returns the worker thread ID of the calling worker thread. This function shall only be called from a worker thread, otherwise behavior is undetermined.
 Return value
See DESCRIPTION above.
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