RTEMS Logo

RTEMS 4.10.2 On-Line Library


Region Manager REGION_RETURN_SEGMENT - Return segment to a region

PREV UP NEXT Bookshelf RTEMS C User's Guide

14.4.6: REGION_RETURN_SEGMENT - Return segment to a region

CALLING SEQUENCE:

rtems_status_code rtems_region_return_segment(
  rtems_id  id,
  void     *segment
);

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 C User's Guide

Copyright © 1988-2008 OAR Corporation