Simple Virtual Machine
A simple but flexible virtual machine
SVM processor flags

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_Stringsvm_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]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted processor is.
[in]flagThe flag name to check.
Returns
TRUE if the flag is raised in the current processor state, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption 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]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted processor is.
[in]flagThe flag name to check.
Returns
TRUE if the flag is raised in the current processor state, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption 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]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted processor is.
[in]flagThe flag name to check.
Returns
TRUE if the flag is raised in the current processor state, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption 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]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe 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
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption 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]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted processor is.
[in]flagThe flag name to lower.
[in]levelThe level of flag.

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

Note
The level can be only LOCAL or CASCADE.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption 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]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted processor is.
[in]flagThe flag name to lower.
[in]levelThe level of flag.

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

Note
The level can be only LOCAL or CASCADE.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption 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]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted processor is.
[in]flagThe flag name to lower.
[in]levelThe level of flag.

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

Note
The level can be only LOCAL or CASCADE.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption 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]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted processor is.
[in]flagThe flag name to raise.
[in]levelThe level of flag.

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

Note
The level can be only LOCAL or CASCADE.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption 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]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted processor is.
[in]flagThe flag name to raise.
[in]levelThe level of flag.

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

Note
The level can be only LOCAL or CASCADE.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption 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]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted processor is.
[in]flagThe flag name to raise.
[in]levelThe level of flag.

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

Note
The level can be only LOCAL or CASCADE.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption 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