SAM function SAM-Memory-speculative-read()

From SoOS

Jump to: navigation, search

Contents

[edit] Name

SAM_Memory_speculative_read - Mark a region of memory as speculatively read

[edit] Synopsis

#include <sam.h>
 
void SAM_Memory_speculative_read(SAM_t sam, SAM_Workerid_t wid, void *addr);

[edit] Description

The SAM_Memory_speculative_read() function marks the registered region of memory in which is contained addr as read by the worker wid. This function shall be called from the worker thread before accessing the registered region of memory.

[edit] Return value

None.

[edit] Errors

None, assumes correct input parameters.

[edit] Examples

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_Memory_speculative_write_prepare(), SAM_Memory_write_prepare(), SAM_Memory_write(), __SAM_ADDR__(), <sam.h>.