Skip to content
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

FIX #1248, add os-impl-no-select.c for RTEMS #1250

Merged
merged 1 commit into from May 19, 2022
Merged

FIX #1248, add os-impl-no-select.c for RTEMS #1250

merged 1 commit into from May 19, 2022

Conversation

ghost
Copy link

@ghost ghost commented Apr 25, 2022

Checklist (Please check before submitting)

Describe the contribution

Implements os-impl-no-select.c for RTEMS or any other OS that has a configuration without select.
Currently only used for RTEMS when the network stack is disabled in the OSAL. On RTEMS the select call only works with network file descriptors.
In current RTEMS 4.11 and 5 builds, when the OSAL_CONFIG_INCLUDE_NETWORK option is false, the select call will still be included even though it cannot be used. The does not fail because the select call is still available in the RTEMS libraries.

If you build RTEMS 4.11 or 5 without the default network stack, the select call will not be included in the RTEMS libraries, causing the OSAL build to fail. In addition, RTEMS 6 removes the legacy network stack, so a default OS build will cause the OSAL build to fail.

By selecting os-impl-no-select.c when the OSAL_CONFIG_INCLUDE_NETWORK option is false, the select call will be omitted, and it will build for RTEMS with and without the network stack.

Testing performed
Steps taken to test the contribution:
This was tested with RTEMS 4.11 and RTEMS 5 using the pc-rtems CI platform.
I ran all tests on 4.11 and 5 with OSAL_CONFIG_INCLUDE_NETWORK set to true and false. All tests pass, but I did notice that the OSAL module unload test did not pass on RTEMS 4.11 - I don't think this test is related.
This is also being used on LEON3/RTEMS 5.1 for GTOSat.

Expected behavior changes
A clear and concise description of how this contribution will change behavior and level of impact.
When building the cFS with the OSAL_CONFIG_INCLUDE_NETWORK to false for RTEMS only (currently), the OS_Select* calls will return OS_ERR_NOT_IMPLEMENTED. This is probably safer, since the underlying select call should only be used with network sockets/file descriptors anyway.

System(s) tested on

  • Build system: Docker containers for RTEMS 4.11 and 5 cFS CI tests
  • Target OS/cFS Platform: RTEMS 4.11/x86 with cFS pc-rtems platform, and RTEMS 5/x86 with cFS pc-rtems platform
  • This patch has also been in use for GTOSat on a LEON3/RTEMS 5.1 platform for a year.

Contributor Info - All information REQUIRED for consideration of pull request
Alan Cudmore, NASA GSFC/582.0

@ghost ghost added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label Apr 25, 2022
@ghost ghost requested a review from jphickey April 27, 2022 13:26
@astrogeco
Copy link
Contributor

CCB:2022-04-27 APPROVED

@astrogeco astrogeco added CCB:Approved Indicates code review and approval by community CCB RTEMS and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels Apr 27, 2022
astrogeco added a commit to nasa/cFS that referenced this pull request May 2, 2022
astrogeco added a commit to nasa/cFS that referenced this pull request May 2, 2022
astrogeco added a commit to astrogeco/cFS that referenced this pull request May 4, 2022
astrogeco added a commit to nasa/cFS that referenced this pull request May 18, 2022
Combines

nasa/cFE#2098, v7.0.0-rc4+dev127
nasa/osal#1251, v6.0.0-rc4+dev74
nasa/PSP#343, v1.6.0-rc4+dev34

**cFE**

nasa/cFE#2078, Adds truncation warning suppression flags

nasa/cFE#2094, Doc deploy from local workflow on main-branch push

nasa/cFE#2088, Add support for fractional seconds in epoch

nasa/cFE#2044, Remove redundant word in App Developers Guide

nasa/cFE#2099,  UT updates for alternate time configuration

**RTEMS 6 Support

nasa/cFE#2097, update rtems toolchain files

nasa/osal#1250, add os-impl-no-select.c for RTEMS

nasa/PSP#339, Update RTEMS CMake Platform File

**PSP**

nasa/PSP#341, Add cpu affinity example

**Fix Broken CodeQL Workflow Reference**

nasa/PSP#337

nasa/osal#1249

nasa/sample_lib#82

nasa/sample_app#173

nasa/sch_lab#113

nasa/ci_lab#109

nasa/to_lab#120

nasa/elf2cfetbl#110

nasa/tblCRCTool#68

nasa/cFS-GroundSystem#214

Co-authored-by: Justin Figueroa <[email protected]>
Co-authored-by: Jacob Hageman <[email protected]>
Co-authored-by: Jonathan Branderburg <[email protected]>
Co-authored-by: Alan Cudmore <[email protected]>
Co-authored-by: Hugo Valente <[email protected]>
astrogeco added a commit to nasa/cFS that referenced this pull request May 18, 2022
Combines

nasa/cFE#2098, v7.0.0-rc4+dev127
nasa/osal#1251, v6.0.0-rc4+dev74
nasa/PSP#343, v1.6.0-rc4+dev34

**cFE**

nasa/cFE#2078, Adds truncation warning suppression flags

nasa/cFE#2094, Doc deploy from local workflow on main-branch push

nasa/cFE#2088, Add support for fractional seconds in epoch

nasa/cFE#2044, Remove redundant word in App Developers Guide

nasa/cFE#2099,  UT updates for alternate time configuration

**RTEMS 6 Support

nasa/cFE#2097, update rtems toolchain files

nasa/osal#1250, add os-impl-no-select.c for RTEMS

nasa/PSP#339, Update RTEMS CMake Platform File

**PSP**

nasa/PSP#341, Add cpu affinity example

**Fix Broken CodeQL Workflow Reference**

nasa/PSP#337

nasa/osal#1249

nasa/sample_lib#82

nasa/sample_app#173

nasa/sch_lab#113

nasa/ci_lab#109

nasa/to_lab#120

nasa/elf2cfetbl#110

nasa/tblCRCTool#68

nasa/cFS-GroundSystem#214

Co-authored-by: Justin Figueroa <[email protected]>
Co-authored-by: Jacob Hageman <[email protected]>
Co-authored-by: Jonathan Branderburg <[email protected]>
Co-authored-by: Alan Cudmore <[email protected]>
Co-authored-by: Hugo Valente <[email protected]>
@astrogeco astrogeco merged commit 07a134f into nasa:main May 19, 2022
astrogeco added a commit to nasa/cFS that referenced this pull request May 19, 2022
Combines

nasa/cFE#2098, v7.0.0-rc4+dev127
nasa/osal#1251, v6.0.0-rc4+dev74
nasa/PSP#343, v1.6.0-rc4+dev34

**cFE**

nasa/cFE#2078, Adds truncation warning suppression flags

nasa/cFE#2094, Doc deploy from local workflow on main-branch push

nasa/cFE#2088, Add support for fractional seconds in epoch

nasa/cFE#2044, Remove redundant word in App Developers Guide

nasa/cFE#2099,  UT updates for alternate time configuration

**RTEMS 6 Support

nasa/cFE#2097, update rtems toolchain files

nasa/osal#1250, add os-impl-no-select.c for RTEMS

nasa/PSP#339, Update RTEMS CMake Platform File

**PSP**

nasa/PSP#341, Add cpu affinity example

**Fix Broken CodeQL Workflow Reference**

nasa/PSP#337

nasa/osal#1249

nasa/sample_lib#82

nasa/sample_app#173

nasa/sch_lab#113

nasa/ci_lab#109

nasa/to_lab#120

nasa/elf2cfetbl#110

nasa/tblCRCTool#68

nasa/cFS-GroundSystem#214

Co-authored-by: Justin Figueroa <[email protected]>
Co-authored-by: Jacob Hageman <[email protected]>
Co-authored-by: Jonathan Branderburg <[email protected]>
Co-authored-by: Alan Cudmore <[email protected]>
Co-authored-by: Hugo Valente <[email protected]>
@skliper skliper added this to the Draco milestone Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB draco-rc2 RTEMS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add os-impl-no-select.c for operating systems that do not have select (RTEMS 6 with network off)
3 participants