RTEMS Logo

RTEMS 4.6.99.3 On-Line Library


Partition Manager PARTITION_CREATE - Create a partition

PREV UP NEXT Bookshelf RTEMS C User's Guide

13.4.1: PARTITION_CREATE - Create a partition

CALLING SEQUENCE:

rtems_status_code rtems_partition_create(
  rtems_name        name,
  void             *starting_address,
  rtems_unsigned32  length,
  rtems_unsigned32  buffer_size,
  rtems_attribute   attribute_set,
  rtems_id         *id
);

DIRECTIVE STATUS CODES:

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
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

DESCRIPTION:

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.

NOTES:

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:

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.


PREV UP NEXT Bookshelf RTEMS C User's Guide

Copyright © 1988-2004 OAR Corporation