You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In the RTEMS implementation if OS_Milli2Ticks fails (over max int) it'll wait 10 ticks, although comment is somewhat misleading since 10 isn't a minimum... passing in 0 would also cause no wait:
/* msecs rounded to the closest system tick count */
intsys_ticks;
/* Convert to ticks if possible */
if (OS_Milli2Ticks(milli_second, &sys_ticks) !=OS_SUCCESS)
{
returnOS_ERROR;
}
/* if successful, the execution of task will pend here until delay finishes */
if (taskDelay(sys_ticks) !=OK)
{
returnOS_ERROR;
}
returnOS_SUCCESS;
} /* end OS_TaskDelay_Impl */
POSIX just converts to timespec and uses clock_nanosleep.
Describe the solution you'd like
Technically OS_TaskDelay should be functionally tested with a 0 and max value input, not that I'd ever want to wait that long (although RTEMS and VxWorks should return quickly due to the OS_Milli2Ticks error response). It would be nice if behavior was consistent, although for 0 it looks to me like none of them would yield. If we really want a yield in all cases then it needs an update.
Describe alternatives you've considered
None.
Additional context
From functional test scrub.
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
In the RTEMS implementation if
OS_Milli2Ticks
fails (over max int) it'll wait 10 ticks, although comment is somewhat misleading since 10 isn't a minimum... passing in 0 would also cause no wait:osal/src/os/rtems/src/os-impl-tasks.c
Lines 212 to 237 in cb95655
VxWorks doesn't wait a minimum if
OS_Milli2Ticks
fails, just returns an error:osal/src/os/vxworks/src/os-impl-tasks.c
Lines 325 to 343 in cb95655
POSIX just converts to
timespec
and usesclock_nanosleep
.Describe the solution you'd like
Technically
OS_TaskDelay
should be functionally tested with a 0 and max value input, not that I'd ever want to wait that long (although RTEMS and VxWorks should return quickly due to the OS_Milli2Ticks error response). It would be nice if behavior was consistent, although for 0 it looks to me like none of them would yield. If we really want a yield in all cases then it needs an update.Describe alternatives you've considered
None.
Additional context
From functional test scrub.
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: