source:
rtems/c/src/ada-tests/support/init.c
@
3495c57
Last change on this file since 3495c57 was 3495c57, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/30/09 at 03:49:08 | |
---|---|
|
|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[3495c57] | 1 | /* |
[16e8d3d] | 2 | * COPYRIGHT (c) 1989-2007 |
[f3f06f79] | 3 | * On-Line Applications Research Corporation (OAR). |
4 | * | |
5 | * $Id$ | |
6 | */ | |
7 | ||
[d0f426a1] | 8 | #define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ |
[f3f06f79] | 9 | #include <bsp.h> |
[698b292] | 10 | #include <stdlib.h> |
[f3f06f79] | 11 | |
12 | void *POSIX_Init( | |
13 | void *argument | |
14 | ) | |
15 | { | |
16 | extern int gnat_main ( int argc, char **argv, char **envp ); | |
17 | ||
18 | (void) gnat_main ( 0, 0, 0 ); | |
19 | ||
20 | exit( 0 ); | |
21 | } | |
22 | ||
[d0f426a1] | 23 | /* |
[ba3e1a4f] | 24 | * Only for sp04 and sp07 |
[d0f426a1] | 25 | */ |
26 | ||
27 | rtems_id tcb_to_id( | |
28 | Thread_Control *tcb | |
29 | ) | |
30 | { | |
31 | return tcb->Object.id; | |
32 | } | |
33 | ||
[23848bbd] | 34 | |
[a47bd655] | 35 | /* |
36 | * By putting this in brackets rather than quotes, we get the search | |
37 | * path and can get this file from ".." in the mptests. | |
38 | */ | |
39 | ||
[f3f06f79] | 40 | #define CONFIGURE_INIT |
[0f9e7f96] | 41 | #define CONFIGURE_GNAT_RTEMS |
[16e8d3d] | 42 | #define CONFIGURE_MEMORY_OVERHEAD (256) |
[0f9e7f96] | 43 | |
[a47bd655] | 44 | #include <config.h> |
[23848bbd] | 45 | |
46 | uint32_t milliseconds_per_tick(void) | |
47 | { | |
48 | return CONFIGURE_MICROSECONDS_PER_TICK / 1000; | |
49 | } | |
50 | ||
51 | uint32_t ticks_per_second(void) | |
52 | { | |
53 | /* XXX HACK -- use public API */ | |
54 | return TOD_TICKS_PER_SECOND; | |
55 | } | |
56 | ||
[ba3e1a4f] | 57 | uint32_t work_space_size(void) |
58 | { | |
59 | return CONFIGURE_EXECUTIVE_RAM_SIZE; | |
60 | } | |
61 | ||
62 | uint32_t is_configured_multiprocessing(void) | |
63 | { | |
64 | #if defined(RTEMS_MULTIPROCESSING) | |
65 | return 1; | |
66 | #else | |
67 | return 0; | |
68 | #endif | |
69 | } | |
70 | ||
[23848bbd] | 71 | uint32_t get_node(void) |
72 | { | |
73 | /* XXX HACK -- use public API */ | |
74 | return _Objects_Local_node; | |
75 | } |
Note: See TracBrowser
for help on using the repository browser.