source: rtems/cpukit/score/include/rtems/score/prioritybitmap.h @ 0faa9dad

4.115
Last change on this file since 0faa9dad was 0faa9dad, checked in by Joel Sherrill <joel.sherrill@…>, on 11/24/10 at 15:51:28

2010-11-24 Gedare Bloom <giddyup44@…>

PR 1647/cpukit

  • posix/src/nanosleep.c, posix/src/sched_yield.c, rtems/src/taskwakeafter.c, sapi/include/confdefs.h, sapi/include/rtems/config.h, sapi/src/exinit.c, score/Makefile.am, score/preinstall.am, score/include/rtems/score/prioritybitmap.h, score/include/rtems/score/thread.h, score/inline/rtems/score/thread.inl, score/src/thread.c, score/src/threadchangepriority.c, score/src/threadclearstate.c, score/src/threadclose.c, score/src/threadinitialize.c, score/src/threadready.c, score/src/threadresume.c, score/src/threadsetpriority.c, score/src/threadsetstate.c, score/src/threadsettransient.c, score/src/threadsuspend.c, score/src/threadtickletimeslice.c: Refactor scheduler out of thread handler to facilitate alternate scheduler implementations.
  • score/src/threadyieldprocessor.c: Removed.
  • score/src/schedulerprioritythreadschedulerupdate.c, score/src/schedulerprioritythreadschedulerfree.c, score/src/schedulerpriorityblock.c, score/src/scheduler.c, score/src/schedulerprioritythreadschedulerallocate.c, score/src/schedulerpriorityunblock.c, score/src/schedulerpriority.c, score/src/schedulerpriorityyield.c, score/include/rtems/score/schedulerpriority.h, score/include/rtems/score/scheduler.h, score/inline/rtems/score/scheduler.inl, score/inline/rtems/score/schedulerpriority.inl: New files.
  • Property mode set to 100644
File size: 3.1 KB
Line 
1/**
2 *  @file  rtems/score/prioritybitmap.h
3 *
4 *  This include file contains all thread priority manipulation routines for
5 *  the bit map priority queue implementation.
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2010.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 *
16 *  $Id$
17 */
18
19#ifndef _RTEMS_SCORE_PRIORITYBITMAP_H
20#define _RTEMS_SCORE_PRIORITYBITMAP_H
21
22/**
23 *  @addtogroup ScorePriority
24 * 
25 */
26/**@{*/
27
28/*
29 * Processor specific information.
30 */
31#include <rtems/score/cpu.h>
32
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38#include <rtems/score/priority.h>
39
40
41/*
42 * The Priority_bit_map_Control variables are instantiated only
43 * if using the bit map handler.
44 */
45
46/**
47 *  Each sixteen bit entry in this array is associated with one of
48 *  the sixteen entries in the Priority Bit map.
49 */
50extern volatile Priority_bit_map_Control _Priority_Major_bit_map;
51
52/** Each bit in the Priority Bitmap indicates whether or not there are
53 *  threads ready at a particular priority.  The mapping of
54 *  individual priority levels to particular bits is processor
55 *  dependent as is the value of each bit used to indicate that
56 *  threads are ready at that priority.
57 */
58extern Priority_bit_map_Control
59               _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
60
61/*
62 *  The definition of the Priority_bit_map_Control type is CPU dependent.
63 *
64 */
65
66/**
67 *  The following record defines the information associated with
68 *  each thread to manage its interaction with the priority bit maps.
69 */
70typedef struct {
71  /** This is the address of minor bit map slot. */
72  Priority_bit_map_Control *minor;
73  /** This is the priority bit map ready mask. */
74  Priority_bit_map_Control  ready_major;
75  /** This is the priority bit map ready mask. */
76  Priority_bit_map_Control  ready_minor;
77  /** This is the priority bit map block mask. */
78  Priority_bit_map_Control  block_major;
79  /** This is the priority bit map block mask. */
80  Priority_bit_map_Control  block_minor;
81} Priority_bit_map_Information;
82
83
84#if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE )
85/**
86 *  This method returns the priority bit mask for the specified major
87 *  or minor bit number.
88 *
89 *  @param[in] _bit_number is the bit number for which we need a mask
90 *
91 *  @return the priority bit mask
92 *
93 *  @note This may simply be a pass through to a CPU dependent implementation.
94 */
95#define _Priority_Mask( _bit_number ) \
96  _CPU_Priority_Mask( _bit_number )
97#endif
98
99#if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE )
100/**
101 *  This method returns the bit index position for the specified priority.
102 *
103 *  @param[in] _priority is the priority for which we need the index.
104 *
105 *  @return This method returns the array index into the priority bit map.
106 *
107 *  @note This may simply be a pass through to a CPU dependent implementation.
108 */
109#define _Priority_Bits_index( _priority ) \
110  _CPU_Priority_bits_index( _priority )
111#endif
112
113#ifndef __RTEMS_APPLICATION__
114#include <rtems/score/prioritybitmap.inl>
115#endif
116
117#ifdef __cplusplus
118}
119#endif
120
121/**@}*/
122
123#endif
124/* end of include file */
Note: See TracBrowser for help on using the repository browser.