Changeset 1ae7baf in rtems


Ignore:
Timestamp:
Dec 14, 2014, 10:02:42 PM (5 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
09220c8
Parents:
0a36af04
git-author:
Joel Sherrill <joel.sherrill@…> (12/14/14 22:02:42)
git-committer:
Joel Sherrill <joel.sherrill@…> (01/04/15 19:44:57)
Message:

clock_driver_simidle.c: Add BSP_CLOCK_DRIVER_DELAY

This allows the BSP to define an optional spin delay which is
useful for making time appear to pass at a rate closer to
wall time. On the Edison, this was used with a polled console
driver to slow polling to a reasonable rate and make time
pass reasonably close to correctly even with no clock tick
support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/clock_driver_simidle.c

    r0a36af04 r1ae7baf  
    3232
    3333/*
     34 * If this is defined, then the BSP has defined a delay of some sort so
     35 * time passage appears somewhat correctly. Otherwise, it runs extremely
     36 * fast with no delays.
     37 */
     38#ifndef BSP_CLOCK_DRIVER_DELAY
     39#define BSP_CLOCK_DRIVER_DELAY()
     40#endif
     41
     42/*
    3443 *  Since there is no interrupt on this simulator, let's just
    3544 *  fake time passing.  This will not let preemption from an
     
    4756      _ISR_Nest_level--;
    4857      _Thread_Enable_dispatch();
     58      BSP_CLOCK_DRIVER_DELAY();
    4959    }
    5060  }
Note: See TracChangeset for help on using the changeset viewer.