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 #1455, High-res timed stream ops #1456

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

jphickey
Copy link
Contributor

@jphickey jphickey commented Mar 6, 2024

Checklist (Please check before submitting)

Describe the contribution
Implement high-res timed operations for streams. This uses an absolute time via the OS_time_t value, which has a default resolution of 0.1usec but is configurable.

Fixes #1455

Testing performed
Full suite of coverage and functional tests

Expected behavior changes
New APIs added, does not change existing APIs

System(s) tested on
Debian

Additional context
N/A

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey force-pushed the fix-1455-hires-timedops branch 2 times, most recently from 4dfb405 to 5ad9c53 Compare May 20, 2024 19:59
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL-coding-standard found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@jphickey jphickey marked this pull request as ready for review May 20, 2024 20:37
@jphickey jphickey changed the title (Draft) Fix #1455, High-res timed stream ops Fix #1455, High-res timed stream ops May 20, 2024
@jphickey jphickey added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label May 20, 2024
Add API calls equivalent to existing calls that use an absolute timeout
as opposed to a relative timeout.  The absolute timeout can support
resolution of 0.1 usec in the default configuration.

Internally this primarily affects the underlying call to select().

Note that per the definition of select() in POSIX, it uses a
"struct timeval" which has a resolution of 1 usec.
@jphickey
Copy link
Contributor Author

Updated to expose the high-res API ("Abs" timeout variant) on the following additional OSAL calls:

  • OS_SelectSingleAbs()
  • OS_SelectMultipleAbs()
  • OS_SocketAccepAbst()
  • OS_SocketConnectAbs()

The existing (relative timeout) variant becomes a wrapper around the Abs timeout version above.

@dzbaker dzbaker added CCB:Approved Indicates code review and approval by community CCB and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels Jun 20, 2024
dzbaker added a commit that referenced this pull request Jul 2, 2024
dzbaker added a commit to nasa/cFS that referenced this pull request Jul 2, 2024
*Combines:*

cFE equuleus-rc1+dev137
osal equuleus-rc1+dev66
elf2cfetbl equuleus-rc1+dev56

**Includes:**

*cFS*
- #707
- #773

*cFE*
- nasa/cFE#2560
- nasa/cFE#2344
- nasa/cFE#2359
- nasa/cFE#2376
- nasa/cFE#2496
- nasa/cFE#2554
- nasa/cFE#2568
- nasa/cFE#2566

*osal*
- nasa/osal#1456
- nasa/osal#1465

*elf2cfetbl*
- nasa/elf2cfetbl#147
- nasa/elf2cfetbl#124
- nasa/elf2cfetbl#125
- nasa/elf2cfetbl#127

Co-authored by: Avi Weiss <[email protected]>
Co-authored by: Justin Figueroa <[email protected]>
Co-authored by: Joseph Hickey <[email protected]>
Co-authored by: Jacob Hageman <[email protected]>
Co-authored by: Anh Van <[email protected]>
@dzbaker dzbaker mentioned this pull request Jul 2, 2024
2 tasks
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

dzbaker added a commit to nasa/cFS that referenced this pull request Jul 2, 2024
*Combines:*

cFE equuleus-rc1+dev137
osal equuleus-rc1+dev66
elf2cfetbl equuleus-rc1+dev56

**Includes:**

*cFS*
- #707
- #773

*cFE*
- nasa/cFE#2560
- nasa/cFE#2344
- nasa/cFE#2359
- nasa/cFE#2376
- nasa/cFE#2496
- nasa/cFE#2554
- nasa/cFE#2568
- nasa/cFE#2566

*osal*
- nasa/osal#1456
- nasa/osal#1465

*elf2cfetbl*
- nasa/elf2cfetbl#147
- nasa/elf2cfetbl#124
- nasa/elf2cfetbl#125
- nasa/elf2cfetbl#127

Co-authored by: Avi Weiss <[email protected]>
Co-authored by: Justin Figueroa <[email protected]>
Co-authored by: Joseph Hickey <[email protected]>
Co-authored by: Jacob Hageman <[email protected]>
Co-authored by: Anh Van <[email protected]>
@dzbaker dzbaker merged commit 5923fcf into nasa:main Jul 2, 2024
18 of 19 checks passed
dzbaker added a commit to nasa/cFS that referenced this pull request Jul 2, 2024
*Combines:*

cFE equuleus-rc1+dev137
osal equuleus-rc1+dev66
elf2cfetbl equuleus-rc1+dev56

**Includes:**

*cFS*
- #707
- #773

*cFE*
- nasa/cFE#2560
- nasa/cFE#2344
- nasa/cFE#2359
- nasa/cFE#2376
- nasa/cFE#2496
- nasa/cFE#2554
- nasa/cFE#2568
- nasa/cFE#2566

*osal*
- nasa/osal#1456
- nasa/osal#1465

*elf2cfetbl*
- nasa/elf2cfetbl#147
- nasa/elf2cfetbl#124
- nasa/elf2cfetbl#125
- nasa/elf2cfetbl#127

Co-authored by: Avi Weiss <[email protected]>
Co-authored by: Justin Figueroa <[email protected]>
Co-authored by: Joseph Hickey <[email protected]>
Co-authored by: Jacob Hageman <[email protected]>
Co-authored by: Anh Van <[email protected]>
dzbaker added a commit to nasa/cFS that referenced this pull request Jul 15, 2024
*Combines:*

cFE equuleus-rc1+dev167
osal equuleus-rc1+dev81

**Includes:**

*cFE*
- nasa/cFE#2560

*osal*
- nasa/osal#1456
- nasa/osal#1465

Co-authored by: Anh Van <[email protected]>
Co-authored by: Dan Knutsen <[email protected]>
@dzbaker dzbaker mentioned this pull request Jul 15, 2024
2 tasks
dzbaker added a commit to nasa/cFS that referenced this pull request Jul 15, 2024
*Combines:*

cFE equuleus-rc1+dev167
osal equuleus-rc1+dev81

**Includes:**

*cFE*
- nasa/cFE#2560

*osal*
- nasa/osal#1456
- nasa/osal#1465

Co-authored by: Anh Van <[email protected]>
Co-authored by: Dan Knutsen <[email protected]>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update OS_TimedRead and OS_TimedWrite to support sub-millisecond timeout resolution
2 participants