errno
errno 提供OSAL (Operating System Abstraction Layer) 内部错误码到POSIX标准errno值的映射功能,使上层应用可使用标准errno机制获取错误信息。
头文件清单
#include "include/osal/osal_errno.h"
接口清单
Functions
osal_map_errno
map_errno osal map errno osal_map_errno
int osal_map_errno(int err)
头文件清单
#include "include/osal/osal_errno.h"
功能说明
- 将OSAL内部错误码转换为POSIX标准errno值,使上层应用可使用标准errno机制获取错误信息
- 用于OSAL层与POSIX层之间的错误码桥接,确保跨操作系统平台的错误码语义一致性
- 调用后不修改原错误码,仅返回映射后的POSIX errno值
入参
返回值
Macros
OSAL_EINTR
osal eintr osal_eintr
#define OSAL_EINTR (-4) /* Interrupted system call */
OSAL_EINVAL
osal einval osal_einval
#define OSAL_EINVAL (-22) /* Interrupted system call */
OSAL_ETIME
osal etime osal_etime
#define OSAL_ETIME (-62) /* Timer expired */
OSAL_EOVERFLOW
osal eoverflow osal_eoverflow
#define OSAL_EOVERFLOW (-75) /* Value too large for defined data type */
OSAL_ERRNO_QUEUE_ISFULL
errno_queue_isfull osal errno queue isfull osal_errno_queue_isfull
#define OSAL_ERRNO_QUEUE_ISFULL 0x02000616
OSAL_ERRNO_NO_MEMORY
errno_no_memory osal errno no memory osal_errno_no_memory
#define OSAL_ERRNO_NO_MEMORY 0x02000903
OSAL_ERRNO_QUEUE_ISEMPTY
errno_queue_isempty osal errno queue isempty osal_errno_queue_isempty
#define OSAL_ERRNO_QUEUE_ISEMPTY 0x0200061d
OSAL_ERRNO_TSK_PRIOR_ERROR
errno_tsk_prior_error osal errno tsk prior error osal_errno_tsk_prior_error
#define OSAL_ERRNO_TSK_PRIOR_ERROR 0x02000203