RTEMS C User's Guide
rtems_status_code rtems_partition_create( rtems_name name, void *starting_address, uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id );
RTEMS_SUCCESSFUL - partition created successfully
RTEMS_INVALID_NAME - invalid task name
RTEMS_TOO_MANY - too many partitions created
RTEMS_INVALID_ADDRESS - address not on four byte boundary
starting_address is NULL
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_length 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 and buffer_size parameters must be multiples of four.
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.
RTEMS C User's Guide
Copyright © 1988-2004 OAR Corporation