From fafae659792a6052fb3574ed9b34cc070ac34160 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 21 Jul 2024 16:45:03 +0100 Subject: [PATCH] vxWorks adding few errnoLib related constants. --- src/vxworks/mod.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/vxworks/mod.rs b/src/vxworks/mod.rs index 7da4ec05bd828..d51c3209612a3 100644 --- a/src/vxworks/mod.rs +++ b/src/vxworks/mod.rs @@ -613,6 +613,7 @@ pub const PTHREAD_STACK_MIN: usize = 4096; pub const _PTHREAD_SHARED_SEM_NAME_MAX: usize = 30; // ERRNO STUFF +pub const ERROR: ::c_int = -1; pub const OK: ::c_int = 0; pub const EPERM: ::c_int = 1; /* Not owner */ pub const ENOENT: ::c_int = 2; /* No such file or directory */ @@ -720,6 +721,27 @@ pub const S_nfsLib_NFSERR_SERVERFAULT: ::c_int = EIO; pub const S_nfsLib_NFSERR_BADTYPE: ::c_int = M_nfsStat | nfsstat::NFSERR_BADTYPE as ::c_int; pub const S_nfsLib_NFSERR_JUKEBOX: ::c_int = M_nfsStat | nfsstat::NFSERR_JUKEBOX as ::c_int; +// errnoLib.h +const taskErrorBase: ::c_int = 0x00030000; +const semErrorBase: ::c_int = 0x00160000; +const objErrorBase: ::c_int = 0x003d0000; + +pub const S_taskLib_NAME_NOT_FOUND: ::c_int = taskErrorBase + 0x0065; +pub const S_taskLib_TASK_HOOK_TABLE_FULL: ::c_int = taskErrorBase + 0x0066; +pub const S_taskLib_TASK_HOOK_NOT_FOUND: ::c_int = taskErrorBase + 0x0067; +pub const S_taskLib_ILLEGAL_PRIORITY: ::c_int = taskErrorBase + 0x0068; + +pub const S_semLib_INVALID_STATE: ::c_int = semErrorBase + 0x0065; +pub const S_semLib_INVALID_OPTION: ::c_int = semErrorBase + 0x0066; +pub const S_semLib_INVALID_QUEUE_TYPE: ::c_int = semErrorBase + 0x0067; +pub const S_semLib_INVALID_OPERATION: ::c_int = semErrorBase + 0x0068; + +pub const S_objLib_OBJ_ID_ERROR: ::c_int = objErrorBase + 0x0001; +pub const S_objLib_OBJ_UNAVAILABLE: ::c_int = objErrorBase + 0x0002; +pub const S_objLib_OBJ_DELETED: ::c_int = objErrorBase + 0x0003; +pub const S_objLib_OBJ_TIMEOUT: ::c_int = objErrorBase + 0x0004; +pub const S_objLib_OBJ_NO_METHOD: ::c_int = objErrorBase + 0x0005; + // in.h pub const IPPROTO_IP: ::c_int = 0; pub const IPPROTO_IPV6: ::c_int = 41;