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 |
---|
25 | extern "C" { |
---|
26 | #endif |
---|
27 | |
---|
28 | /** |
---|
29 | * @defgroup ScorePriorityBitmap Bitmap Priority Thread Routines |
---|
30 | * |
---|
31 | * @ingroup Score |
---|
32 | */ |
---|
33 | /**@{*/ |
---|
34 | |
---|
35 | typedef uint16_t Priority_bit_map_Word; |
---|
36 | |
---|
37 | typedef struct { |
---|
38 | /** |
---|
39 | * @brief Each sixteen bit entry in this word is associated with one of the |
---|
40 | * sixteen entries in the bit map. |
---|
41 | */ |
---|
42 | Priority_bit_map_Word major_bit_map; |
---|
43 | |
---|
44 | /** |
---|
45 | * @brief Each bit in the bit map indicates whether or not there are threads |
---|
46 | * ready at a particular priority. |
---|
47 | * |
---|
48 | * The mapping of individual priority levels to particular bits is processor |
---|
49 | * dependent as is the value of each bit used to indicate that threads are |
---|
50 | * ready at that priority. |
---|
51 | */ |
---|
52 | Priority_bit_map_Word bit_map[ 16 ]; |
---|
53 | } Priority_bit_map_Control; |
---|
54 | |
---|
55 | /** |
---|
56 | * The following record defines the information associated with |
---|
57 | * each thread to manage its interaction with the priority bit maps. |
---|
58 | */ |
---|
59 | typedef struct { |
---|
60 | /** This is the address of minor bit map slot. */ |
---|
61 | Priority_bit_map_Word *minor; |
---|
62 | /** This is the priority bit map ready mask. */ |
---|
63 | Priority_bit_map_Word ready_major; |
---|
64 | /** This is the priority bit map ready mask. */ |
---|
65 | Priority_bit_map_Word ready_minor; |
---|
66 | /** This is the priority bit map block mask. */ |
---|
67 | Priority_bit_map_Word block_major; |
---|
68 | /** This is the priority bit map block mask. */ |
---|
69 | Priority_bit_map_Word block_minor; |
---|
70 | } Priority_bit_map_Information; |
---|
71 | |
---|
72 | /**@}*/ |
---|
73 | |
---|
74 | #ifdef __cplusplus |
---|
75 | } |
---|
76 | #endif |
---|
77 | |
---|
78 | #endif |
---|
79 | /* end of include file */ |
---|