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