-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vxWorks adding few errnoLib related constants. #3780
Conversation
r? @JohnTitor rustbot has assigned @JohnTitor. Use |
fafae65
to
a7f3de0
Compare
rust-lang/rust#128751 makes use of |
I m unsure it s possible yet due to the uncertainty of its value unless a minimum vxworks release is supported. |
It may be worth specifying a minimum version, even if old, to make it obvious which APIs can be relied upon. If you are up for this, just make a PR to document some minimum version in https://github.com/rust-lang/rust/blob/60d146580c10036ce89e019422c6bc2fd9729b65/src/doc/rustc/src/platform-support/vxworks.md. Then we can ping a handful of people who have been involved in VxWorks to get their feedback. |
src/vxworks/mod.rs
Outdated
// errnoLib.h | ||
const taskErrorBase: ::c_int = 0x00030000; | ||
const semErrorBase: ::c_int = 0x00160000; | ||
const objErrorBase: ::c_int = 0x003d0000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not find these constants in errnoLib.h. Which VxWorks workbench did you use for reference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they do not exist, see they re not exposed it s only to serve as base for constants such as :
pub const S_taskLib_NAME_NOT_FOUND: ::c_int = taskErrorBase + 0x0065;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Can you change the comments. None of the constants are defined in errnoLib.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
a7f3de0
to
ad48151
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these defined somewhere else in your VxWorks reference?
src/vxworks/mod.rs
Outdated
// errnoLib.h | ||
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are defined in taskLibCommon.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I see I confused with vxWorks 6. fixing.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are defined in semLibCommon.h
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These in objLibCommon.h
ad48151
to
7a28fc7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now. Not sure Why CI tests failed. Maybe reshuffling the constants so that their indentation increases progressively may pass some more ci checks.
CI has some known problems. We're working on getting those sorted out (will need to do that before merge) |
Does that work now with the minimum version of 7? |
f248ae8
to
8472900
Compare
Yes. VX_TASK_NAME_LEN is now 31. |
it had been added in the last commit |
8472900
to
73a6a03
Compare
Not going to block on this since it is tier 3, but it may be worth adding a vxworks file in |
(backport <rust-lang#3780>) (cherry picked from commit 73a6a03)
(backport <rust-lang#3780>) (cherry picked from commit 73a6a03)
No description provided.