RTEMS
config.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 
12 /*
13  * Copyright (C) 2009, 2020 embedded brains GmbH (http://www.embedded-brains.de)
14  *
15  * Redistribution and use in source and binary forms, with or without
16  * modification, are permitted provided that the following conditions
17  * are met:
18  * 1. Redistributions of source code must retain the above copyright
19  * notice, this list of conditions and the following disclaimer.
20  * 2. Redistributions in binary form must reproduce the above copyright
21  * notice, this list of conditions and the following disclaimer in the
22  * documentation and/or other materials provided with the distribution.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  */
36 
37 /*
38  * Do not manually edit this file. It is part of the RTEMS quality process
39  * and was automatically generated.
40  *
41  * If you find something that needs to be fixed or worded better please
42  * post a report to an RTEMS mailing list or raise a bug report:
43  *
44  * https://docs.rtems.org/branches/master/user/support/bugs.html
45  *
46  * For information on updating and regenerating please refer to:
47  *
48  * https://docs.rtems.org/branches/master/eng/req/howto.html
49  */
50 
51 /* Generated from spec:/rtems/config/if/header */
52 
53 #ifndef _RTEMS_CONFIG_H
54 #define _RTEMS_CONFIG_H
55 
56 #include <stddef.h>
57 #include <stdint.h>
58 #include <rtems/rtems/config.h>
59 #include <rtems/score/cpu.h>
60 #include <rtems/score/isr.h>
61 #include <rtems/score/memory.h>
62 #include <rtems/score/object.h>
63 #include <rtems/score/smp.h>
64 #include <rtems/score/stack.h>
69 
70 #if defined(RTEMS_MULTIPROCESSING)
71  #include <rtems/rtems/types.h>
72  #include <rtems/score/mpci.h>
73 #endif
74 
75 #ifdef __cplusplus
76 extern "C" {
77 #endif
78 
79 /* Generated from spec:/rtems/config/if/group */
80 
91 /* Generated from spec:/rtems/config/if/get-stack-space-size */
92 
100 
101 /* Generated from spec:/rtems/config/if/get-stack-allocator-avoids-work-space */
102 
109 #define rtems_configuration_get_stack_allocator_avoids_work_space() \
110  _Stack_Allocator_avoids_workspace
111 
112 /* Generated from spec:/rtems/config/if/unlimited-objects */
113 
120 #define RTEMS_UNLIMITED_OBJECTS OBJECTS_UNLIMITED_OBJECTS
121 
122 /* Generated from spec:/rtems/config/if/get-copyright-notice */
123 
129 const char *rtems_get_copyright_notice( void );
130 
131 /* Generated from spec:/rtems/config/if/get-do-zero-of-workspace */
132 
139 #define rtems_configuration_get_do_zero_of_workspace() _Memory_Zero_before_use
140 
141 /* Generated from spec:/rtems/config/if/get-idle-task */
142 
148 #define rtems_configuration_get_idle_task() _Thread_Idle_body
149 
150 /* Generated from spec:/rtems/config/if/get-idle-task-stack-size */
151 
157 #define rtems_configuration_get_idle_task_stack_size() _Thread_Idle_stack_size
158 
159 /* Generated from spec:/rtems/config/if/get-interrupt-stack-size */
160 
166 #define rtems_configuration_get_interrupt_stack_size() \
167  ((size_t) _ISR_Stack_size)
168 
169 /* Generated from spec:/rtems/config/if/get-maximum-extensions */
170 
178 
179 /* Generated from spec:/rtems/config/if/get-maximum-processors */
180 
194 #define rtems_configuration_get_maximum_processors() \
195  _SMP_Processor_configured_maximum
196 
197 /* Generated from spec:/rtems/config/if/get-microseconds-per-tick */
198 
205 #define rtems_configuration_get_microseconds_per_tick() \
206  _Watchdog_Microseconds_per_tick
207 
208 /* Generated from spec:/rtems/config/if/get-milliseconds-per-tick */
209 
216 #define rtems_configuration_get_milliseconds_per_tick() \
217  (_Watchdog_Microseconds_per_tick / 1000)
218 
219 /* Generated from spec:/rtems/config/if/get-nanoseconds-per-tick */
220 
227 #define rtems_configuration_get_nanoseconds_per_tick() \
228  _Watchdog_Nanoseconds_per_tick
229 
230 /* Generated from spec:/rtems/config/if/get-number-of-initial-extensions */
231 
238 #define rtems_configuration_get_number_of_initial_extensions() \
239  ((uint32_t) _User_extensions_Initial_count)
240 
241 /* Generated from spec:/rtems/config/if/get-stack-allocate-hook */
242 
248 #define rtems_configuration_get_stack_allocate_hook() _Stack_Allocator_allocate
249 
250 /* Generated from spec:/rtems/config/if/get-stack-allocate-init-hook */
251 
257 #define rtems_configuration_get_stack_allocate_init_hook() \
258  _Stack_Allocator_initialize
259 
260 /* Generated from spec:/rtems/config/if/get-stack-free-hook */
261 
267 #define rtems_configuration_get_stack_free_hook() _Stack_Allocator_free
268 
269 /* Generated from spec:/rtems/config/if/get-ticks-per-timeslice */
270 
277 #define rtems_configuration_get_ticks_per_timeslice() \
278  _Watchdog_Ticks_per_timeslice
279 
280 /* Generated from spec:/rtems/config/if/get-unified-work-area */
281 
288 #define rtems_configuration_get_unified_work_area() _Workspace_Is_unified
289 
290 /* Generated from spec:/rtems/config/if/get-user-extension-table */
291 
298 #define rtems_configuration_get_user_extension_table() \
299  _User_extensions_Initial_extensions
300 
301 /* Generated from spec:/rtems/config/if/get-user-multiprocessing-table */
302 
309 #if defined(RTEMS_MULTIPROCESSING)
310  #define rtems_configuration_get_user_multiprocessing_table() \
311  ( &_MPCI_Configuration )
312 #else
313  #define rtems_configuration_get_user_multiprocessing_table() NULL
314 #endif
315 
316 /* Generated from spec:/rtems/config/if/get-version-string */
317 
323 const char *rtems_get_version_string( void );
324 
325 /* Generated from spec:/rtems/config/if/get-work-space-size */
326 
333 #define rtems_configuration_get_work_space_size() \
334  (_Workspace_Size + \
335  (rtems_configuration_get_stack_allocator_avoids_work_space() ? \
336  0 : rtems_configuration_get_stack_space_size()))
337 
338 /* Generated from spec:/rtems/config/if/has-hardware-fp */
339 
346 #define RTEMS_HAS_HARDWARE_FP CPU_HARDWARE_FP
347 
348 /* Generated from spec:/rtems/config/if/resource-is-unlimited */
349 
360 #define rtems_resource_is_unlimited( _resource ) \
361  _Objects_Is_unlimited(_resource)
362 
363 /* Generated from spec:/rtems/config/if/resource-maximum-per-allocation */
364 
375 #define rtems_resource_maximum_per_allocation( _resource ) \
376  _Objects_Maximum_per_allocation(_resource)
377 
378 /* Generated from spec:/rtems/config/if/resource-unlimited */
379 
390 #define rtems_resource_unlimited( _resource ) \
391  ((_resource) | RTEMS_UNLIMITED_OBJECTS)
392 
393 /* Generated from spec:/rtems/config/if/stack-allocate-hook */
394 
401 
402 /* Generated from spec:/rtems/config/if/stack-allocate-init-hook */
403 
410 
411 /* Generated from spec:/rtems/config/if/stack-free-hook */
412 
419 
420 #ifdef __cplusplus
421 }
422 #endif
423 
424 #endif /* _RTEMS_CONFIG_H */
Stack_Allocator_initialize rtems_stack_allocate_init_hook
Thread stack allocator initialization handlers shall have this type.
Definition: config.h:409
Constants defined by the application configuration for the idle threads.
This header file defines types provided by the Classic API.
Memory Handler API.
User Extension Handler Data Structures.
uint32_t rtems_configuration_get_maximum_extensions(void)
Returns the maximum number of Classic API User Extensions which are configured for this application...
Data Related to the Management of Processor Interrupt Levels.
Constants and Structures Associated with the Object Handler.
This header file defines parts of the application configuration information API.
Stack_Allocator_allocate rtems_stack_allocate_hook
Thread stack allocator allocate handlers shall have this type.
Definition: config.h:400
SuperCore SMP Support API.
Stack_Allocator_free rtems_stack_free_hook
Thread stack allocator free handlers shall have this type.
Definition: config.h:418
uintptr_t rtems_configuration_get_stack_space_size(void)
Returns the thread stack space size in bytes of configured for this application.
SPARC CPU Department Source.
const char * rtems_get_version_string(void)
Returns the pointer to the RTEMS version string.
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.
Information About the Thread Stack Handler.
const char * rtems_get_copyright_notice(void)
Returns the pointer to the RTEMS copyright notice.
void *(* Stack_Allocator_allocate)(size_t stack_size)
Stack allocator allocate handler.
Definition: stack.h:75