source: rtems/c/src/lib/libbsp/arm/gba/startup/bspgetworkarea.c @ eee78e5

4.104.115
Last change on this file since eee78e5 was eee78e5, checked in by Joel Sherrill <joel.sherrill@…>, on 05/08/09 at 13:24:09

2009-05-08 Joel Sherrill <joel.sherrill@…>

  • startup/bspgetworkarea.c: Switch from ssize_t to uintptr_t for bsp_get_work_area() since the work area is larger than a single allocatable object.
  • Property mode set to 100644
File size: 796 bytes
Line 
1/*
2 *  The license and distribution terms for this file may be
3 *  found in the file LICENSE in this distribution or at
4 *  http://www.rtems.com/license/LICENSE.
5 *
6 *  $Id$
7 */
8
9#include <bsp.h>
10#include <bsp/bootcard.h>
11#include <stdint.h>
12
13extern  void _end;
14extern  void __heap_limit;
15
16/*
17 *  This method returns the base address and size of the area which
18 *  is to be allocated between the RTEMS Workspace and the C Program
19 *  Heap.
20 */
21void bsp_get_work_area(
22  void      **work_area_start,
23  uintptr_t  *work_area_size,
24  void      **heap_start,
25  uintptr_t  *heap_size
26)
27{
28  *work_area_start = (void *)&_end;
29  *work_area_size  = (uintptr_t)&__heap_limit - (uintptr_t)&_end;
30  *heap_start      = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
31  *heap_size       = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
32}
33
Note: See TracBrowser for help on using the repository browser.