po_hi_common.h 1.7 KB
Newer Older
1
2
3
4
5
6
7
8
/*
 * This is a part of PolyORB-HI-C distribution, a minimal
 * middleware written for generated code from AADL models.
 * You should use it with the Ocarina toolsuite.
 *
 * For more informations, please visit http://ocarina.enst.fr
 *
 * Copyright (C) 2007-2008, GET-Telecom Paris.
9
 * Copyright (C) 2010, European Space Agency.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 */

#ifndef __PO_HI_COMMON_H__
#define __PO_HI_COMMON_H__

#include <deployment.h>

/*
 * Configure RTEMS executive.
 * We have to define the number of tasks inside the executive,
 * we deduce it from generated statements.
 */
#if defined(RTEMS_POSIX)
   #include <rtems.h>
   #include <inttypes.h>
   #define CONFIGURE_INIT
26
   #include <bsp.h>
27
28
   #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
   #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
29
   #define CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER
30
31
32
   #define CONFIGURE_MAXIMUM_POSIX_TIMERS          40
   #define CONFIGURE_MAXIMUM_TIMERS                40

33
34

   int POSIX_Init ();
35
36
   #define CONFIGURE_MAXIMUM_POSIX_THREADS              __PO_HI_NB_TASKS + 4
   #define CONFIGURE_MAXIMUM_TASKS             16
37
   #define CONFIGURE_EXTRA_TASK_STACKS         (20 * RTEMS_MINIMUM_STACK_SIZE)
38
39
40
41
42
43
44
#ifdef __PO_HI_NB_PORTS
   #define CONFIGURE_MAXIMUM_POSIX_MUTEXES              __PO_HI_NB_TASKS + 2 + __PO_HI_NB_PORTS
   #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  __PO_HI_NB_TASKS + 2 + __PO_HI_NB_PORTS
#else
   #define CONFIGURE_MAXIMUM_POSIX_MUTEXES              __PO_HI_NB_TASKS + 2 + __PO_HI_NB_PORTS
   #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  __PO_HI_NB_TASKS + 2 + __PO_HI_NB_PORTS
#endif
45
46
47
48
49
50
   #define CONFIGURE_POSIX_INIT_THREAD_TABLE
   #include <po_hi_rtemsconfig.h>
   #include <rtems/confdefs.h>
#endif 

#endif /* __COMMON_H__ */