4.104.114.84.95
Last change
on this file since c0daf807 was
c0daf807,
checked in by Joel Sherrill <joel.sherrill@…>, on 04/15/98 at 22:09:17
|
New file created by extracting common initialization from every BSP's
bspstart.c file.
|
-
Property mode set to
100644
|
File size:
912 bytes
|
Rev | Line | |
---|
[c0daf807] | 1 | /* |
---|
| 2 | * COPYRIGHT (c) 1989-1998. |
---|
| 3 | * On-Line Applications Research Corporation (OAR). |
---|
| 4 | * Copyright assigned to U.S. Government, 1994. |
---|
| 5 | * |
---|
| 6 | * $Id$ |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include <rtems.h> |
---|
| 10 | #include <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 __rtems_open, __rtems_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 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.