#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@…>

In 58864627/rtems:

config: Remove unused declaration and defines

Update #3875.

comment:2 Changed on 02/20/20 at 07:56:45 by Sebastian Huber <sebastian.huber@…>

In 874a5ef/rtems-docs:

c-user: Clarify CONFIGURE_MAXIMUM_PRIORITY

Update #3875.

comment:3 Changed on 02/24/20 at 06:32:45 by Sebastian Huber <sebastian.huber@…>

In 61a2b3e/rtems-docs:

c-user: Clarify filesystem configuration

Update #3875.

comment:4 Changed on 02/25/20 at 11:32:26 by Sebastian Huber <sebastian.huber@…>

In f6fcfea1/rtems:

mptests/mp14: Include missing header file

Include <mpci.h> for MPCI_Print_statistics().

Update #3875.

comment:5 Changed on 02/25/20 at 11:32:30 by Sebastian Huber <sebastian.huber@…>

In 5d1d348/rtems:

libtests/stackchk: Include missing header file

Update #3875.

comment:6 Changed on 02/25/20 at 11:32:33 by Sebastian Huber <sebastian.huber@…>

In 77ee827/rtems:

sptests/spcbssched03: Include missing header file

Update #3875.

comment:7 Changed on 02/25/20 at 11:32:52 by Sebastian Huber <sebastian.huber@…>

In b8648bd/rtems:

config: Add _Watchdog_Microseconds_per_tick

Move the microseconds per tick configuration constant out of the
configuration table.

Add WATCHDOG_MICROSECONDS_PER_TICK_DEFAULT and use it to provide a
default definition of the watchdog ticks constants.

Update #3875.

comment:8 Changed on 02/25/20 at 11:32:55 by Sebastian Huber <sebastian.huber@…>

In 308a2e0f/rtems:

config: Add _Watchdog_Ticks_per_timeslice

Move the ticks per timeslice configuration constant out of the
configuration table.

Add WATCHDOG_TICKS_PER_TIMESLICE_DEFAULT and use it to provide a default
definition of the watchdog ticks per timeslice constant.

Update #3875.

comment:9 Changed on 02/25/20 at 11:32:58 by Sebastian Huber <sebastian.huber@…>

In c70d112/rtems:

config: Add _Thread_Idle_stack_size

Move the idle thread stack size configuration constant out of the
configuration table.

Add THREAD_IDLE_STACK_SIZE_DEFAULT and use it to provide a default
definition of the idle thread stack size constant.

Update #3875.

comment:10 Changed on 02/25/20 at 11:33:01 by Sebastian Huber <sebastian.huber@…>

In 5180762c/rtems:

config: Add _Thread_Idle_body

Move the idle thread body configuration constant out of the
configuration table.

Provide a default definition of the idle thread body constant.

Update #3875.

comment:11 Changed on 02/25/20 at 11:33:04 by Sebastian Huber <sebastian.huber@…>

In ba7b2df7/rtems:

config: Add _Workspace_Size

Move the workspace size configuration constant out of the configuration
table.

Update #3875.

comment:12 Changed on 02/25/20 at 11:33:08 by Sebastian Huber <sebastian.huber@…>

In ad85c00/rtems:

config: Add _Workspace_Is_unified

Move the unified workspace configuration constant out of the
configuration table.

Provide a default definition of the unified workspace constant.

Update #3875.

comment:13 Changed on 02/25/20 at 11:33:11 by Sebastian Huber <sebastian.huber@…>

In 567455b6/rtems:

config: Add _SMP_Processor_configure_maximum

Move the processor maximum configuration constant out of the
configuration table.

Update #3875.

comment:14 Changed on 02/25/20 at 11:33:14 by Sebastian Huber <sebastian.huber@…>

In ba46b936/rtems:

config: Add _SMP_Is_enabled

Move the is SMP enabled configuration constant out of the
configuration table.

Since this was the last configuration constant in
rtems_configuration_table, remove this type.

Update #3875.

comment:15 Changed on 02/25/20 at 11:33:42 by Sebastian Huber <sebastian.huber@…>

In 0561cc1/rtems:

config: Remove _Configure_Max_Objects()

Use rtems_resource_maximum_per_allocation() directly. The use of
_Configure_Zero_or_one() was superfluous.

Update #3875.

comment:16 Changed on 02/25/20 at 11:33:45 by Sebastian Huber <sebastian.huber@…>

In cadd8d1/rtems:

config: Add <rtems/confdefs/obsolete.h>

Unify handling of obsolete configuration options. Remove comments and
copyrightable content from the moved content. Use BSD-2-Clause license
for new file.

Update #3053.
Update #3875.

comment:17 Changed on 02/25/20 at 11:33:49 by Sebastian Huber <sebastian.huber@…>

In 55a7316/rtems:

config: Add <rtems/confdefs/libpci.h>

Derive copyright and license for new file form the file history.

Update #3875.

comment:18 Changed on 02/25/20 at 11:33:52 by Sebastian Huber <sebastian.huber@…>

In f45d0b2f/rtems:

config: Add <rtems/confdefs/bsp.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:19 Changed on 02/25/20 at 11:33:55 by Sebastian Huber <sebastian.huber@…>

In 0f8e139e/rtems:

config: Add <rtems/confdefs/percpu.h>

Remove comments and copyrightable content from the moved content. Use
BSD-2-Clause for new file according to file history of
<rtems/confdefs.h>.

Update #3053.
Update #3875.

comment:20 Changed on 02/25/20 at 11:33:59 by Sebastian Huber <sebastian.huber@…>

In 1608221/rtems:

config: Add <rtems/confdefs/libio.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:21 Changed on 02/25/20 at 11:34:02 by Sebastian Huber <sebastian.huber@…>

In 591e9736/rtems:

config: Add <rtems/confdefs/scheduler.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:22 Changed on 02/25/20 at 11:34:06 by Sebastian Huber <sebastian.huber@…>

In 691b614/rtems:

config: Add <rtems/confdefs/bdbuf.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:23 Changed on 02/25/20 at 11:34:09 by Sebastian Huber <sebastian.huber@…>

In 03aff2c/rtems:

config: Add <rtems/confdefs/malloc.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Move the default configuration to library files so that application
configurations do not include the definitions for the default case.

Update #3053.
Update #3875.

comment:24 Changed on 02/25/20 at 11:34:13 by Sebastian Huber <sebastian.huber@…>

In 1d35bf2a/rtems:

config: Add <rtems/confdefs/mcpi.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:25 Changed on 02/25/20 at 11:34:17 by Sebastian Huber <sebastian.huber@…>

In 32561f5/rtems:

config: Add <rtems/confdefs/clock.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:26 Changed on 02/25/20 at 11:34:20 by Sebastian Huber <sebastian.huber@…>

In fb0caca/rtems:

config: Add <rtems/confdefs/newlib.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:27 Changed on 02/25/20 at 11:34:23 by Sebastian Huber <sebastian.huber@…>

In 8f3419b/rtems:

config: Add <rtems/confdefs/extensions.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:28 Changed on 02/25/20 at 11:34:27 by Sebastian Huber <sebastian.huber@…>

In b15d1cb/rtems:

config: Add <rtems/confdefs/inittask.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:29 Changed on 02/25/20 at 11:34:30 by Sebastian Huber <sebastian.huber@…>

In 8314933/rtems:

config: Add <rtems/confdefs/initthread.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:30 Changed on 02/25/20 at 11:34:34 by Sebastian Huber <sebastian.huber@…>

In fe84ab5/rtems:

config: Add <rtems/confdefs/console.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:31 Changed on 02/25/20 at 11:34:37 by Sebastian Huber <sebastian.huber@…>

In 7b6596f5/rtems:

config: Add <rtems/confdefs/iodrivers.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:32 Changed on 02/25/20 at 11:34:41 by Sebastian Huber <sebastian.huber@…>

In 40db051/rtems:

config: Add <rtems/confdefs/unlimited.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:33 Changed on 02/25/20 at 11:34:44 by Sebastian Huber <sebastian.huber@…>

In f5a2fd86/rtems:

config: Add <rtems/confdefs/threads.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:34 Changed on 02/25/20 at 11:34:48 by Sebastian Huber <sebastian.huber@…>

In d20209b/rtems:

config: Add <rtems/confdefs/objectsclassic.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:35 Changed on 02/25/20 at 11:34:51 by Sebastian Huber <sebastian.huber@…>

In 35e58c45/rtems:

config: Add <rtems/confdefs/wkspacesupport.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:36 Changed on 02/25/20 at 11:34:55 by Sebastian Huber <sebastian.huber@…>

In 1fb1cf1/rtems:

config: Add <rtems/confdefs/objectsposix.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Update #3053.
Update #3875.

comment:37 Changed on 02/25/20 at 11:34:59 by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In a78495ed/rtems:

config: Add <rtems/confdefs/wkspace.h>

Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.

Change licence of <rtems/confdefs.h> to BSD-2-Clause according to file
history.

Update #3053.
Close #3875.

comment:38 Changed on 02/25/20 at 13:03:49 by Sebastian Huber <sebastian.huber@…>

In 470dfa1f/rtems:

config: Resurrect NULL_DRIVER_TABLE_ENTRY

This define may be used by application configurations for the
CONFIGURE_APPLICATION_EXTRA_DRIVERS definition.

Update #3875.

comment:39 Changed on 03/04/20 at 08:26:38 by Sebastian Huber <sebastian.huber@…>

In fdeaa64/rtems:

config: Remove <rtems/btimer.h> include

The use of CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER does not define
anything, so remove the <rtems/btimer.h> include.

Update #3875.

comment:40 Changed on 04/14/20 at 14:30:16 by Sebastian Huber <sebastian.huber@…>

In 4f32722/rtems:

config: Fix typo

Update #3875.

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:

config: CONFIGURE_DISABLE_BSP_SETTINGS

Evaluate CONFIGURE_DISABLE_BSP_SETTINGS for each affected application
configuration option. This makes the code easier to review since the influence
of CONFIGURE_DISABLE_BSP_SETTINGS is locally visible in the code.

Update #3875.

comment:43 Changed on 11/17/21 at 08:12:17 by Sebastian Huber <sebastian.huber@…>

In c47daf6f/rtems:

config: Fix IO driver table initialization

Check all IO driver table configuration options which are used to initialize
_IO_Driver_address_table[]. Checks for the following settings were missing:

  • CONFIGURE_BSP_PREREQUISITE_DRIVERS
  • CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS
  • CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER
  • CONFIGURE_APPLICATION_EXTRA_DRIVERS

Update #3875.

Note: See TracTickets for help on using tickets.