source: rtems/cpukit/score/include/rtems/score/prioritybitmap.h @ 8e7db68c

4.115
Last change on this file since 8e7db68c was 494c2e3, checked in by Sebastian Huber <sebastian.huber@…>, on 04/01/14 at 09:48:59

score: Move priority bit map to scheduler instance

Delete global variables _Priority_Major_bit_map and _Priority_Bit_map.
This makes it possible to use multiple priority scheduler instances for
example with clustered/partitioned scheduling on SMP.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/**
2 *  @file  rtems/score/prioritybitmap.h
3 *
4 *  @brief Manipulation Routines for the Bitmap Priority Queue Implementation
5 *
6 *  This include file contains all thread priority manipulation routines for
7 *  the bit map priority queue implementation.
8 */
9
10/*
11 *  COPYRIGHT (c) 1989-2010.
12 *  On-Line Applications Research Corporation (OAR).
13 *
14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
16 *  http://www.rtems.org/license/LICENSE.
17 */
18
19#ifndef _RTEMS_SCORE_PRIORITYBITMAP_H
20#define _RTEMS_SCORE_PRIORITYBITMAP_H
21
22#include <rtems/score/cpu.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/**
29 *  @defgroup ScorePriorityBitmap Bitmap Priority Thread Routines
30 *
31 *  @ingroup Score
32 */
33/**@{*/
34
35/*
36 *  The definition of the Priority_bit_map_Word type is CPU dependent.
37 *
38 */
39
40typedef struct {
41  /**
42   * @brief Each sixteen bit entry in this word is associated with one of the
43   * sixteen entries in the bit map.
44   */
45  Priority_bit_map_Word major_bit_map;
46
47  /**
48   * @brief Each bit in the bit map indicates whether or not there are threads
49   * ready at a particular priority.
50   *
51   * The mapping of individual priority levels to particular bits is processor
52   * dependent as is the value of each bit used to indicate that threads are
53   * ready at that priority.
54   */
55  Priority_bit_map_Word bit_map[ 16 ];
56} Priority_bit_map_Control;
57
58/**
59 *  The following record defines the information associated with
60 *  each thread to manage its interaction with the priority bit maps.
61 */
62typedef struct {
63  /** This is the address of minor bit map slot. */
64  Priority_bit_map_Word *minor;
65  /** This is the priority bit map ready mask. */
66  Priority_bit_map_Word  ready_major;
67  /** This is the priority bit map ready mask. */
68  Priority_bit_map_Word  ready_minor;
69  /** This is the priority bit map block mask. */
70  Priority_bit_map_Word  block_major;
71  /** This is the priority bit map block mask. */
72  Priority_bit_map_Word  block_minor;
73} Priority_bit_map_Information;
74
75/**@}*/
76
77#ifdef __cplusplus
78}
79#endif
80
81#endif
82/* end of include file */
Note: See TracBrowser for help on using the repository browser.