picotm
0.8.0
|
Public interfaces of picotm's libc module. More...
#include <picotm/compiler.h>
Functions | |
PICOTM_NOTHROW void | picotm_libc_set_error_recovery (enum picotm_libc_error_recovery recovery) |
PICOTM_NOTHROW enum picotm_libc_error_recovery | picotm_libc_get_error_recovery (void) |
PICOTM_NOTHROW void | picotm_libc_save_errno (void) |
PICOTM_NOTHROW void | picotm_libc_set_file_type_cc_mode (enum picotm_libc_file_type file_type, enum picotm_libc_cc_mode cc_mode) |
PICOTM_NOTHROW enum picotm_libc_cc_mode | picotm_libc_get_file_type_cc_mode (enum picotm_libc_file_type file_type) |
enum picotm_libc_cc_mode |
The error-recovery strategy for system calls.
Each module detects errors and initiates recovery. Sometimes reported errors are not failures of the component, but expected corner cases. For example 'read()' on non-blocking file descriptors signals EAGAIN
if there's no data available.
The libc modules has to distiguish such cases from actual errors to decide when to initiate recovery. enum picotm_libc_error_recovery
is a list of possible strategies.
It is recommended to use PICOTM_LIBC_ERROR_RECOVERY_AUTO
.
Enumerator | |
---|---|
PICOTM_LIBC_ERROR_RECOVERY_AUTO | Use heuristics to decide which errors to recover from. This is the default. |
PICOTM_LIBC_ERROR_RECOVERY_FULL | Recover from all errors. |
PICOTM_NOTHROW enum picotm_libc_error_recovery picotm_libc_get_error_recovery | ( | void | ) |
Returns the strategy for deciding when to recover from errors.
PICOTM_NOTHROW enum picotm_libc_cc_mode picotm_libc_get_file_type_cc_mode | ( | enum picotm_libc_file_type | file_type | ) |
Returns the currently preferred mode of concurrency control for I/O on a specific file type.
file_type | The file type to get the CC mode from. |
PICOTM_NOTHROW void picotm_libc_save_errno | ( | void | ) |
Saves the value of 'errno' during a transaction. Module authors should call this function before invoking a function that might modify errno's value.
PICOTM_NOTHROW void picotm_libc_set_error_recovery | ( | enum picotm_libc_error_recovery | recovery | ) |
Sets the strategy for deciding when to recover from errors.
recovery | The error-recovering strategy. |
PICOTM_NOTHROW void picotm_libc_set_file_type_cc_mode | ( | enum picotm_libc_file_type | file_type, |
enum picotm_libc_cc_mode | cc_mode | ||
) |
Sets the preferred mode of concurrency control for I/O on a specific file type.
file_type | The file type to set the CC mode for. |
cc_mode | The CC mode. |