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

VxWorks timebase still registers signal with RTOS when sync function is not NULL #1087

Closed
jphickey opened this issue Jun 25, 2021 · 0 comments · Fixed by #1091 or #1098
Closed

VxWorks timebase still registers signal with RTOS when sync function is not NULL #1087

jphickey opened this issue Jun 25, 2021 · 0 comments · Fixed by #1091 or #1098
Assignees
Milestone

Comments

@jphickey
Copy link
Contributor

Describe the bug
When calling OS_TimeBaseCreate with the 3rd argument (external_sync) non-NULL, it is supposed to use the external sync function rather than an register an RTOS timer to implement the tick. However, the VxWorks implementation still tries to register the RTOS timer, which has a signal number of 0, so it fails in timer_create().

To Reproduce
Run timebase-api-test on VxWorks, observe failure:

[ PASS] 01.012 time-base-api-test.c:116 - OS_TimeBaseCreate(&time_base_id2, "TimeBaseB", NULL) (0) == OS_SUCCESS (0)
OS_VxWorks_RegisterTimer():248:timer_create() failed: errno=22
OS_TimeBaseCreate_Impl():507:Error during timer registration
[ FAIL] 01.013 time-base-api-test.c:117 - OS_TimeBaseCreate(&time_base_id, "TimeBaseC", UT_TimerSync) (-32) == OS_SUCCESS (0)

Expected behavior
Test should pass

System observed on:
MCP750, VxWorks 6.9

Additional context
VxWorks just needs to skip timer_create() and other RTOS timer configs when assigned_signal is 0.

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this Jun 25, 2021
@jphickey jphickey added the bug label Jun 25, 2021
jphickey added a commit to jphickey/osal that referenced this issue Jun 25, 2021
Skip the registration of a timer in VxWorks when the assigned_signal
is 0 (this indicates an external sync function is used).
jphickey added a commit to jphickey/osal that referenced this issue Jun 25, 2021
Skip the registration of a timer in VxWorks when the assigned_signal
is 0 (this indicates an external sync function is used).
@jphickey jphickey added the unit-test Tickets related to the OSAL unit testing (functional and/or coverage) label Jun 25, 2021
@skliper skliper removed the unit-test Tickets related to the OSAL unit testing (functional and/or coverage) label Jun 28, 2021
@skliper skliper added this to the 6.0.0 milestone Jun 28, 2021
astrogeco added a commit that referenced this issue Jul 2, 2021
Fix #1087, do not register RTOS timer for external sync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants