SAM function SAM-Memory-write()

From SoOS

Jump to: navigation, search

Contents

[edit] Name

SAM_Memory_write - Mark a region of memory as written

[edit] Synopsis

#include <sam.h>
 
void SAM_Memory_write(SAM_t sam, void *addr);

[edit] Description

The SAM_Memory_write() function flashes back all the workers that have speculatively read the region of memory in which the address addr is contained. This function shall only be called from the main execution thread.

[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_read(), SAM_Memory_speculative_write_prepare(), SAM_Memory_write_prepare(), __SAM_ADDR__(), <sam.h>.