OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [lib/] [libbsp/] [shared/] [bsplibc.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*
2
 *  COPYRIGHT (c) 1989-1999.
3
 *  On-Line Applications Research Corporation (OAR).
4
 *
5
 *  bsplibc.c,v 1.6 2000/11/01 21:21:25 joel Exp
6
 */
7
 
8
#include <rtems.h>
9
#include <rtems/libio.h>
10
#include <rtems/libcsupport.h>
11
 
12
extern rtems_configuration_table  BSP_Configuration;
13
 
14
void bsp_libc_init(
15
  void       *heap_start,
16
  unsigned32  heap_size,
17
  int         use_sbrk
18
)
19
{
20
    RTEMS_Malloc_Initialize( heap_start, heap_size, use_sbrk );
21
 
22
    /*
23
     *  Init the RTEMS libio facility to provide UNIX-like system
24
     *  calls for use by newlib (ie: provide open, close, etc)
25
     *  Uses malloc() to get area for the iops, so must be after malloc init
26
     */
27
 
28
    rtems_libio_init();
29
 
30
    /*
31
     * Set up for the libc handling.
32
     */
33
 
34
    if ( BSP_Configuration.ticks_per_timeslice > 0 )
35
        libc_init(1);                /* reentrant if possible */
36
    else
37
        libc_init(0);                /* non-reentrant */
38
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.