Ignore:
Timestamp:
09/22/11 07:16:06 (12 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
86c847c1
Parents:
82525a75
Message:

2011-09-22 Sebastian Huber <sebastian.huber@…>

PR 1914/cpukit

  • rtems/score/cpu.h: Document CPU_TIMESTAMP_USE_STRUCT_TIMESPEC, CPU_TIMESTAMP_USE_INT64, and CPU_TIMESTAMP_USE_INT64_INLINE.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/no_cpu/rtems/score/cpu.h

    r82525a75 rf40139b  
    355355 */
    356356#define CPU_STRUCTURE_ALIGNMENT
     357
     358/**
     359 *  @defgroup CPUTimestamp Processor Dependent Timestamp Support
     360 *
     361 *  This group assists in issues related to timestamp implementation.
     362 *
     363 *  The port must choose exactly one of the following defines:
     364 *  - #define CPU_TIMESTAMP_USE_STRUCT_TIMESPEC TRUE
     365 *  - #define CPU_TIMESTAMP_USE_INT64 TRUE
     366 *  - #define CPU_TIMESTAMP_USE_INT64_INLINE TRUE
     367 *
     368 *  Performance of int64_t versus struct timespec
     369 *  =============================================
     370 *
     371 *  On PowerPC/psim, inlined int64_t saves ~50 instructions on each
     372 *    _Thread_Dispatch operation which results in a context switch.
     373 *    This works out to be about 10% faster dispatches and 7.5% faster
     374 *    blocking semaphore obtains.  The following numbers are in instructions
     375 *    and from tm02 and tm26.
     376 *
     377 *                         timespec  int64  inlined int64
     378 *    dispatch:              446      446      400
     379 *    blocking sem obtain:   627      626      581
     380 *
     381 *  On SPARC/sis, inlined int64_t shows the same percentage gains.
     382 *    The following numbers are in microseconds and from tm02 and tm26.
     383 *
     384 *                         timespec  int64  inlined int64
     385 *    dispatch:               59       61       53
     386 *    blocking sem obtain:    98      100       92
     387 *
     388 *  Inlining appears to have a tendency to increase the size of
     389 *    some executables.
     390 *  Not inlining reduces the execution improvement but does not seem to
     391 *    be an improvement on the PowerPC and SPARC. The struct timespec
     392 *    and the executables with int64 not inlined are about the same size.
     393 */
     394
     395/**
     396 *  @ingroup CPUTimestamp
     397 *
     398 *  Selects the timestamp implementation using struct timespec.
     399 *
     400 *  Port Specific Information:
     401 *
     402 *  XXX document implementation including references if appropriate
     403 */
     404#define CPU_TIMESTAMP_USE_STRUCT_TIMESPEC TRUE
     405
     406/**
     407 *  @ingroup CPUTimestamp
     408 *
     409 *  Selects the timestamp implementation using int64_t and no inlined methods.
     410 *
     411 *  Port Specific Information:
     412 *
     413 *  XXX document implementation including references if appropriate
     414 */
     415#define CPU_TIMESTAMP_USE_INT64 TRUE
     416
     417/**
     418 *  @ingroup CPUTimestamp
     419 *
     420 *  Selects the timestamp implementation using int64_t and inlined methods.
     421 *
     422 *  Port Specific Information:
     423 *
     424 *  XXX document implementation including references if appropriate
     425 */
     426#define CPU_TIMESTAMP_USE_INT64_INLINE TRUE
    357427
    358428/**
Note: See TracChangeset for help on using the changeset viewer.