source: rtems/c/src/ada-tests/support/init.c @ 88c74ab

4.115
Last change on this file since 88c74ab was 88c74ab, checked in by Sebastian Huber <sebastian.huber@…>, on Jul 25, 2013 at 1:10:11 PM

score: Merge tod implementation into one file

Delete TOD_MICROSECONDS_PER_SECOND, TOD_MICROSECONDS_TO_TICKS() and
TOD_MILLISECONDS_TO_TICKS().

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2007
3 *  On-Line Applications Research Corporation (OAR).
4 */
5
6#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
7#include <bsp.h>
8#include <stdlib.h>
9
10/*
11 * This is the entry point automatically generated by GNAT.
12 */
13extern int gnat_main ( int argc, char **argv, char **envp );
14
15void *POSIX_Init(
16  void *argument
17)
18{
19  (void) gnat_main ( 0, 0, 0 );
20
21  exit( 0 );
22}
23
24/*
25 *  Only for sp04 and sp07
26 */
27
28rtems_id tcb_to_id(
29  Thread_Control *tcb
30)
31{
32  return tcb->Object.id;
33}
34
35
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
41#define CONFIGURE_INIT
42#define CONFIGURE_GNAT_RTEMS
43#define CONFIGURE_MEMORY_OVERHEAD  (256)
44
45#include <config.h>
46
47uint32_t milliseconds_per_tick(void)
48{
49  return CONFIGURE_MICROSECONDS_PER_TICK / 1000;
50}
51
52uint32_t ticks_per_second(void)
53{
54  return rtems_clock_get_ticks_per_second();
55}
56
57uint32_t work_space_size(void)
58{
59  return CONFIGURE_EXECUTIVE_RAM_SIZE;
60}
61
62uint32_t is_configured_multiprocessing(void)
63{
64#if defined(RTEMS_MULTIPROCESSING)
65  return 1;
66#else
67  return 0;
68#endif
69}
70
71uint32_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.