This module contains API functions to handle SVM process interruption notifications.
More...
This module contains API functions to handle SVM process interruption notifications.
◆ svm_process_interruptionnotification_disable()
This function changes the process behavior on interruption event.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | process | The process allowing to be notified about interruption events. |
The process will ignore interruption event notifications. On interruption event reception, any blocking syscall will continue its execution.
- Warning
- This feature needs to be activated at SVM compilation time (Please refer to the configure –enable-linux-extensions option) and may not work.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
FAILURE | interruption when the process is not ours or is not a process locked by ours. |
FAILURE | interruption when this API function is called outside a waiting instruction. |
- See also
- svm_process_ownership_lock
-
svm_process_get_current
◆ svm_process_interruptionnotification_enable()
This function changes the process behavior on interruption event.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | process | The process allowing to be notified about interruption events. |
The process will accept notification on hardware interruptions and scheduling events like suspension, termination and lock. On interruption event, the process will receive a technical signal associated to an empty handler to unlock execution from blocking syscalls. This signal is not related to the eventual hardware interruption signal triggering this notification.
- Note
- The interruption notifications are received even if no hardware interruption handlers are defined for the received hardware interruptions.
- Warning
- This feature needs to be activated at SVM compilation time (Please refer to the configure –enable-linux-extensions option) and may not work.
Usage example:
char buffer[1024];
ssize_t s = read(fd,buffer,1024);
if(s<0)
{
if(errno==EINTR)
{
}
}
SVM_FUNCTION SVM_Process svm_process_get_current(const void *svm)
This function retrieves the current process.
SVM_FUNCTION void svm_process_interruptionnotification_disable(const void *svm, const SVM_Process process)
This function changes the process behavior on interruption event.
SVM_FUNCTION void svm_process_interruptionnotification_enable(const void *svm, const SVM_Process process)
This function changes the process behavior on interruption event.
SVM_FUNCTION SVM_Value_String svm_value_string_new__buffer(const void *svm, const char *string, const SVM_Size size)
This function creates a string value the SVM can store in its memories from a memory buffer.
SVM_FUNCTION SVM_Value_String svm_value_string_new_null(const void *svm)
This function creates a string value the SVM can store in its memories without a value.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
FAILURE | interruption when the process is not ours or is not a process locked by ours. |
FAILURE | interruption when this API function is called outside a waiting instruction. |
- See also
- svm_process_ownership_lock
-
svm_process_get_current
◆ svm_process_interruptionnotification_send()
This function sends an interruption notification to a process.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | process | The process to notify. |
The process will be notified only if it accepts interruption notifications.
- Warning
- This feature needs to be activated at SVM compilation time (Please refer to the configure –enable-linux-extensions option) and may not work.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
- See also
- svm_process_interruptionnotification_enable
-
svm_process_interruptionnotification_wait
◆ svm_process_interruptionnotification_wait()
SVM_FUNCTION void svm_process_interruptionnotification_wait |
( |
const void * |
svm | ) |
|
This function waits until the current process receives an interruption notification.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
To distinguish between an interruption from the scheduler or an hardware interruption, use the svm_processor_is_hardwareinterrupted API function.
- Note
- The API function temporarly enables the interruption notifications.
- Warning
- This feature needs to be activated at SVM compilation time (Please refer to the configure –enable-linux-extensions option) and may not work.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
FAILURE | interruption when called outside a process. |
FAILURE | interruption when this API function is called outside a waiting instruction. |
- See also
- svm_processor_is_hardwareinterrupted