Simple Virtual Machine
A simple but flexible virtual machine
|
This module contains API functions to handle SVM processor interruption. More...
Functions | |
SVM_FUNCTION void | svm_processor_interruptionhandler_set_local (const void *svm, const SVM_Kernel kernel, const SVM_Value_Interruption interruption, const SVM_Address address, const SVM_Object_Level level) |
This function sets a local interruption handler on a processor. More... | |
SVM_FUNCTION void | svm_processor_interruptionhandler_set_global (const void *svm, const SVM_Kernel kernel, const SVM_Value_Interruption interruption, const SVM_Value_Symbol symbol, const SVM_Object_Level level) |
This function sets a global interruption handler on a processor. More... | |
SVM_FUNCTION void | svm_processor_interruptionhandler_reset (const void *svm, const SVM_Kernel kernel, const SVM_Value_Interruption interruption, const SVM_Object_Level level) |
This function removes an interruption handler from a processor. More... | |
SVM_FUNCTION SVM_Boolean | svm_processor_interruptionhandler_has (const void *svm, const SVM_Kernel kernel, const SVM_Value_Interruption interruption, const SVM_Object_Level level) |
This function checks whether an interruption handler exists in a processor. More... | |
SVM_FUNCTION SVM_Value_Symbol | svm_processor_interruptionhandler_get (const void *svm, const SVM_Kernel kernel, const SVM_Value_Interruption interruption, const SVM_Object_Level level) |
This function extracts an interruption handler from a processor. More... | |
SVM_FUNCTION void | svm_processor_add_interruption (const void *svm, const SVM_Kernel kernel, const SVM_Value_Interruption interruption) |
This function interrupts a processor. More... | |
SVM_FUNCTION void | svm_processor_clear_interruption (const void *svm, const SVM_Kernel kernel) |
This function clears waiting interruptions of a processor. More... | |
SVM_FUNCTION SVM_Value_Interruption * | svm_processor_list_interruption (const void *svm, const SVM_Kernel kernel) |
This function retrieves waiting interruptions of a processor. More... | |
SVM_FUNCTION void | svm_processor_hold_interruption (const void *svm, const SVM_Kernel kernel) |
This function disables waiting interruptions handling of a processor. More... | |
SVM_FUNCTION void | svm_processor_release_interruption (const void *svm, const SVM_Kernel kernel) |
This function enables waiting interruptions handling of a processor. More... | |
SVM_FUNCTION SVM_Boolean | svm_processor_is_hardwareinterrupted (const void *svm, const SVM_Kernel kernel) |
This function detects whether an hardware interruption has been received by a processor. More... | |
SVM_FUNCTION SVM_Value_Interruption | svm_processor_get_currentinterruption (const void *svm, const SVM_Kernel kernel) |
This function extracts the current interruption of a processor. More... | |
SVM_FUNCTION void | svm_processor_set_currentinterruption (const void *svm, const SVM_Kernel kernel, const SVM_Value_Interruption interruption) |
This function modifies the current interruption of a processor. More... | |
This module contains API functions to handle SVM processor interruption.
SVM_FUNCTION void svm_processor_add_interruption | ( | const void * | svm, |
const SVM_Kernel | kernel, | ||
const SVM_Value_Interruption | interruption | ||
) |
This function interrupts a processor.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | kernel | The kernel in which the targeted processor is. |
[in] | interruption | The interruption to append in the interruption list of the processor. |
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. |
SVM_FUNCTION void svm_processor_clear_interruption | ( | const void * | svm, |
const SVM_Kernel | kernel | ||
) |
This function clears waiting interruptions of a processor.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | kernel | The kernel in which the targeted processor is. |
This function removes all waiting interruptions of a processor.
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. |
SVM_FUNCTION SVM_Value_Interruption svm_processor_get_currentinterruption | ( | const void * | svm, |
const SVM_Kernel | kernel | ||
) |
This function extracts the current interruption of a processor.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | kernel | The kernel in which the targeted processor is. |
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. |
SVM_FUNCTION void svm_processor_hold_interruption | ( | const void * | svm, |
const SVM_Kernel | kernel | ||
) |
This function disables waiting interruptions handling of a processor.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | kernel | The kernel in which the targeted processor is. |
This function disables waiting interruption handling by the processor. Waiting interruptions will be put on hold by the processor and will accumulate all raised interruptions.
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. |
SVM_FUNCTION SVM_Value_Symbol svm_processor_interruptionhandler_get | ( | const void * | svm, |
const SVM_Kernel | kernel, | ||
const SVM_Value_Interruption | interruption, | ||
const SVM_Object_Level | level | ||
) |
This function extracts an interruption handler from a processor.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | kernel | The kernel in which the targeted processor is. |
[in] | interruption | The interruption for which the handler has to be extracted. |
[in] | level | The level of interruption. |
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. |
PROCESSOR | interruption when the interruption handler does not exist. |
SVM_FUNCTION SVM_Boolean svm_processor_interruptionhandler_has | ( | const void * | svm, |
const SVM_Kernel | kernel, | ||
const SVM_Value_Interruption | interruption, | ||
const SVM_Object_Level | level | ||
) |
This function checks whether an interruption handler exists in a processor.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | kernel | The kernel in which the targeted processor is. |
[in] | interruption | The interruption for which the handler has to be extracted. |
[in] | level | The level of interruption. |
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. |
SVM_FUNCTION void svm_processor_interruptionhandler_reset | ( | const void * | svm, |
const SVM_Kernel | kernel, | ||
const SVM_Value_Interruption | interruption, | ||
const SVM_Object_Level | level | ||
) |
This function removes an interruption handler from a processor.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | kernel | The kernel in which the targeted processor is. |
[in] | interruption | The interruption for which the handler has to be reset. |
[in] | level | The level of interruption. |
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. |
SVM_FUNCTION void svm_processor_interruptionhandler_set_global | ( | const void * | svm, |
const SVM_Kernel | kernel, | ||
const SVM_Value_Interruption | interruption, | ||
const SVM_Value_Symbol | symbol, | ||
const SVM_Object_Level | level | ||
) |
This function sets a global interruption handler on a processor.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | kernel | The kernel in which the targeted processor is. |
[in] | interruption | The interruption for which the handler has to be set. |
[in] | symbol | The global address of the handler. |
[in] | level | The level of interruption. |
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. |
SVM_FUNCTION void svm_processor_interruptionhandler_set_local | ( | const void * | svm, |
const SVM_Kernel | kernel, | ||
const SVM_Value_Interruption | interruption, | ||
const SVM_Address | address, | ||
const SVM_Object_Level | level | ||
) |
This function sets a local interruption handler on a processor.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | kernel | The kernel in which the targeted processor is. |
[in] | interruption | The interruption for which the handler has to be set. |
[in] | address | The local address of the handler. |
[in] | level | The level of interruption. |
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. |
SVM_FUNCTION SVM_Boolean svm_processor_is_hardwareinterrupted | ( | const void * | svm, |
const SVM_Kernel | kernel | ||
) |
This function detects whether an hardware interruption has been received by a processor.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | kernel | The kernel in which the targeted processor is. |
This API function can be useful to interrupt blocking instructions on a signal.
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. |
SVM_FUNCTION SVM_Value_Interruption * svm_processor_list_interruption | ( | const void * | svm, |
const SVM_Kernel | kernel | ||
) |
This function retrieves waiting interruptions of a processor.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | kernel | The kernel in which the targeted processor is. |
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. |
SVM_FUNCTION void svm_processor_release_interruption | ( | const void * | svm, |
const SVM_Kernel | kernel | ||
) |
This function enables waiting interruptions handling of a processor.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | kernel | The kernel in which the targeted processor is. |
This function enables waiting interruption handling by the processor. Waiting interruptions will be taken into account as soon as possible by the processor.
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. |
SVM_FUNCTION void svm_processor_set_currentinterruption | ( | const void * | svm, |
const SVM_Kernel | kernel, | ||
const SVM_Value_Interruption | interruption | ||
) |
This function modifies the current interruption of a processor.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | kernel | The kernel in which the targeted processor is. |
[in] | interruption | The new value of the current interruption. |
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. |