Ignore:
Timestamp:
06/22/22 09:02:33 (16 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
94df3a7a
Parents:
085f363
git-author:
Sebastian Huber <sebastian.huber@…> (06/22/22 09:02:33)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/23/22 07:20:11)
Message:

score: Use right clock for threadq timeouts

Use CLOCK_REALTIME and CLOCK_MONOTONIC for relative thread queue timeouts
instead of CLOCK_REALTIME_COARSE and CLOCK_MONOTONIC_COARSE. This fixes an
issue with clock_nanosleep() in combination with clock_gettime().

Close #4669.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/validation/tc-clock-nanosleep.c

    r085f363 rcd50bea  
    326326  while ( true ) {
    327327    T_scheduler_log *log;
     328    uint32_t         counter;
    328329
    329330    SuspendSelf();
     
    332333    T_null( log );
    333334
    334     _Timecounter_Getnanotime( &ctx->now_realtime );
    335     _Timecounter_Getnanouptime( &ctx->now_monotonic );
     335    counter = GetTimecountCounter();
     336    _Timecounter_Nanotime( &ctx->now_realtime );
     337    SetTimecountCounter( counter );
     338
     339    counter = GetTimecountCounter();
     340    _Timecounter_Nanouptime( &ctx->now_monotonic );
     341    SetTimecountCounter( counter );
    336342
    337343    ctx->status = clock_nanosleep(
Note: See TracChangeset for help on using the changeset viewer.