RTEMS | cpukit/shell: Account for tick rate in timeouts (!114)

Kinsey Moore (@opticron) gitlab at rtems.org
Fri Jul 12 12:38:05 UTC 2024




Kinsey Moore commented on a discussion on cpukit/libmisc/shell/shell.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/114#note_109110

 >  /*
 >   * Wait for the string to return or timeout.
 >   */
 > -static bool rtems_shell_term_wait_for(const int fd, const char* str, const int timeout)
 > +static bool rtems_shell_term_wait_for(const int fd,
 > +                                      const char* str,
 > +                                      const int timeout_ms)
 >  {
 > -  int msec = timeout;
 > +  const int tick_count_max = timeout_ms * 1000 / rtems_configuration_get_microseconds_per_tick();

Sounds appropriate, I'll make sure the timeout is at minimum 1 tick.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/114#note_109110
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240712/5bfc067e/attachment-0001.htm>


More information about the bugs mailing list