This module contains API functions to handle SVM access control instructions limit.
More...
This module contains API functions to handle SVM access control instructions limit.
◆ svm_accesscontrol_get_instructions()
This function retrieves the remaining instructions counter from a quota for a SVM code execution.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | access_control | The access control to check. |
- Returns
- The number of remaining instructions to execute.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
FAILURE | interruption when the access control has no instruction limit. |
- See also
- svm_accesscontrol_has_instructions
◆ svm_accesscontrol_has_instructions()
This function checks whether a quota for a SVM code execution contains a limit for instructions.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | access_control | The access control to check. |
- Returns
- TRUE when the access control has an instructions limit, FALSE otherwise.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
◆ svm_accesscontrol_set_instructions()
SVM_FUNCTION void svm_accesscontrol_set_instructions |
( |
const void * |
svm, |
|
|
SVM_AccessControl |
access_control, |
|
|
const unsigned long int |
instructions |
|
) |
| |
This function changes the remaining instructions counter within a quota for a SVM code execution.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | access_control | The access control to update. |
[in] | instructions | The number of remaining instructions to run. |
This function changes the number of remaining instructions on the access control:
- if the access control had no limit, a limit is set to the number of remaining instructions,
- the number of remaining instructions can not be increased, and the function will have no effect.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |