Commit Graph

785 Commits

Author SHA1 Message Date
Sebastian Huber
2d0bc839ed build: Remove EXTRA_DIST
A "make dist" is not supported. So, it makes no sense to have pure "make
dist" related stuff in the Makefile.am.
2018-04-04 10:09:04 +02:00
Chris Johns
2afb22b7e1 Remove make preinstall
A speciality of the RTEMS build system was the make preinstall step.  It
copied header files from arbitrary locations into the build tree.  The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

* The make preinstall step itself needs time and disk space.

* Errors in header files show up in the build tree copy.  This makes it
  hard for editors to open the right file to fix the error.

* There is no clear relationship between source and build tree header
  files.  This makes an audit of the build process difficult.

* The visibility of all header files in the build tree makes it
  difficult to enforce API barriers.  For example it is discouraged to
  use BSP-specifics in the cpukit.

* An introduction of a new build system is difficult.

* Include paths specified by the -B option are system headers.  This
  may suppress warnings.

* The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step.   All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc.  Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

* cpukit/include

* cpukit/score/cpu/@RTEMS_CPU@/include

* cpukit/libnetworking

The new BSP include directories are:

* bsps/include

* bsps/@RTEMS_CPU@/include

* bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed.  The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.
2018-01-25 08:45:26 +01:00
Sebastian Huber
9526b0349c confdefs: Replace RTEMS 4.12 with 5.1
Update #3220.
2017-12-06 19:20:06 +01:00
Sebastian Huber
bc5b56ad41 libio: Use API mutex 2017-12-06 07:13:04 +01:00
Sebastian Huber
98b52e3517 drvmgr: Use API mutex 2017-12-06 07:13:04 +01:00
Sebastian Huber
6c2b8a4b35 score: Use self-contained API mutex
Use a self-contained recursive mutex for API_Mutex_Control.  The API
mutexes are protected against asynchronous thread cancellation.

Add dedicated mutexes for libatomic and TOD.

Close #2629.
Close #2630.
2017-12-04 10:53:39 +01:00
Joel Sherrill
7b8c5b0def sapi/src/panic.c: Add include of <rtems/bspIo.h> 2017-11-29 13:03:40 -06:00
Sebastian Huber
15e19273b2 sapi: New implementation of rtems_panic()
The previous rtems_panic() implementation was quite heavy weight.  It
depended on _exit() which calls the global destructors.  It used
fprintf(stderr, ...) for output which depends on an initialized console
device and the complex fprintf().

Introduce a new fatal source RTEMS_FATAL_SOURCE_PANIC for rtems_panic()
and output via vprintk().

Update #3244.
2017-11-22 09:40:23 +01:00
Christian Mauderer
ddc339c51f cpukit: Add _arc4random_getentropy_fail.
Add a default implementation of _arc4random_getentropy_fail with an
internal error.

Update #3239.
2017-11-17 07:26:41 +01:00
Chris Johns
631f711598 build: Fix the dependence for the generating the key file.
Update #3217.
2017-11-14 07:03:50 +01:00
Martin Erik Werner
f5b3c0244c Fix bashism in vc-key.sh
Change "==" to "=", since "==" for comparison is not available in POSIX
sh.

Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com>
2017-11-13 08:13:16 +11:00
Chris Johns
6f3fb8a547 cpukit: Add a Version API.
Provide functions to get the version string, major, minor and revision
numbers and the version control identifer that is a unique tag for
the version control system.

Update #3199.
2017-11-10 13:34:06 +11:00
Sebastian Huber
ac28f1588d Add simple console driver
Update #3170.
Update #3199.
2017-11-06 07:25:51 +01:00
Sebastian Huber
0ddffb766c confdefs: CONFIGURE_MICROSECONDS_PER_TICK
Reject non-positive CONFIGURE_MICROSECONDS_PER_TICK values.
2017-10-25 07:26:41 +02:00
Sebastian Huber
cea5ff7001 score: Add _Watchdog_Nanoseconds_per_tick
Move it from the configuration to a separate variable.

Update #3117.
Update #3182.
2017-10-24 09:37:28 +02:00
Sebastian Huber
7ed377bc69 score: _Watchdog_Is_far_future_monotonic_timespec
Update #3117.
Update #3182.
2017-10-24 09:37:28 +02:00
Sebastian Huber
381ef5c833 confdefs: Warn about problematic ticks per second
A non-integer clock ticks per second value may lead to inaccurate time
format conversions.

Update #3117.
Update #3182.
2017-10-24 09:37:27 +02:00
Sebastian Huber
27cfe7c86b score: Add _Watchdog_Ticks_per_second
This value is frequently used.  Avoid the function call overhead and the
integer division at run-time.

Update #3117.
Update #3182.
2017-10-24 09:37:22 +02:00
Sebastian Huber
9c0cefbfa5 confdefs: Add warnings for obsolete options
Update #2674.
Close #3112.
Close #3113.
Close #3114.
Close #3115.
Close #3116.
2017-10-12 07:13:38 +02:00
Sebastian Huber
587afc3400 confdefs: Fix typo 2017-10-06 14:20:00 +02:00
Sebastian Huber
de59c065c5 posix: Implement self-contained POSIX mutex
POSIX mutexes are now available in all configurations and no longer
depend on --enable-posix.

Update #2514.
Update #3112.
2017-10-05 14:29:02 +02:00
Sebastian Huber
5222488573 posix: Implement self-contained POSIX condvar
POSIX condition variables are now available in all configurations and no
longer depend on --enable-posix.

Update #2514.
Update #3113.
2017-10-05 14:29:02 +02:00
Sebastian Huber
89fc9345de posix: Implement self-contained POSIX rwlocks
POSIX rwlocks are now available in all configurations and no longer
depend on --enable-posix.

Update #2514.
Update #3115.
2017-10-05 14:29:02 +02:00
Sebastian Huber
e67929c4c0 posix: Implement self-contained POSIX barriers
POSIX barriers are now available in all configurations and no longer
depend on --enable-posix.

Update #2514.
Update #3114.
2017-10-05 14:29:01 +02:00
Sebastian Huber
c090db7405 posix: Implement self-contained POSIX semaphores
For semaphore object pointer and object validation see
POSIX_SEMAPHORE_VALIDATE_OBJECT().

Destruction or close of a busy semaphore returns an error status.  The
object is not flushed.

POSIX semaphores are now available in all configurations and no longer
depend on --enable-posix.

Update #2514.
Update #3116.
2017-10-05 14:29:01 +02:00
Sebastian Huber
e0660391fa confdefs: Fix POSIX keys configuration
Remove the OBJECTS_UNLIMITED_OBJECTS flag for the memory size
configuration.

Update #3105.
2017-08-22 08:02:15 +02:00
Sebastian Huber
600d88dfd7 INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT
Add new fatal error INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT.

Update #3077.
2017-07-25 11:41:11 +02:00
Sebastian Huber
21389c0613 score: Make EDF the default SMP scheduler
The EDF SMP scheduler supports simple thread processor affinities
(see #3059) with a small run-time overhead. The current default SMP
scheduler lacks support for thread processor affinities at all. The EDF
SMP scheduler offers a good feature set for most applications. So, use
it by default. Run-time libraries like libgomp, MTAPI, work stealing
schedulers, language interpreters (e.g. Erlang virtual machine),
maintainence of per-processor data (e.g. Universal Memory Allocator
(UMA)), etc. use a one-to-one thread processor affinity for example.

Update #3063.
2017-07-10 07:49:40 +02:00
Sebastian Huber
34487537ce score: Add simple affinity support to EDF SMP
Update #3059.
2017-07-10 07:49:36 +02:00
Sebastian Huber
f3d9f2288e score: Add SMP EDF scheduler
Update #3056.
2017-06-29 11:28:32 +02:00
Sebastian Huber
6bc63df199 confdefs.h: Add SMP enabled field to configuration
Do not use the processor count to determine if SMP is enabled.  Instead
use a dedicated configuration option.  Enable SMP by default in SMP
configurations.

Add CONFIGURE_DISABLE_SMP_CONFIGURATION to all test which would fail
otherwise.

Update #3001.
2017-05-16 09:48:32 +02:00
Sebastian Huber
0b8084c298 confdefs.h: Fix compile error in non-SMP cfg
Bug introduced by f778b7f3f1.

Update #3001.
2017-05-16 09:48:32 +02:00
Sebastian Huber
f778b7f3f1 confdefs.h: Use SMP scheduler only if necessary
Update #3001.
2017-05-12 08:35:36 +02:00
Sebastian Huber
1309718114 confdefs.h: CONFIGURE_DISABLE_SMP_CONFIGURATION
Enable the SMP configuration by default in case SMP is enabled.  Add
configuration option CONFIGURE_DISABLE_SMP_CONFIGURATION to disable it
explicitly.

Add CONFIGURE_DISABLE_SMP_CONFIGURATION to all test which would fail
otherwise.

Update #3001.
2017-05-11 11:40:44 +02:00
Gedare Bloom
87de70a298 posix/mman: add mmap support for shm objects
Update #2859.
2017-05-05 10:34:08 -04:00
Sebastian Huber
c847451b56 sapi: Fix warnings 2017-02-15 13:22:56 +01:00
Sebastian Huber
54835ae9b3 Rename CONFIGURE_SMP_MAXIMUM_PROCESSORS
Rename CONFIGURE_SMP_MAXIMUM_PROCESSORS to CONFIGURE_MAXIMUM_PROCESSORS
since the SMP part is superfluous.

Update #2894.
2017-02-14 09:52:05 +01:00
Sebastian Huber
07d71279b4 Prefix confdefs.h internal def with an underscore
Close #2895.
2017-02-03 11:14:58 +01:00
Sebastian Huber
d4ff66e423 confdefs.h: Simplify 2017-02-03 08:44:27 +01:00
Kevin Kirspel
f9db6fd63d confdefs.h: Only define _CONFIGURE_SMP_APPLICATION if RTEMS_SMP defined 2017-02-02 16:44:31 -06:00
Sebastian Huber
f95fa38764 Remove CONFIGURE_SMP_APPLICATION
Enable the SMP support if CONFIGURE_SMP_MAXIMUM_PROCESSORS > 1.

Update #2893.
2017-02-02 09:07:08 +01:00
Sebastian Huber
d1505a19c7 sapi: Add rtems_task_terminate_extension 2017-01-26 11:05:00 +01:00
Gedare Bloom
ba77628250 posix: shared memory support
Add POSIX shared memory manager (Shm). Includes a hook-based
approach for the backing memory storage that defaults to the
Workspace, and a test is provided using the heap. A test is
also provided for the basic use of mmap'ing a shared memory
object. This test currently fails at the mmap stage due to
no support for mmap.
2017-01-13 11:17:30 -05:00
Sebastian Huber
da6ad56a68 score: Add _Thread_Set_name()
Add configuration option CONFIGURE_MAXIMUM_THREAD_NAME_SIZE.

Update #2858.
2017-01-13 08:10:28 +01:00
Sebastian Huber
eae4541d7b Clarify simple timecounter documentation 2016-12-21 09:27:19 +01:00
Sebastian Huber
e203b65e51 Add INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED
Update #2825.
2016-12-12 08:03:30 +01:00
Sebastian Huber
a5ba08eb4f Add INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED
Update #2825.
2016-12-12 08:03:30 +01:00
Sebastian Huber
9622f7796f Add INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED
Update #2825.
2016-12-12 08:03:30 +01:00
Sebastian Huber
8252968812 INTERNAL_ERROR_LIBIO_USER_ENV_KEY_CREATE_FAILED
Update #2825.
2016-12-12 08:03:29 +01:00
Sebastian Huber
0a81a58254 Add INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED
Update #2825.
2016-12-12 08:03:29 +01:00