Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#1428 closed defect (fixed)

mw_uid misinterprets short timeouts

Reported by: Allan Hessenflow Owned by: Joel Sherrill
Priority: normal Milestone: 4.10
Component: score Version: 4.10
Severity: normal Keywords:
Cc: gedare@… Blocked By:
Blocking:

Description

If uid_read_message is called with a timeout less than one tick it will wait forever because it converts the timeout to a tick count of 0, which is RTEMS_NO_TIMEOUT. The attached patch corrects this by rounding the tick count up to 1 for the case where a timeout greater than 0 and less than 1 tick is requested. It also explicitly checks for a requested timeout of -1 to allow for RTEMS_NO_TIMEOUT.

ChangLog? entry:
2009-06-19 Allan Hessenflow <allanh@…>

  • libmisc/mw-fb/mw_uid.c: Correct short timeout handling.

Attachments (3)

mw_uid.patch (1.6 KB) - added by Allan Hessenflow on 06/19/09 at 23:57:33.
corrects uid_read_message short timeouts
mw_uid-788.patch (10.6 KB) - added by Daniel Ramirez on 12/19/13 at 00:29:37.
patch to fix short timeouts, add test to confirm fix
mw_uid-1428.patch (10.5 KB) - added by Daniel Ramirez on 12/19/13 at 04:04:57.
reformat patch, implement new test to confirm fix

Download all attachments as: .zip

Change History (5)

Changed on 06/19/09 at 23:57:33 by Allan Hessenflow

Attachment: mw_uid.patch added

corrects uid_read_message short timeouts

Changed on 12/19/13 at 00:29:37 by Daniel Ramirez

Attachment: mw_uid-788.patch added

patch to fix short timeouts, add test to confirm fix

Changed on 12/19/13 at 04:04:57 by Daniel Ramirez

Attachment: mw_uid-1428.patch added

reformat patch, implement new test to confirm fix

comment:1 Changed on 12/19/13 at 04:04:57 by Daniel Ramirez

attachments.isobsolete: 01, 1

comment:2 Changed on 01/09/14 at 14:11:44 by Gedare Bloom

Resolution: fixed
Status: newclosed, gedare@rtems.org

Committed with modifications to copyright info. Thanks, close if OK.

Note: See TracTickets for help on using tickets.