Simple Virtual Machine
A simple but flexible virtual machine
|
This module contains API functions to handle SVM process ownership. More...
Functions | |
SVM_FUNCTION SVM_Process_Lock | svm_process_ownership_lock (const void *svm, const SVM_Process process) |
This function locks a process from the current process. More... | |
SVM_FUNCTION SVM_Process_Lock | svm_process_ownership_lock_critical (const void *svm) |
This function locks all other processes. More... | |
SVM_FUNCTION SVM_Boolean | svm_process_ownership_check (const void *svm, const SVM_Process process) |
This function checks whether the current process owns another process. More... | |
SVM_FUNCTION SVM_Boolean | svm_process_ownership_get_local (const void *svm, const SVM_Process process) |
This function locally takes ownership over another process. More... | |
This module contains API functions to handle SVM process ownership.
SVM_FUNCTION SVM_Boolean svm_process_ownership_check | ( | const void * | svm, |
const SVM_Process | process | ||
) |
This function checks whether the current process owns another process.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | process | The process ownership to check. |
The current process owns another process when:
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
SVM_FUNCTION SVM_Boolean svm_process_ownership_get_local | ( | const void * | svm, |
const SVM_Process | process | ||
) |
This function locally takes ownership over another process.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | process | The process ownership to take locally. |
The current process takes the ownership of the process until the end of the plugin callback.
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
FAILURE | interruption when this API function is called outside a waiting instruction. |
SVM_FUNCTION SVM_Process_Lock svm_process_ownership_lock | ( | const void * | svm, |
const SVM_Process | process | ||
) |
This function locks a process from the current process.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | process | The process to lock. |
This function waits until the lock is acquired by the current process, unless an invalid lock attempt is performed.
The returned lock is a recursive lock: A lock attempt on a process already locked by the current process is accepted. All locks on the remote process have to be released to unlock the process.
A lock will never be acquired on:
Usage example:
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
FAILURE | interruption when this API function is called outside a waiting instruction. |
SVM_FUNCTION SVM_Process_Lock svm_process_ownership_lock_critical | ( | const void * | svm | ) |
This function locks all other processes.
[in] | svm | The SVM pointer passed as first argument of the callback function. |
This function locks all other processes for critical execution of code.
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
FAILURE | interruption when this API function is called outside a system waiting instruction. |