Changeset a9d5d44 in rtems for doc/user/region.t


Ignore:
Timestamp:
06/17/05 14:29:13 (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
181601f
Parents:
df8ba46
Message:

2005-06-17 Joel Sherrill <joel@…>

  • user/region.t: Add documentation on region_resize_segment.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/user/region.t

    rdf8ba46 ra9d5d44  
    2525@item @code{@value{DIRPREFIX}region_return_segment} - Return segment to a region
    2626@item @code{@value{DIRPREFIX}region_get_segment_size} - Obtain size of a segment
     27@item @code{@value{DIRPREFIX}region_resize_segment} - Change size of a segment
    2728@end itemize
    2829
     
    203204rounding up to a page size boundary.
    204205
     206@subsection Changing the Size of a Segment
     207
     208The @code{@value{DIRPREFIX}region_resize_segment} directive
     209is used to change the size in bytes of the specified segment.  The
     210size may be increased or decreased.  When increasing the
     211size of a segment, it is possible that the request cannot be
     212satisfied.  This directive is used to support the @code{realloc()}
     213function in the Standard C Library.
     214
    205215@subsection Deleting a Region
    206216
     
    664674a multiple of the region's page size.
    665675
     676@c
     677@c
     678@c
     679@page
     680@subsection REGION_RESIZE_SEGMENT - Change size of a segment
     681
     682@cindex resize segment
     683
     684@subheading CALLING SEQUENCE:
     685
     686@ifset is-C
     687@findex rtems_region_resize_segment
     688@example
     689rtems_status_code rtems_region_resize_segment(
     690  rtems_id     id,
     691  void        *segment,
     692  size_t       size,
     693  size_t      *old_size
     694);
     695@end example
     696@end ifset
     697
     698@ifset is-Ada
     699@example
     700procedure Region_Resize_Segment (
     701   ID         : in     RTEMS.ID;
     702   Segment    : in     RTEMS.Address;
     703   Size       : in     RTEMS.Unsigned32;
     704   Old_Size   :    out RTEMS.Unsigned32;
     705   Result     :    out RTEMS.Status_Codes
     706);
     707@end example
     708@end ifset
     709
     710@subheading DIRECTIVE STATUS CODES:
     711
     712@code{@value{RPREFIX}SUCCESSFUL} - segment obtained successfully@*
     713@code{@value{RPREFIX}INVALID_ADDRESS} - @code{segment} is NULL@*
     714@code{@value{RPREFIX}INVALID_ADDRESS} - @code{old_size} is NULL@*
     715@code{@value{RPREFIX}INVALID_ID} - invalid region id@*
     716@code{@value{RPREFIX}INVALID_ADDRESS} - segment address not in region
     717@code{@value{RPREFIX}UNSATISFIED} - unable to make segment larger
     718
     719@subheading DESCRIPTION:
     720
     721This directive is used to increase or decrease the size of
     722a @a{segment}.  When increasing the size of a segment, it
     723is possible that there is not memory available contiguous
     724to the segment.  In this case, the request is unsatisfied.
     725
     726@subheading NOTES:
     727
     728If an attempt to increase the size of a @a{segment} fails, then
     729the application may want to allocate a new segment of the desired
     730size, copy the contents of the original segment to the new, larger
     731segment and then return the original segment.
     732
Note: See TracChangeset for help on using the changeset viewer.