Changeset b43314a in rtems


Ignore:
Timestamp:
Jun 28, 2002, 6:51:35 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
0a535af
Parents:
d4696eb
Message:

2002-06-28 Joel Sherrill <joel@…>

  • src/times.c: Cleaned up comments, return more information, and eliminated the fatal error on clock not set since it cannot occur.
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/ChangeLog

    rd4696eb rb43314a  
     12002-06-28      Joel Sherrill <joel@OARcorp.com>
     2
     3        * src/__times.c: Cleaned up comments, return more information,
     4        and eliminated the fatal error on clock not set since it cannot
     5        occur.
     6
    172002-06-27      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    28
  • c/src/exec/libcsupport/src/__times.c

    rd4696eb rb43314a  
    3636  }
    3737
    38   /* "POSIX" does not seem to allow for not having a TOD */
    39   status = rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &ticks );
    40   if ( status != RTEMS_SUCCESSFUL ) {
    41     assert( 0 );
    42     return -1;
    43   }
    44 
    4538  /*
    46    *  RTEMS has no notion of system versus user time and although
    47    *  a way to keep track of per task CPU usage was added since
    48    *  3.6.0, this routine does not utilize it yet.
     39   *  RTEMS technically has no notion of system versus user time
     40   *  since there is no separation of OS from application tasks.
     41   *  But we can at least make a distinction between the number
     42   *  of ticks since boot and the number of ticks executed by this
     43   *  this thread.
    4944   */
    5045
    51   ptms->tms_utime  = ticks;
    52   ptms->tms_stime  = 0;
     46  ptms->tms_utime  = _Thread_Executing->ticks_executed;
     47  ptms->tms_stime  = ticks;
    5348  ptms->tms_cutime = 0;
    5449  ptms->tms_cstime = 0;
    5550
    56   return 0;
     51  return ticks;
    5752}
    5853
  • cpukit/libcsupport/ChangeLog

    rd4696eb rb43314a  
     1
     22002-06-28      Joel Sherrill <joel@OARcorp.com>
     3
     4        * src/__times.c: Cleaned up comments, return more information,
     5        and eliminated the fatal error on clock not set since it cannot
     6        occur.
    17
    282002-06-27      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
  • cpukit/libcsupport/src/__times.c

    rd4696eb rb43314a  
    3636  }
    3737
    38   /* "POSIX" does not seem to allow for not having a TOD */
    39   status = rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &ticks );
    40   if ( status != RTEMS_SUCCESSFUL ) {
    41     assert( 0 );
    42     return -1;
    43   }
    44 
    4538  /*
    46    *  RTEMS has no notion of system versus user time and although
    47    *  a way to keep track of per task CPU usage was added since
    48    *  3.6.0, this routine does not utilize it yet.
     39   *  RTEMS technically has no notion of system versus user time
     40   *  since there is no separation of OS from application tasks.
     41   *  But we can at least make a distinction between the number
     42   *  of ticks since boot and the number of ticks executed by this
     43   *  this thread.
    4944   */
    5045
    51   ptms->tms_utime  = ticks;
    52   ptms->tms_stime  = 0;
     46  ptms->tms_utime  = _Thread_Executing->ticks_executed;
     47  ptms->tms_stime  = ticks;
    5348  ptms->tms_cutime = 0;
    5449  ptms->tms_cstime = 0;
    5550
    56   return 0;
     51  return ticks;
    5752}
    5853
Note: See TracChangeset for help on using the changeset viewer.