RTEMS CPU Kit with SuperCore  4.11.3
Files | Macros | Functions | Variables
Classic Partition Manager Implementation
Collaboration diagram for Classic Partition Manager Implementation:

Files

file  partimpl.h
 Classic Partition Manager Implementation.
 

Macros

#define RTEMS_PART_EXTERN   extern
 This constant is defined to extern most of the time when using this header file. More...
 

Functions

void _Partition_Manager_initialization (void)
 Partition Manager Initialization. More...
 
RTEMS_INLINE_ROUTINE void * _Partition_Allocate_buffer (Partition_Control *the_partition)
 Allocate a buffer from the_partition. More...
 
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (Partition_Control *the_partition, Chain_Node *the_buffer)
 Frees the_buffer to the_partition. More...
 
RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_on_boundary (void *the_buffer, Partition_Control *the_partition)
 Checks whether is on a valid buffer boundary for the_partition. More...
 
RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_valid (Chain_Node *the_buffer, Partition_Control *the_partition)
 Checks whether the_buffer is a valid buffer from the_partition. More...
 
RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_size_aligned (uint32_t buffer_size)
 Checks if partition is buffer size aligned. More...
 
RTEMS_INLINE_ROUTINE Partition_Control_Partition_Allocate (void)
 Allocates a partition control block from the inactive chain of free partition control blocks. More...
 
RTEMS_INLINE_ROUTINE void _Partition_Free (Partition_Control *the_partition)
 Frees a partition control block to the inactive chain of free partition control blocks. More...
 
RTEMS_INLINE_ROUTINE Partition_Control_Partition_Get (Objects_Id id, Objects_Locations *location)
 Maps partition IDs to partition control blocks. More...
 

Variables

RTEMS_PART_EXTERN Objects_Information _Partition_Information
 The following defines the information control block used to manage this class of objects.
 

Detailed Description

Macro Definition Documentation

◆ RTEMS_PART_EXTERN

#define RTEMS_PART_EXTERN   extern

This constant is defined to extern most of the time when using this header file.

However by defining it to nothing, the data declared in this header file can be instantiated. This is done in a single per manager file.

Partition Manager – Instantiate Data

Function Documentation

◆ _Partition_Allocate()

RTEMS_INLINE_ROUTINE Partition_Control* _Partition_Allocate ( void  )

Allocates a partition control block from the inactive chain of free partition control blocks.

This function allocates a partition control block from the inactive chain of free partition control blocks.

References _Objects_Allocate().

◆ _Partition_Allocate_buffer()

RTEMS_INLINE_ROUTINE void* _Partition_Allocate_buffer ( Partition_Control the_partition)

Allocate a buffer from the_partition.

This function attempts to allocate a buffer from the_partition. If successful, it returns the address of the allocated buffer. Otherwise, it returns NULL.

References _Chain_Get(), and Partition_Control::Memory.

◆ _Partition_Free()

RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control the_partition)

Frees a partition control block to the inactive chain of free partition control blocks.

This routine frees a partition control block to the inactive chain of free partition control blocks.

References _Objects_Free(), and Partition_Control::Object.

◆ _Partition_Free_buffer()

RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control the_partition,
Chain_Node the_buffer 
)

Frees the_buffer to the_partition.

This routine frees the_buffer to the_partition.

References _Chain_Append(), and Partition_Control::Memory.

◆ _Partition_Get()

RTEMS_INLINE_ROUTINE Partition_Control* _Partition_Get ( Objects_Id  id,
Objects_Locations location 
)

Maps partition IDs to partition control blocks.

This function maps partition IDs to partition control blocks. If ID corresponds to a local partition, then it returns the_partition control pointer which maps to ID and location is set to OBJECTS_LOCAL. If the partition ID is global and resides on a remote node, then location is set to OBJECTS_REMOTE, and the_partition is undefined. Otherwise, location is set to OBJECTS_ERROR and the_partition is undefined.

References _Objects_Get().

Referenced by rtems_partition_delete().

◆ _Partition_Is_buffer_on_boundary()

RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_on_boundary ( void *  the_buffer,
Partition_Control the_partition 
)

Checks whether is on a valid buffer boundary for the_partition.

This function returns TRUE if the_buffer is on a valid buffer boundary for the_partition, and FALSE otherwise.

References _Addresses_Subtract(), Partition_Control::buffer_size, and Partition_Control::starting_address.

Referenced by _Partition_Is_buffer_valid().

◆ _Partition_Is_buffer_size_aligned()

RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_size_aligned ( uint32_t  buffer_size)

Checks if partition is buffer size aligned.

This function returns TRUE if the use of the specified buffer_size will result in the allocation of buffers whose first byte is properly aligned, and FALSE otherwise.

◆ _Partition_Is_buffer_valid()

RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_valid ( Chain_Node the_buffer,
Partition_Control the_partition 
)

Checks whether the_buffer is a valid buffer from the_partition.

This function returns TRUE if the_buffer is a valid buffer from the_partition, otherwise FALSE is returned.

References _Addresses_Add_offset(), _Addresses_Is_in_range(), _Partition_Is_buffer_on_boundary(), Partition_Control::length, and Partition_Control::starting_address.

◆ _Partition_Manager_initialization()

void _Partition_Manager_initialization ( void  )

Partition Manager Initialization.

This routine performs the initialization necessary for this manager.

References _Objects_Initialize_information(), and _Partition_Information.