#3875 closed task (fixed)
Split up confdefs.h in component based header files
Reported by: | Sebastian Huber | Owned by: | Sebastian Huber |
---|---|---|---|
Priority: | normal | Milestone: | 5.1 |
Component: | config | Version: | 5 |
Severity: | normal | Keywords: | qualification |
Cc: | Blocked By: | ||
Blocking: |
Description
The confdefs.h header file is large, complex, and hard to review. Split it up into component header files to make it easier to maintain and review.
The general approach is to place the default configuration of things in
librtemscpu.a. The benefit is that the application configuration object file
will only include data structures which have a user-defined value.
The component based header files include their dependencies explicitly. It
should be possible to include component based header files separately to ease
testing. For example we could use this template:
#ifndef _RTEMS_CONFDEFS_FOOBAR_H #define _RTEMS_CONFDEFS_FOOBAR_H #ifndef __CONFIGURATION_TEMPLATE_h #error "Do not include this file directly, use <rtems/confdefs.h> instead" #endif #if defined(CONFIGURE_INIT) && \ defined(CONFIGURE_FOOBAR_STUFF) && \ defined(CONFIGURE_MORE_FOOBAR_STUFF) /* Foobar includes */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* Configure foobar. */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* CONFIGURE_INIT */ #endif /* _RTEMS_CONFDEFS_FOOBAR_H */
In case CONFIGURE_INIT is not defined, then including <rtems/confdefs.h> should
expose nothing to the C compiler.
Here is a first proposal to group the configuration in components:
rtems/ confdefs.h This file just includes the component based header files listed below. confdefs/ bdbuf.h classicobj.h Classic API objects classictasksinit.h Classic initialization task driverclock.h Clock driver and related configuration, e.g. CONFIGURE_MICROSECONDS_PER_TICK driverconsolesimple.h Simple console driver configuration driverlegacy.h Legacy IO driver configuration table extensions.h User extensions, internal extensions filesystem.h Filesystem configuration general.h Basic stuff which is mandatory to configure, e.g. ISR stacks, per-CPU information libpci.h PCI library configuration malloc.h Malloc configuration mpci.h MPCI specific configuration options msgq.h General message queue configuration obsolete.h Warning about the use of obsolete configure options posixkeys.h POSIX keys posixobj.h POSIX objects posixthreadsinit.h POSIX initialization threads scheduler.h Scheduler configuration support.h Support macros for confdefs header files threads.h General thread configuration (e.g. thread control block) unlimited.h Unlimited objects configuration
Change History (43)
comment:1 Changed on 02/17/20 at 07:47:03 by Sebastian Huber <sebastian.huber@…>
comment:2 Changed on 02/20/20 at 07:56:45 by Sebastian Huber <sebastian.huber@…>
comment:3 Changed on 02/24/20 at 06:32:45 by Sebastian Huber <sebastian.huber@…>
comment:10 Changed on 02/25/20 at 11:33:01 by Sebastian Huber <sebastian.huber@…>
In 5180762c/rtems:
comment:11 Changed on 02/25/20 at 11:33:04 by Sebastian Huber <sebastian.huber@…>
In ba7b2df7/rtems:
comment:13 Changed on 02/25/20 at 11:33:11 by Sebastian Huber <sebastian.huber@…>
In 567455b6/rtems:
comment:14 Changed on 02/25/20 at 11:33:14 by Sebastian Huber <sebastian.huber@…>
In ba46b936/rtems:
comment:18 Changed on 02/25/20 at 11:33:52 by Sebastian Huber <sebastian.huber@…>
In f45d0b2f/rtems:
comment:19 Changed on 02/25/20 at 11:33:55 by Sebastian Huber <sebastian.huber@…>
In 0f8e139e/rtems:
comment:21 Changed on 02/25/20 at 11:34:02 by Sebastian Huber <sebastian.huber@…>
In 591e9736/rtems:
comment:24 Changed on 02/25/20 at 11:34:13 by Sebastian Huber <sebastian.huber@…>
In 1d35bf2a/rtems:
comment:31 Changed on 02/25/20 at 11:34:37 by Sebastian Huber <sebastian.huber@…>
In 7b6596f5/rtems:
comment:33 Changed on 02/25/20 at 11:34:44 by Sebastian Huber <sebastian.huber@…>
In f5a2fd86/rtems:
comment:35 Changed on 02/25/20 at 11:34:51 by Sebastian Huber <sebastian.huber@…>
In 35e58c45/rtems:
comment:37 Changed on 02/25/20 at 11:34:59 by Sebastian Huber <sebastian.huber@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
In a78495ed/rtems:
comment:38 Changed on 02/25/20 at 13:03:49 by Sebastian Huber <sebastian.huber@…>
In 470dfa1f/rtems:
comment:41 Changed on 06/23/21 at 07:07:55 by Sebastian Huber
Keywords: | qualification added |
---|
comment:42 Changed on 11/17/21 at 08:12:13 by Sebastian Huber <sebastian.huber@…>
In 32cee883/rtems:
comment:43 Changed on 11/17/21 at 08:12:17 by Sebastian Huber <sebastian.huber@…>
In c47daf6f/rtems:
In 58864627/rtems: