#4406 closed enhancement (fixed)

rtems: Constify rtems_task_wake_when()

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 6.1
Component: rtems Version: 6
Severity: normal Keywords: qualification
Cc: Blocked By:
Blocking:

Description

The time of day pointer can be made constant in this directive.

Change History (5)

comment:1 Changed on 05/12/21 at 19:27:04 by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In 523867d/rtems:

rtems: Constify rtems_task_wake_when()

Add a parameter to _TOD_Validate() to disable the validation of the
ticks member.

There are two reasons for this change. Firstly, in
rtems_task_wake_when() was a double check for time_buffer == NULL (one
in rtems_task_wake_when() and one in _TOD_Validate()). Secondly, the
ticks member is ignored by rtems_task_wake_when(). This was done with a
write of zero to the ticks member and thus a modification of the
user-provided structure. Now the structure is no longer modified.
Using a mask parameter is quite efficient. You just have to load an
immediate value and there are no additional branches in _TOD_Validate().

Close #4406.

comment:2 Changed on 05/12/21 at 19:32:26 by Sebastian Huber <sebastian.huber@…>

In 2588e8b/rtems-docs:

c-user: Constify rtems_task_wake_when()

Update #4406.

comment:3 Changed on 05/14/21 at 06:10:25 by Sebastian Huber <sebastian.huber@…>

In 45a34953/rtems:

rtems: Add TOD_Ticks_validation

Replace defines with an enum.

Update #4406.

comment:4 Changed on 05/17/21 at 06:05:46 by Sebastian Huber <sebastian.huber@…>

In 98cb84e/rtems:

arm/altera-cyclone-v: Fix compile error

Update #4406.

comment:5 Changed on 06/23/21 at 07:07:55 by Sebastian Huber

Keywords: qualification added
Note: See TracTickets for help on using tickets.