Simple Virtual Machine A simple but flexible virtual machine

Loading...
Searching...
No Matches
Functions
SVM memory synchronisation
SVM memories

This module contains API functions to handle SVM memory synchronisation. More...

## Functions
SVM_FUNCTION void | svm_memory_synchronisation_enable (const void *svm, const SVM_Kernel kernel, const SVM_Value_Pointer pointer)
| This function enables the synchronisation on a memory zone.
SVM_FUNCTION void | svm_memory_synchronisation_disable (const void *svm, const SVM_Kernel kernel, const SVM_Value_Pointer pointer)
| This function disables the synchronisation on a memory zone.

## Detailed Description

This module contains API functions to handle SVM memory synchronisation.

## Function Documentation

## ◆ svm_memory_synchronisation_disable()

SVM_FUNCTION void svm_memory_synchronisation_disable | ( | const void * | svm,
|  | const SVM_Kernel | kernel,
|  | const SVM_Value_Pointer | pointer
| ) |  |

This function disables the synchronisation on a memory zone.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | pointer | The memory zone to release from protection by synchronisation.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.

See also
  svm_process_ownership_lock
  svm_kernel_get_current
  svm_memory_share
  svm_lock_new
  svm_lock_readguard_new
  svm_lock_writeguard_new

## ◆ svm_memory_synchronisation_enable()

SVM_FUNCTION void svm_memory_synchronisation_enable | ( | const void * | svm,
|  | const SVM_Kernel | kernel,
|  | const SVM_Value_Pointer | pointer
| ) |  |

This function enables the synchronisation on a memory zone.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | pointer | The memory zone to protect by synchronisation.

Note
  The synchronisation applies to access to the memory itself, and not access to the value itself. If the value needs access synchronisation, it shall be done manually.

The synchronisation mechanism applied to each address of the memory zone is equivalent to SVM_Lock.

- When a read to the memory is done from a synchronised address, a read lock acquisition is done,
- When a write or deletion of the memory is done on a synchronised address, a write lock acquisition is done.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.

See also
  svm_process_ownership_lock
  svm_kernel_get_current
  svm_lock_new
  svm_lock_readguard_new
  svm_lock_writeguard_new