Ignore:
Timestamp:
08/01/22 07:03:11 (10 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
52b7a58
Parents:
071640d
git-author:
Sebastian Huber <sebastian.huber@…> (08/01/22 07:03:11)
git-committer:
Sebastian Huber <sebastian.huber@…> (08/04/22 05:55:30)
Message:

posix: Fix relative CLOCK_REALTIME sleep

A relative CLOCK_REALTIME time out shall not be affected by CLOCK_REALTIME
changes through clock_settime(). Since our CLOCK_REALTIME is basically just
CLOCK_MONOTONIC plus an offset, we can simply use the CLOCK_MONOTONIC watchdog
for relative CLOCK_REALTIME time outs.

Update #4690.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/clocknanosleep.c

    r071640d rc64c638  
    8383  } else {
    8484    absolute = false;
     85
     86    /*
     87     * A relative CLOCK_REALTIME time out shall not be affected by
     88     * CLOCK_REALTIME changes through clock_settime().  Since our
     89     * CLOCK_REALTIME is basically just CLOCK_MONOTONIC plus an offset, we can
     90     * simply use the CLOCK_MONOTONIC watchdog for relative CLOCK_REALTIME time
     91     * outs.
     92     */
     93    clock_id = CLOCK_MONOTONIC;
    8594  }
    8695
Note: See TracChangeset for help on using the changeset viewer.