RTEMS Logo

RTEMS 4.9.3 On-Line Library


Region Manager REGION_CREATE - Create a region

PREV UP NEXT Bookshelf RTEMS Ada User's Guide

14.4.1: REGION_CREATE - Create a region

CALLING SEQUENCE:

procedure Region_Create (
   Name             : in     RTEMS.Name;
   Starting_Address : in     RTEMS.Address;
   Length           : in     RTEMS.Unsigned32;
   Page_Size        : in     RTEMS.Unsigned32;
   Attribute_Set    : in     RTEMS.Attribute;
   ID               :    out RTEMS.ID;
   Result           :    out RTEMS.Status_Codes
);

DIRECTIVE STATUS CODES:

RTEMS.SUCCESSFUL - region created successfully
RTEMS.INVALID_NAME - invalid region name
RTEMS.INVALID_ADDRESS - id is NULL
RTEMS.INVALID_ADDRESS - starting_address is NULL
RTEMS.INVALID_ADDRESS - address not on four byte boundary
RTEMS.TOO_MANY - too many regions created
RTEMS.INVALID_SIZE - invalid page size

DESCRIPTION:

This directive creates a region from a physically contiguous memory space which starts at starting_address and is length bytes long. Segments allocated from the region will be a multiple of page_size bytes in length. The assigned region id is returned in id. This region id is used as an argument to other region related directives to access the region.

For control and maintenance of the region, RTEMS allocates and initializes an RNCB from the RNCB free pool. Thus memory from the region is not used to store the RNCB. However, some overhead within the region is required by RTEMS each time a segment is constructed in the region.

Specifying RTEMS.PRIORITY in attribute_set causes tasks waiting for a segment to be serviced according to task priority. Specifying RTEMS.FIFO in attribute_set or selecting RTEMS.DEFAULT_ATTRIBUTES will cause waiting tasks to be serviced in First In-First Out order.

The starting_address parameter must be aligned on a four byte boundary. The page_size parameter must be a multiple of four greater than or equal to eight.

NOTES:

This directive will not cause the calling task to be preempted.

The following region attribute constants are defined by RTEMS:


PREV UP NEXT Bookshelf RTEMS Ada User's Guide

Copyright © 1988-2008 OAR Corporation