Simple Virtual Machine A simple but flexible virtual machine

Functions
SVM kernel operations
SVM kernels

This module contains API functions to handle SVM kernel operations. More...

## Functions
SVM_FUNCTION void | svm_kernel_swap_memory (const void *svm, SVM_Kernel kernel1, SVM_Kernel kernel2)
| This function swaps memories of two kernels. More...

## Detailed Description

This module contains API functions to handle SVM kernel operations.

## Function Documentation

## ◆ svm_kernel_swap_memory()

SVM_FUNCTION void svm_kernel_swap_memory | ( | const void * | svm,
|  | SVM_Kernel | kernel1,
|  | SVM_Kernel | kernel2
| ) |  |

This function swaps memories of two kernels.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | kernel1 | The first kernel of memory exchange.
  [in,out] | kernel2 | The second kernel of memory exchange.

This function swaps the memories of the two kernels provided in input, no matter their state. This function also works on detached kernels.

Note
  The two kernels have to be different kernels.

Exceptions

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