[PATCH v2 00/44] Split up confdefs.h

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Feb 21 10:52:12 UTC 2020


This patch set splits up confdefs.h into component based header files.  See
also:

https://devel.rtems.org/ticket/3875

The goal is to make the 3000 LOC header file confdefs.h easier to review.  The
configuration header files are located in <rtems/confdefs/*.h>.

This patch set removes also the configuration options
CONFIGURE_HAS_OWN_INIT_TASK_TABLE, CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE,
and CONFIGURE_DISABLE_SMP_CONFIGURATION to simplify the configuration.

Please note that staring with the "config: Improve _Configure_From_workspace()"
there are no changes in the test suite.

I changed the license of the contents to BSD-2-Clause (except
<rtems/confdefs/libpci.h>) according to the file history and through a removal
of comments and other copyrightable content.

The new configuration header files are self-contained, e.g. the includes in
confdefs.h can be arbitrarily ordered.  They include all dependencies
explicitly.  I entangled the evaluation of the configuration options so that
there are no cyclic dependencies.

Sebastian Huber (44):
  config: Remove CONFIGURE_HAS_OWN_INIT_TASK_TABLE
  config: Simplify initialization task config
  rtems: Simplify _RTEMS_tasks_Initialize_user_task()
  config: Bring back RTEMS 4.11 configuration table
  config: Remove CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
  config: Add _Watchdog_Microseconds_per_tick
  config: Add _Watchdog_Ticks_per_timeslice
  config: Add _Thread_Idle_stack_size
  config: Add _Thread_Idle_body
  config: Add _Workspace_Size
  config: Add _Workspace_Is_unified
  config: Add _SMP_Processor_configure_maximum
  config: Add _SMP_Is_enabled
  libio: Add POSIX user environment to TCB
  score: Add _SMP_Need_inter_processor_interrupts()
  bsps/clock: Use _SMP_Get_processor_maximum()
  config: CONFIGURE_INIT_TASK_INITIAL_MODES
  score: _Scheduler_Is_non_preempt_mode_supported()
  rtems: Change timer server task mode setting
  config: Remove CONFIGURE_DISABLE_SMP_CONFIGURATION
  config: Improve _Configure_From_workspace()
  config: Remove _Configure_Max_Objects()
  config: Add <rtems/confdefs/obsolete.h>
  config: Add <rtems/confdefs/libpci.h>
  config: Add <rtems/confdefs/bsp.h>
  config: Add <rtems/confdefs/percpu.h>
  config: Add <rtems/confdefs/libio.h>
  config: Add <rtems/confdefs/scheduler.h>
  config: Add <rtems/confdefs/bdbuf.h>
  config: Add <rtems/confdefs/malloc.h>
  config: Add <rtems/confdefs/mcpi.h>
  config: Add <rtems/confdefs/clock.h>
  config: Add <rtems/confdefs/newlib.h>
  config: Add <rtems/confdefs/extensions.h>
  config: Add <rtems/confdefs/inittask.h>
  config: Add <rtems/confdefs/initthread.h>
  config: Add <rtems/confdefs/console.h>
  config: Add <rtems/confdefs/iodrivers.h>
  config: Add <rtems/confdefs/unlimited.h>
  config: Add <rtems/confdefs/threads.h>
  config: Add <rtems/confdefs/objectsclassic.h>
  config: Add <rtems/confdefs/wkspacesupport.h>
  config: Add <rtems/confdefs/objectsposix.h>
  config: Add <rtems/confdefs/wkspace.h>

 bsps/shared/dev/clock/clockimpl.h                  |    2 +-
 cpukit/Makefile.am                                 |    7 +
 cpukit/header-dirs.am                              |    2 +
 cpukit/headers.am                                  |   25 +-
 cpukit/include/rtems/confdefs.h                    | 3120 +-------------------
 cpukit/include/rtems/confdefs/bdbuf.h              |  161 +
 cpukit/include/rtems/confdefs/bsp.h                |   60 +
 cpukit/include/rtems/confdefs/clock.h              |  109 +
 cpukit/include/rtems/confdefs/console.h            |   85 +
 cpukit/include/rtems/confdefs/extensions.h         |  158 +
 cpukit/include/rtems/confdefs/inittask.h           |  131 +
 cpukit/include/rtems/confdefs/initthread.h         |   97 +
 cpukit/include/rtems/confdefs/iodrivers.h          |  166 ++
 cpukit/include/rtems/confdefs/libio.h              |  410 +++
 cpukit/include/rtems/confdefs/libpci.h             |   70 +
 cpukit/include/rtems/confdefs/malloc.h             |   72 +
 cpukit/include/rtems/confdefs/mpci.h               |  147 +
 cpukit/include/rtems/confdefs/newlib.h             |   72 +
 cpukit/include/rtems/confdefs/objectsclassic.h     |  127 +
 cpukit/include/rtems/confdefs/objectsposix.h       |  197 ++
 cpukit/include/rtems/confdefs/obsolete.h           |  234 ++
 cpukit/include/rtems/confdefs/percpu.h             |  158 +
 cpukit/include/rtems/confdefs/scheduler.h          |  370 +++
 cpukit/include/rtems/confdefs/threads.h            |  234 ++
 cpukit/include/rtems/confdefs/unlimited.h          |  143 +
 cpukit/include/rtems/confdefs/wkspace.h            |  182 ++
 cpukit/include/rtems/confdefs/wkspacesupport.h     |   64 +
 cpukit/include/rtems/config.h                      |  111 +-
 cpukit/include/rtems/libio_.h                      |    4 -
 cpukit/include/rtems/posix/config.h                |   60 -
 cpukit/include/rtems/posix/pthread.h               |   25 +-
 cpukit/include/rtems/posix/pthreadimpl.h           |    1 -
 cpukit/include/rtems/rtems/config.h                |   74 +-
 cpukit/include/rtems/rtems/tasksdata.h             |   19 +-
 cpukit/include/rtems/scheduler.h                   |   16 +
 cpukit/include/rtems/score/interr.h                |    2 +-
 cpukit/include/rtems/score/scheduler.h             |    8 +
 cpukit/include/rtems/score/schedulerimpl.h         |   18 +
 cpukit/include/rtems/score/smp.h                   |   13 +
 cpukit/include/rtems/score/smpimpl.h               |   15 +
 cpukit/include/rtems/score/thread.h                |    7 +
 cpukit/include/rtems/score/threadidledata.h        |   78 +
 cpukit/include/rtems/score/watchdogticks.h         |   21 +
 cpukit/include/rtems/score/wkspacedata.h           |   74 +
 cpukit/include/rtems/sysinit.h                     |    1 +
 cpukit/include/rtems/userenv.h                     |    6 +-
 cpukit/libcsupport/src/__usrenv.c                  |   14 +-
 cpukit/libcsupport/src/libio_init.c                |   11 -
 cpukit/libcsupport/src/mallocdirtydefault.c        |   34 +
 cpukit/libcsupport/src/mallocextenddefault.c       |   35 +
 cpukit/libcsupport/src/privateenv.c                |   67 +-
 cpukit/libmisc/monitor/mon-config.c                |    4 +-
 cpukit/libmisc/monitor/mon-itask.c                 |    8 +-
 cpukit/posix/src/pthread.c                         |    2 +
 cpukit/posix/src/pthreadinitthreads.c              |   75 +-
 cpukit/rtems/src/getapiconfig.c                    |   64 +
 cpukit/rtems/src/taskinitdefault.c                 |   34 +
 cpukit/rtems/src/taskinitusers.c                   |  103 +-
 cpukit/rtems/src/taskmode.c                        |   12 +-
 cpukit/rtems/src/timerserver.c                     |   12 +-
 cpukit/sapi/src/sysinitverbose.c                   |   10 +-
 cpukit/score/src/threadcreateidle.c                |    6 +-
 cpukit/score/src/threaddispatch.c                  |    2 +-
 cpukit/score/src/threadidledefault.c               |   35 +
 cpukit/score/src/threadinitialize.c                |    7 +-
 cpukit/score/src/watchdogtimeslicedefault.c        |   35 +
 cpukit/score/src/wkspaceisunifieddefault.c         |   34 +
 testsuites/ada/support/initimpl.h                  |    2 -
 testsuites/fstests/fsdosfsname01/init.c            |    1 -
 testsuites/fstests/imfs_support/fs_support.c       |    1 -
 testsuites/fstests/jffs2_support/fs_support.c      |    2 -
 testsuites/fstests/mdosfs_support/fs_support.c     |    1 -
 testsuites/fstests/mimfs_support/fs_support.c      |    1 -
 testsuites/fstests/mrfs_support/fs_support.c       |    1 -
 testsuites/libtests/block08/system.h               |    2 -
 testsuites/libtests/cpuuse/system.h                |    2 -
 testsuites/libtests/ftp01/init.c                   |    2 -
 testsuites/libtests/rtmonuse/system.h              |    1 -
 testsuites/libtests/termios05/init.c               |    2 -
 testsuites/psxtests/psxchroot01/main.c             |    2 -
 testsuites/psxtests/psxconfig01/init.c             |    2 +-
 testsuites/psxtests/psxfatal01/init.c              |   22 +-
 testsuites/psxtests/psxfatal02/init.c              |   40 +-
 testsuites/psxtests/psxmount/main.c                |    2 -
 testsuites/smptests/smpunsupported01/init.c        |    2 -
 testsuites/sptests/Makefile.am                     |    9 -
 testsuites/sptests/configure.ac                    |    1 -
 testsuites/sptests/sp01/system.h                   |    2 -
 testsuites/sptests/sp04/system.h                   |    2 -
 testsuites/sptests/sp07/system.h                   |    2 -
 testsuites/sptests/sp08/init.c                     |    2 -
 testsuites/sptests/sp12/system.h                   |    2 -
 testsuites/sptests/sp13/system.h                   |    2 -
 testsuites/sptests/sp14/system.h                   |    2 -
 testsuites/sptests/sp16/system.h                   |    2 -
 testsuites/sptests/sp20/system.h                   |    2 -
 testsuites/sptests/sp37/system.h                   |    2 -
 testsuites/sptests/sp54/init.c                     |   26 +-
 testsuites/sptests/sp65/sp65impl.h                 |    2 -
 testsuites/sptests/sp66/init.c                     |    1 +
 testsuites/sptests/spcbssched01/system.h           |    2 -
 testsuites/sptests/spcbssched02/system.h           |    2 -
 testsuites/sptests/spcbssched03/system.h           |    2 -
 testsuites/sptests/spedfsched01/system.h           |    2 -
 testsuites/sptests/spedfsched02/system.h           |    2 -
 testsuites/sptests/spedfsched03/system.h           |    2 -
 testsuites/sptests/spfatal01/init.c                |   33 +-
 testsuites/sptests/spfatal02/init.c                |   20 +-
 testsuites/sptests/spfatal04/init.c                |   20 -
 testsuites/sptests/spfatal05/init.c                |   20 -
 testsuites/sptests/spfatal06/init.c                |   24 +-
 testsuites/sptests/spfatal27/init.c                |   34 -
 testsuites/sptests/spfatal27/spfatal27.doc         |   23 -
 testsuites/sptests/spfatal27/spfatal27.scn         |    3 -
 testsuites/sptests/spfatal29/init.c                |    2 -
 testsuites/sptests/spfifo03/init.c                 |    2 -
 testsuites/sptests/spfifo05/init.c                 |    2 -
 .../spintrcritical06/spintrcritical06impl.h        |    2 -
 testsuites/sptests/spintrcritical15/init.c         |    2 -
 testsuites/sptests/spmrsp01/init.c                 |    2 -
 testsuites/sptests/spprivenv01/init.c              |    3 -
 testsuites/sptests/spsimplesched02/init.c          |    4 +-
 testsuites/sptests/spsysinit01/init.c              |   62 +-
 testsuites/tmtests/tm04/system.h                   |    2 -
 testsuites/tmtests/tm08/system.h                   |    2 -
 testsuites/tmtests/tm15/system.h                   |    2 -
 testsuites/tmtests/tm20/system.h                   |    2 -
 testsuites/tmtests/tm22/system.h                   |    2 -
 testsuites/tmtests/tm24/system.h                   |    2 -
 129 files changed, 4443 insertions(+), 3746 deletions(-)
 create mode 100644 cpukit/include/rtems/confdefs/bdbuf.h
 create mode 100644 cpukit/include/rtems/confdefs/bsp.h
 create mode 100644 cpukit/include/rtems/confdefs/clock.h
 create mode 100644 cpukit/include/rtems/confdefs/console.h
 create mode 100644 cpukit/include/rtems/confdefs/extensions.h
 create mode 100644 cpukit/include/rtems/confdefs/inittask.h
 create mode 100644 cpukit/include/rtems/confdefs/initthread.h
 create mode 100644 cpukit/include/rtems/confdefs/iodrivers.h
 create mode 100644 cpukit/include/rtems/confdefs/libio.h
 create mode 100644 cpukit/include/rtems/confdefs/libpci.h
 create mode 100644 cpukit/include/rtems/confdefs/malloc.h
 create mode 100644 cpukit/include/rtems/confdefs/mpci.h
 create mode 100644 cpukit/include/rtems/confdefs/newlib.h
 create mode 100644 cpukit/include/rtems/confdefs/objectsclassic.h
 create mode 100644 cpukit/include/rtems/confdefs/objectsposix.h
 create mode 100644 cpukit/include/rtems/confdefs/obsolete.h
 create mode 100644 cpukit/include/rtems/confdefs/percpu.h
 create mode 100644 cpukit/include/rtems/confdefs/scheduler.h
 create mode 100644 cpukit/include/rtems/confdefs/threads.h
 create mode 100644 cpukit/include/rtems/confdefs/unlimited.h
 create mode 100644 cpukit/include/rtems/confdefs/wkspace.h
 create mode 100644 cpukit/include/rtems/confdefs/wkspacesupport.h
 delete mode 100644 cpukit/include/rtems/posix/config.h
 create mode 100644 cpukit/include/rtems/score/threadidledata.h
 create mode 100644 cpukit/include/rtems/score/wkspacedata.h
 create mode 100644 cpukit/libcsupport/src/mallocdirtydefault.c
 create mode 100644 cpukit/libcsupport/src/mallocextenddefault.c
 create mode 100644 cpukit/rtems/src/getapiconfig.c
 create mode 100644 cpukit/rtems/src/taskinitdefault.c
 create mode 100644 cpukit/score/src/threadidledefault.c
 create mode 100644 cpukit/score/src/watchdogtimeslicedefault.c
 create mode 100644 cpukit/score/src/wkspaceisunifieddefault.c
 delete mode 100644 testsuites/sptests/spfatal27/init.c
 delete mode 100644 testsuites/sptests/spfatal27/spfatal27.doc
 delete mode 100644 testsuites/sptests/spfatal27/spfatal27.scn

-- 
2.16.4



More information about the devel mailing list