rtems_status_code rtems_region_return_segment( rtems_id id, void *segment );
RTEMS_SUCCESSFUL
- segment returned successfully
RTEMS_INVALID_ID
- invalid region id
RTEMS_INVALID_ADDRESS
- segment address not in region
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.
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:
Copyright © 1988-2003 OAR Corporation