source: rtems/cpukit/rtems/src/regiongetinfo.c @ 572cb624

5
Last change on this file since 572cb624 was 572cb624, checked in by Sebastian Huber <sebastian.huber@…>, on 04/07/16 at 14:48:30

score: Simplify _Objects_Get_no_protection()

This functions supports only local objects. Thus, drop the location
parameter which was unused by all callers.

Remove superfluous includes from Classic Region implementation.

  • Property mode set to 100644
File size: 950 bytes
Line 
1/**
2 *  @file
3 *
4 *  @brief RTEMS Get Region Information
5 *  @ingroup ClassicRegion
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2014.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/rtems/regionimpl.h>
22
23rtems_status_code rtems_region_get_information(
24  rtems_id                id,
25  Heap_Information_block *the_info
26)
27{
28  rtems_status_code  status;
29  Region_Control    *the_region;
30
31  if ( the_info == NULL ) {
32    return RTEMS_INVALID_ADDRESS;
33  }
34
35  _RTEMS_Lock_allocator();
36
37  the_region = _Region_Get( id );
38
39  if ( the_region != NULL ) {
40    _Heap_Get_information( &the_region->Memory, the_info );
41    status = RTEMS_SUCCESSFUL;
42  } else {
43    status = RTEMS_INVALID_ID;
44  }
45
46  _RTEMS_Unlock_allocator();
47  return status;
48}
Note: See TracBrowser for help on using the repository browser.