source:
rtems/c/src/ada-tests/support/init.c
@
88c74ab
Last change on this file since 88c74ab was 88c74ab, checked in by Sebastian Huber <sebastian.huber@…>, on 07/25/13 at 13:10:11 | |
---|---|
|
|
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 | ||
[d0f426a1] | 6 | #define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ |
[f3f06f79] | 7 | #include <bsp.h> |
[698b292] | 8 | #include <stdlib.h> |
[f3f06f79] | 9 | |
[110e1f1] | 10 | /* |
11 | * This is the entry point automatically generated by GNAT. | |
12 | */ | |
13 | extern int gnat_main ( int argc, char **argv, char **envp ); | |
14 | ||
[f3f06f79] | 15 | void *POSIX_Init( |
16 | void *argument | |
17 | ) | |
18 | { | |
19 | (void) gnat_main ( 0, 0, 0 ); | |
20 | ||
21 | exit( 0 ); | |
22 | } | |
23 | ||
[d0f426a1] | 24 | /* |
[ba3e1a4f] | 25 | * Only for sp04 and sp07 |
[d0f426a1] | 26 | */ |
27 | ||
28 | rtems_id tcb_to_id( | |
29 | Thread_Control *tcb | |
30 | ) | |
31 | { | |
32 | return tcb->Object.id; | |
33 | } | |
34 | ||
[23848bbd] | 35 | |
[a47bd655] | 36 | /* |
37 | * By putting this in brackets rather than quotes, we get the search | |
38 | * path and can get this file from ".." in the mptests. | |
39 | */ | |
40 | ||
[f3f06f79] | 41 | #define CONFIGURE_INIT |
[0f9e7f96] | 42 | #define CONFIGURE_GNAT_RTEMS |
[16e8d3d] | 43 | #define CONFIGURE_MEMORY_OVERHEAD (256) |
[0f9e7f96] | 44 | |
[a47bd655] | 45 | #include <config.h> |
[23848bbd] | 46 | |
47 | uint32_t milliseconds_per_tick(void) | |
48 | { | |
49 | return CONFIGURE_MICROSECONDS_PER_TICK / 1000; | |
50 | } | |
51 | ||
52 | uint32_t ticks_per_second(void) | |
53 | { | |
[88c74ab] | 54 | return rtems_clock_get_ticks_per_second(); |
[23848bbd] | 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.