RTEMS  5.1
config.h
Go to the documentation of this file.
1 
10 /*
11  * COPYRIGHT (c) 1989-2014.
12  * On-Line Applications Research Corporation (OAR).
13  *
14  * The license and distribution terms for this file may be
15  * found in the file LICENSE in this distribution or at
16  * http://www.rtems.org/license/LICENSE.
17  */
18 
19 #ifndef _RTEMS_CONFIG_H
20 #define _RTEMS_CONFIG_H
21 
22 /*
23  * Unlimited object support. Changes the configuration table entry for POSIX
24  * or RTEMS APIs to bounded only by the memory of the work-space.
25  *
26  * Use the macro to define the resource unlimited before placing in
27  * the configuration table.
28  */
29 
30 #include <rtems/score/object.h>
31 #include <rtems/score/isr.h>
32 #include <rtems/score/memory.h>
33 #include <rtems/score/smp.h>
34 #include <rtems/score/stack.h>
39 #include <rtems/rtems/config.h>
40 #include <rtems/extension.h>
41 #if defined(RTEMS_MULTIPROCESSING)
42 #include <rtems/rtems/types.h>
43 #endif
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 #define RTEMS_UNLIMITED_OBJECTS OBJECTS_UNLIMITED_OBJECTS
50 
51 #define rtems_resource_unlimited(resource) \
52  ( resource | RTEMS_UNLIMITED_OBJECTS )
53 
54 #define rtems_resource_is_unlimited(resource) \
55  _Objects_Is_unlimited(resource)
56 
57 #define rtems_resource_maximum_per_allocation(resource) \
58  _Objects_Maximum_per_allocation(resource)
59 
64 
69 
74 
75 /*
76  * Some handy macros to avoid dependencies on either the BSP
77  * or the exact format of the configuration table.
78  */
79 
80 #define rtems_configuration_get_unified_work_area() \
81  (_Workspace_Is_unified)
82 
92 #define rtems_configuration_get_stack_allocator_avoids_work_space() \
93  (_Stack_Allocator_avoids_workspace)
94 
95 uintptr_t rtems_configuration_get_stack_space_size( void );
96 
97 #define rtems_configuration_get_work_space_size() \
98  (_Workspace_Size + \
99  (rtems_configuration_get_stack_allocator_avoids_work_space() ? \
100  0 : rtems_configuration_get_stack_space_size()))
101 
102 uint32_t rtems_configuration_get_maximum_extensions( void );
103 
104 #define rtems_configuration_get_microseconds_per_tick() \
105  (_Watchdog_Microseconds_per_tick)
106 #define rtems_configuration_get_milliseconds_per_tick() \
107  (_Watchdog_Microseconds_per_tick / 1000)
108 #define rtems_configuration_get_nanoseconds_per_tick() \
109  (_Watchdog_Nanoseconds_per_tick)
110 
111 #define rtems_configuration_get_ticks_per_timeslice() \
112  (_Watchdog_Ticks_per_timeslice)
113 
114 #define rtems_configuration_get_idle_task() \
115  (_Thread_Idle_entry)
116 
117 #define rtems_configuration_get_idle_task_stack_size() \
118  (_Thread_Idle_stack_size)
119 
120 #define rtems_configuration_get_interrupt_stack_size() \
121  ((size_t) _ISR_Stack_size)
122 
123 #define rtems_configuration_get_stack_allocate_init_hook() \
124  (_Stack_Allocator_initialize)
125 
126 #define rtems_configuration_get_stack_allocate_hook() \
127  (_Stack_Allocator_allocate)
128 
129 #define rtems_configuration_get_stack_free_hook() \
130  (_Stack_Allocator_free)
131 
136 #define rtems_configuration_get_do_zero_of_workspace() \
137  _Memory_Zero_before_use
138 
139 #define rtems_configuration_get_number_of_initial_extensions() \
140  ((uint32_t) _User_extensions_Initial_count)
141 
142 #define rtems_configuration_get_user_extension_table() \
143  (&_User_extensions_Initial_extensions[ 0 ])
144 
145 #if defined(RTEMS_MULTIPROCESSING)
146  #define rtems_configuration_get_user_multiprocessing_table() \
147  (&_MPCI_Configuration)
148 #else
149  #define rtems_configuration_get_user_multiprocessing_table() \
150  NULL
151 #endif
152 
164 #define rtems_configuration_get_maximum_processors() \
165  (_SMP_Processor_configured_maximum)
166 
167 #ifdef __cplusplus
168 }
169 #endif
170 
171 #endif
172 /* end of include file */
Constants defined by the application configuration for the idle threads.
User Extension Handler Data Structures.
Information About the Thread Stack Handler.
Data Related to the Management of Processor Interrupt Levels.
Constants and Structures Associated with the Object Handler.
Memory Handler API.
Stack_Allocator_allocate rtems_stack_allocate_hook
Stack allocator allocate handler.
Definition: config.h:68
Stack_Allocator_initialize rtems_stack_allocate_init_hook
The stack allocator initialization handler.
Definition: config.h:63
SuperCore SMP Support API.
User Extensions API.
Stack_Allocator_free rtems_stack_free_hook
Stack allocator free handler.
Definition: config.h:73
void(* Stack_Allocator_initialize)(size_t stack_space_size)
The stack allocator initialization handler.
Definition: stack.h:65
Constants for the watchdog ticks.
void(* Stack_Allocator_free)(void *addr)
Stack allocator free handler.
Definition: stack.h:82
Constants for the idle threads.
void *(* Stack_Allocator_allocate)(size_t stack_size)
Stack allocator allocate handler.
Definition: stack.h:75