source: rtems/cpukit/score/cpu/powerpc/rtems/score/cpu.h @ 8ecc042a

4.104.114.84.95
Last change on this file since 8ecc042a was 8ecc042a, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/06/02 at 11:16:48

2002-11-06 Ralf Corsepius <corsepiu@…>

  • rtems/new-exceptions/cpu.h: Remove sections on CPU_INLINE_ENABLE_DISPATCH and CPU_UNROLL_ENQUEUE_PRIORITY.
  • rtems/old-exceptions/cpu.h: Remove sections on CPU_INLINE_ENABLE_DISPATCH and CPU_UNROLL_ENQUEUE_PRIORITY.
  • rtems/score/cpu.h: Insert sections on CPU_INLINE_ENABLE_DISPATCH and CPU_UNROLL_ENQUEUE_PRIORITY.
  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*
2 * $Id$
3 */
4 
5#ifndef _rtems_score_cpu_h
6#define _rtems_score_cpu_h
7
8#include <rtems/score/ppc.h>              /* pick up machine definitions */
9#ifndef ASM
10#include <rtems/score/types.h>
11#endif
12
13/* conditional compilation parameters */
14
15/*
16 *  Should the calls to _Thread_Enable_dispatch be inlined?
17 *
18 *  If TRUE, then they are inlined.
19 *  If FALSE, then a subroutine call is made.
20 *
21 *  Basically this is an example of the classic trade-off of size
22 *  versus speed.  Inlining the call (TRUE) typically increases the
23 *  size of RTEMS while speeding up the enabling of dispatching.
24 *  [NOTE: In general, the _Thread_Dispatch_disable_level will
25 *  only be 0 or 1 unless you are in an interrupt handler and that
26 *  interrupt handler invokes the executive.]  When not inlined
27 *  something calls _Thread_Enable_dispatch which in turns calls
28 *  _Thread_Dispatch.  If the enable dispatch is inlined, then
29 *  one subroutine call is avoided entirely.]
30 */
31
32#define CPU_INLINE_ENABLE_DISPATCH       FALSE
33
34/*
35 *  Should the body of the search loops in _Thread_queue_Enqueue_priority
36 *  be unrolled one time?  In unrolled each iteration of the loop examines
37 *  two "nodes" on the chain being searched.  Otherwise, only one node
38 *  is examined per iteration.
39 *
40 *  If TRUE, then the loops are unrolled.
41 *  If FALSE, then the loops are not unrolled.
42 *
43 *  The primary factor in making this decision is the cost of disabling
44 *  and enabling interrupts (_ISR_Flash) versus the cost of rest of the
45 *  body of the loop.  On some CPUs, the flash is more expensive than
46 *  one iteration of the loop body.  In this case, it might be desirable
47 *  to unroll the loop.  It is important to note that on some CPUs, this
48 *  code is the longest interrupt disable period in RTEMS.  So it is
49 *  necessary to strike a balance when setting this parameter.
50 */
51
52#define CPU_UNROLL_ENQUEUE_PRIORITY      FALSE
53
54#ifdef _OLD_EXCEPTIONS
55#include <rtems/old-exceptions/cpu.h>
56#else
57#include <rtems/new-exceptions/cpu.h>
58#endif
59
60#endif
Note: See TracBrowser for help on using the repository browser.