procedure Partition_Create ( Name : in RTEMS.Name; Starting_Address : in RTEMS.Address; Length : in RTEMS.Unsigned32; Buffer_Size : in RTEMS.Unsigned32; Attribute_Set : in RTEMS.Attribute; ID : out RTEMS.ID; Result : out RTEMS.Status_Codes );
RTEMS.SUCCESSFUL
- partition created successfully
RTEMS.INVALID_NAME
- invalid partition name
RTEMS.TOO_MANY
- too many partitions created
RTEMS.INVALID_ADDRESS
- address not on four byte boundary
RTEMS.INVALID_ADDRESS
- starting_address
is NULL
RTEMS.INVALID_ADDRESS
- id
is NULL
RTEMS.INVALID_SIZE
- length or buffer size is 0
RTEMS.INVALID_SIZE
- length is less than the buffer size
RTEMS.INVALID_SIZE
- buffer size not a multiple of 4
RTEMS.MP_NOT_CONFIGURED
- multiprocessing not configured
RTEMS.TOO_MANY
- too many global objects
This directive creates a partition of fixed size
buffers from a physically contiguous memory space which starts
at starting_address and is length bytes in size. Each allocated
buffer is to be of buffer_size
in bytes. The assigned
partition id is returned in id
. This partition id is used to
access the partition with other partition related directives.
For control and maintenance of the partition, RTEMS allocates a
PTCB from the local PTCB free pool and initializes it.
This directive will not cause the calling task to be preempted.
The starting_address
must be properly aligned for the
target architecture.
Th buffer_size
parameter must be a multiple of
the CPU alignment factor. Additionally, buffer_size
must be large enough to hold two pointers on the target
architecture. This is required for RTEMS to manage the
buffers when they are free.
Memory from the partition is not used by RTEMS to store the Partition Control Block.
The following partition attribute constants are defined by RTEMS:
RTEMS.LOCAL
- local task (default)
RTEMS.GLOBAL
- global task
The PTCB for a global partition is allocated on the local node. The memory space used for the partition must reside in shared memory. Partitions should not be made global unless remote tasks must interact with the partition. This is to avoid the overhead incurred by the creation of a global partition. When a global partition is created, the partition's name and id must be transmitted to every node in the system for insertion in the local copy of the global object table.
The total number of global objects, including partitions, is limited by the maximum_global_objects field in the Configuration Table.
Copyright © 1988-2007OAR Corporation