RTEMS Logo

RTEMS 4.9.5 On-Line Library


Region Manager REGION_RETURN_SEGMENT - Return segment to a region

PREV UP NEXT Bookshelf RTEMS Ada User's Guide

14.4.6: REGION_RETURN_SEGMENT - Return segment to a region

CALLING SEQUENCE:

procedure Region_Return_Segment (
   ID      : in     RTEMS.ID;
   Segment : in     RTEMS.Address;
   Result  :    out RTEMS.Status_Codes
);

DIRECTIVE STATUS CODES:

RTEMS.SUCCESSFUL - segment returned successfully
RTEMS.INVALID_ADDRESS - segment is NULL
RTEMS.INVALID_ID - invalid region id
RTEMS.INVALID_ADDRESS - segment address not in region

DESCRIPTION:

This directive returns the segment specified by segment to the region specified by id. The returned segment is merged with its neighbors to form the largest possible segment. The first task on the wait queue is examined to determine if its segment request can now be satisfied. If so, it is given a segment and unblocked. This process is repeated until the first task's segment request cannot be satisfied.

NOTES:

This directive will cause the calling task to be preempted if one or more local tasks are waiting for a segment and the following conditions exist:


PREV UP NEXT Bookshelf RTEMS Ada User's Guide

Copyright © 1988-2008 OAR Corporation