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 | |
---|
58 | #ifdef __cplusplus |
---|
59 | } |
---|
60 | #endif |
---|
61 | |
---|
62 | #endif |
---|
63 | /* end of include file */ |
---|