Simple Virtual Machine A simple but flexible virtual machine

Functions
SVM processor flags
SVM processors

This module contains API functions to handle SVM processor flags. More...

## Functions
SVM_FUNCTION SVM_Boolean | svm_processor_has_flag (const void *svm, const SVM_Kernel kernel, const SVM_Value_String flag)
| This function detects whether a flag is raised in a processor current state, from a string value. More...
SVM_FUNCTION SVM_Boolean | svm_processor_has_flag__string (const void *svm, const SVM_Kernel kernel, const SVM_String flag)
| This function detects whether a flag is raised in a processor current state, from a SVM_String. More...
SVM_FUNCTION SVM_Boolean | svm_processor_has_flag__raw (const void *svm, const SVM_Kernel kernel, const char *flag)
| This function detects whether a flag is raised in a processor current state, from a C nul-terminated string. More...
SVM_FUNCTION SVM_Value_String * | svm_processor_list_flag (const void *svm, const SVM_Kernel kernel)
| This function lists all raised flags in a processor current state. More...
SVM_FUNCTION void | svm_processor_set_flag (const void *svm, const SVM_Kernel kernel, const SVM_Value_String flag, const SVM_Object_Level level)
| This function raises a flag in a processor current state, from a string value. More...
SVM_FUNCTION void | svm_processor_set_flag__string (const void *svm, const SVM_Kernel kernel, const SVM_String flag, const SVM_Object_Level level)
| This function raises a flag in a processor current state, from a SVM_String. More...
SVM_FUNCTION void | svm_processor_set_flag__raw (const void *svm, const SVM_Kernel kernel, const char *flag, const SVM_Object_Level level)
| This function raises a flag in a processor current state, from a C nul-terminated string. More...
SVM_FUNCTION void | svm_processor_reset_flag (const void *svm, const SVM_Kernel kernel, const SVM_Value_String flag, const SVM_Object_Level level)
| This function lowers a flag in a processor current state, from a string value. More...
SVM_FUNCTION void | svm_processor_reset_flag__string (const void *svm, const SVM_Kernel kernel, const SVM_String flag, const SVM_Object_Level level)
| This function lowers a flag in a processor current state, from a SVM_String. More...
SVM_FUNCTION void | svm_processor_reset_flag__raw (const void *svm, const SVM_Kernel kernel, const char *flag, const SVM_Object_Level level)
| This function lowers a flag in a processor current state, from a C nul-terminated string. More...

## Detailed Description

This module contains API functions to handle SVM processor flags.

## Function Documentation

## ◆ svm_processor_has_flag()

SVM_FUNCTION SVM_Boolean svm_processor_has_flag | ( | const void * | svm,
|  | const SVM_Kernel | kernel,
|  | const SVM_Value_String | flag
| ) |  |

This function detects whether a flag is raised in a processor current state, from a string value.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted processor is.
  [in] | flag | The flag name to check.

Returns
  TRUE if the flag is raised in the current processor state, FALSE otherwise.

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_processor_has_flag__raw()

SVM_FUNCTION SVM_Boolean svm_processor_has_flag__raw | ( | const void * | svm,
|  | const SVM_Kernel | kernel,
|  | const char * | flag
| ) |  |

This function detects whether a flag is raised in a processor current state, from a C nul-terminated string.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted processor is.
  [in] | flag | The flag name to check.

Returns
  TRUE if the flag is raised in the current processor state, FALSE otherwise.

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_processor_has_flag__string()

SVM_FUNCTION SVM_Boolean svm_processor_has_flag__string | ( | const void * | svm,
|  | const SVM_Kernel | kernel,
|  | const SVM_String | flag
| ) |  |

This function detects whether a flag is raised in a processor current state, from a SVM_String.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted processor is.
  [in] | flag | The flag name to check.

Returns
  TRUE if the flag is raised in the current processor state, FALSE otherwise.

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_processor_list_flag()

SVM_FUNCTION SVM_Value_String * svm_processor_list_flag | ( | const void * | svm,
|  | const SVM_Kernel | kernel
| ) |  |

This function lists all raised flags in a processor current state.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted processor is.

Returns
  A NULL terminated array of string values containing the flag names.

Note
  The returned array is a valid SVM variable: its scope can be changed if needed, and the pointer shall not be freed explicitely.

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_processor_reset_flag()

SVM_FUNCTION void svm_processor_reset_flag | ( | const void * | svm,
|  | const SVM_Kernel | kernel,
|  | const SVM_Value_String | flag,
|  | const SVM_Object_Level | level
| ) |  |

This function lowers a flag in a processor current state, from a string value.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted processor is.
  [in] | flag | The flag name to lower.
  [in] | level | The level of flag.

This API function does nothing if the flag was already lowered.

Note
  The level can be only LOCAL or CASCADE.

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_processor_reset_flag__raw()

SVM_FUNCTION void svm_processor_reset_flag__raw | ( | const void * | svm,
|  | const SVM_Kernel | kernel,
|  | const char * | flag,
|  | const SVM_Object_Level | level
| ) |  |

This function lowers a flag in a processor current state, from a C nul-terminated string.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted processor is.
  [in] | flag | The flag name to lower.
  [in] | level | The level of flag.

This API function does nothing if the flag was already lowered.

Note
  The level can be only LOCAL or CASCADE.

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_processor_reset_flag__string()

SVM_FUNCTION void svm_processor_reset_flag__string | ( | const void * | svm,
|  | const SVM_Kernel | kernel,
|  | const SVM_String | flag,
|  | const SVM_Object_Level | level
| ) |  |

This function lowers a flag in a processor current state, from a SVM_String.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted processor is.
  [in] | flag | The flag name to lower.
  [in] | level | The level of flag.

This API function does nothing if the flag was already lowered.

Note
  The level can be only LOCAL or CASCADE.

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_processor_set_flag()

SVM_FUNCTION void svm_processor_set_flag | ( | const void * | svm,
|  | const SVM_Kernel | kernel,
|  | const SVM_Value_String | flag,
|  | const SVM_Object_Level | level
| ) |  |

This function raises a flag in a processor current state, from a string value.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted processor is.
  [in] | flag | The flag name to raise.
  [in] | level | The level of flag.

This API function does nothing if the flag was already raised.

Note
  The level can be only LOCAL or CASCADE.

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_processor_set_flag__raw()

SVM_FUNCTION void svm_processor_set_flag__raw | ( | const void * | svm,
|  | const SVM_Kernel | kernel,
|  | const char * | flag,
|  | const SVM_Object_Level | level
| ) |  |

This function raises a flag in a processor current state, from a C nul-terminated string.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted processor is.
  [in] | flag | The flag name to raise.
  [in] | level | The level of flag.

This API function does nothing if the flag was already raised.

Note
  The level can be only LOCAL or CASCADE.

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_processor_set_flag__string()

SVM_FUNCTION void svm_processor_set_flag__string | ( | const void * | svm,
|  | const SVM_Kernel | kernel,
|  | const SVM_String | flag,
|  | const SVM_Object_Level | level
| ) |  |

This function raises a flag in a processor current state, from a SVM_String.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted processor is.
  [in] | flag | The flag name to raise.
  [in] | level | The level of flag.

This API function does nothing if the flag was already raised.

Note
  The level can be only LOCAL or CASCADE.

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