1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup ClassicPartImpl |
---|
5 | * |
---|
6 | * @brief Classic Partition Manager Data Structures |
---|
7 | */ |
---|
8 | |
---|
9 | /* COPYRIGHT (c) 1989-2008. |
---|
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.org/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef _RTEMS_RTEMS_PARTDATA_H |
---|
18 | #define _RTEMS_RTEMS_PARTDATA_H |
---|
19 | |
---|
20 | #include <rtems/rtems/part.h> |
---|
21 | #include <rtems/score/isrlock.h> |
---|
22 | #include <rtems/score/objectdata.h> |
---|
23 | |
---|
24 | #ifdef __cplusplus |
---|
25 | extern "C" { |
---|
26 | #endif |
---|
27 | |
---|
28 | /** |
---|
29 | * @addtogroup ClassicPartImpl |
---|
30 | * |
---|
31 | * @{ |
---|
32 | */ |
---|
33 | |
---|
34 | /** |
---|
35 | * The following defines the control block used to manage each partition. |
---|
36 | */ |
---|
37 | typedef struct { |
---|
38 | /** This field is the object management portion of a Partition instance. */ |
---|
39 | Objects_Control Object; |
---|
40 | /** This field is the lock of the Partition. */ |
---|
41 | ISR_LOCK_MEMBER( Lock ) |
---|
42 | /** This field is the physical starting address of the Partition. */ |
---|
43 | void *starting_address; |
---|
44 | /** This field is the size of the Partition in bytes. */ |
---|
45 | uintptr_t length; |
---|
46 | /** This field is the size of each buffer in bytes */ |
---|
47 | size_t buffer_size; |
---|
48 | /** This field is the attribute set provided at create time. */ |
---|
49 | rtems_attribute attribute_set; |
---|
50 | /** This field is the of allocated buffers. */ |
---|
51 | uintptr_t number_of_used_blocks; |
---|
52 | /** This field is the chain used to manage unallocated buffers. */ |
---|
53 | Chain_Control Memory; |
---|
54 | } Partition_Control; |
---|
55 | |
---|
56 | /** |
---|
57 | * @brief The Classic Partition objects information. |
---|
58 | */ |
---|
59 | extern Objects_Information _Partition_Information; |
---|
60 | |
---|
61 | #if defined(RTEMS_MULTIPROCESSING) |
---|
62 | /** |
---|
63 | * @brief Partition_MP_Send_extract_proxy |
---|
64 | * |
---|
65 | * This routine is invoked when a task is deleted and it |
---|
66 | * has a proxy which must be removed from a thread queue and |
---|
67 | * the remote node must be informed of this. |
---|
68 | */ |
---|
69 | void _Partition_MP_Send_extract_proxy ( |
---|
70 | Thread_Control *the_thread, |
---|
71 | Objects_Id id |
---|
72 | ); |
---|
73 | #endif |
---|
74 | |
---|
75 | /** |
---|
76 | * @brief Macro to define the objects information for the Classic Partition |
---|
77 | * objects. |
---|
78 | * |
---|
79 | * This macro should only be used by <rtems/confdefs.h>. |
---|
80 | * |
---|
81 | * @param max The configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag |
---|
82 | * may be set). |
---|
83 | */ |
---|
84 | #define PARTITION_INFORMATION_DEFINE( max ) \ |
---|
85 | OBJECTS_INFORMATION_DEFINE( \ |
---|
86 | _Partition, \ |
---|
87 | OBJECTS_CLASSIC_API, \ |
---|
88 | OBJECTS_RTEMS_PARTITIONS, \ |
---|
89 | Partition_Control, \ |
---|
90 | max, \ |
---|
91 | OBJECTS_NO_STRING_NAME, \ |
---|
92 | _Partition_MP_Send_extract_proxy \ |
---|
93 | ) |
---|
94 | |
---|
95 | /** @} */ |
---|
96 | |
---|
97 | #ifdef __cplusplus |
---|
98 | } |
---|
99 | #endif |
---|
100 | |
---|
101 | #endif |
---|
102 | /* end of include file */ |
---|