Commit Graph

864 Commits

Author SHA1 Message Date
Sebastian Huber
aedd92d147 score: Add stack free handler to TCB
This avoids a dependency to the stack free function in the thread
destruction.

Update #3959.
2020-08-31 17:30:17 +02:00
Sebastian Huber
d8172209b3 score: Add _Stack_Allocator_do_initialize()
Do the stack allocator initialization and sanity check only if a
user-provided stack allocator was configured.  This avoids a dependency
of _Thread_Handler_initialization() on the stack allocator.

Update #3959.
2020-08-31 17:30:17 +02:00
Sebastian Huber
354c2b50a3 score: Add <rtems/score/freechainimpl.h>
Hide implementation details.

Update #3959.
2020-08-31 17:30:17 +02:00
Sebastian Huber
91c811a132 score: Add _Freechain_Push()
Update #3959.
2020-08-31 17:30:17 +02:00
Sebastian Huber
ced28f2cfc config: Provide file descriptors only if necessary
Only provide the file descriptor array if
CONFIGURE_MAXIMUM_FILE_DESCRIPTORS > 0.  If someone configured
CONFIGURE_MAXIMUM_FILE_DESCRIPTORS == 0 and the appplication uses
something which requires a file descriptor, then a linker error will
show up.  An alternative would be to add a zero-length array
rtems_libio_iops[ 0 ] to librtemscpu.a which would be used in this
case.

Conditionally include some header files.
2020-08-31 16:19:57 +02:00
Sebastian Huber
c7e30854f2 rtems: Add _RTEMS_Name_to_id()
Simplify object name to identifier directives.  Using
_RTEMS_Name_to_id() to implement the directives enables a tail call
optimization.

Change license to BSD-2-Clause according to file history.

Update #3053.
2020-08-31 16:19:57 +02:00
Sebastian Huber
33dbb3355f score: Constify objects name to id functions 2020-08-31 16:19:57 +02:00
Sebastian Huber
a7a0a36461 config: Conditionally include header 2020-08-21 10:33:50 +02:00
Sebastian Huber
81efe37c35 confdefs: Fix cyclic dependency
Close #4061.
2020-08-21 08:57:09 +02:00
Sebastian Huber
05d5772c1c ada: Add missing attributes 2020-08-19 06:48:32 +02:00
Sebastian Huber
593a67f6c8 rtems: Use unique option values
The RTEMS_BARRIER_AUTOMATIC_RELEASE and RTEMS_BINARY_SEMAPHORE options
had the same value.  In order to better detect a misuse of option values
(for example using RTEMS_BINARY_SEMAPHORE for rtems_barrier_create()),
the options should have unique values.

Close #4054.
2020-08-19 06:48:32 +02:00
Sebastian Huber
c728948434 libtest: Add T_push_plan() and T_pop_plan()
Update #3199.
2020-08-18 07:08:51 +02:00
Sebastian Huber
72960bc7d4 libtest: Change T_step() and T_assert_step()
Normally, the expected test step must be a compile time constant.  Allow
variable expected test steps for the T_step() and T_assert_step().  This
can be used for parameterized test loops with individual fixtures.

Remove the ability to use custom failure messages due to some
implementation constraints.

Update #3199.
2020-08-18 07:08:51 +02:00
Sebastian Huber
5383d4db04 libtest: Add fixture steps
Support a new test plan for each nested fixture.

Update #3199.
2020-08-18 07:08:51 +02:00
Sebastian Huber
5d614fdfa7 libtest: Add T_puts()
Update #3199.
2020-08-18 07:08:51 +02:00
Sebastian Huber
5a8114c6c5 libtest: Change fixture scope method
Return the produced character count.  There is no need for a NUL
termination.

Update #3199.
2020-08-18 07:08:51 +02:00
Aschref Ben Thabet
5869c64793 rtems/printer.h Fix build warnings -Wclass-memaccess 2020-08-17 11:59:00 +02:00
Sebastian Huber
c1354f0514 libtest: Add T_thread_switch_record()
Add support to record thread switch events.  This can be used to check
that a blocking operation results in the expected sequence of thread
switches.

Update #3199.
2020-08-11 08:03:47 +02:00
Sebastian Huber
6894e2f4b5 Remove accidentally committed file 2020-08-06 19:45:15 +02:00
Sebastian Huber
d2c98c1104 dev/sc16is752: Fix declaration 2020-08-05 09:18:27 +02:00
Sebastian Huber
9566538823 termios: Make rtems_termios_ttyMutex private
This mutex is used to maintain termios internal data structures.
2020-08-04 15:48:32 +02:00
Sebastian Huber
2ae557eb04 score: Use flexible-array member for C99 and later
This addresses compiler warnings like this:

warning: array subscript 0 is outside the bounds of an interior
zero-length array 'abc[0]' [-Wzero-length-bounds]
2020-08-04 15:48:32 +02:00
Christian Mauderer
87fdb206fa dosfs: Fix memory leak on failed mounts.
Currently if mount fails, a converter isn't destroyed. We have to take
care of two cases:

1. The user doesn't provide a converter.

In this case mounting a dosfs creates a default converter. This patch
makes sure that the converter is destroyed again if mount failes for
this case.

2. The user provides a converter.

In this case it's not sure that the dosfs specific routines are reached
because mount can fail before that. Therefore the user has to destroy
the converter himself again. This patch adds a documentation for that
and implements it in the media server.

Closes #4042.
2020-08-04 08:24:17 +02:00
Sebastian Huber
c60942ea5b rtems: Add rtems_interrupt_server_create()
Add rtems_interrupt_server_destroy().

Before this patch, the only way to create interrupt servers was
rtems_interrupt_server_initialize(). This function creates the default
interrupt server and in SMP configurations additional interrupt servers
for the additional processors. The interrupt server is heavily used by
libbsd. This includes the epoch based reclamation which performs time
consuming resource and memory deallocation work. This does not work well
with time critical services, for example an UART over SPI or I2C. One
approach to address this problem is to allow the application to create
custom interrupt servers with the right priority and task properties.
The interrupt server API accounted for this, however, it was not
implemented before this patch.

Close #4034.
2020-08-03 08:52:41 +02:00
Sebastian Huber
6f94a830bd score: Add RTEMS_WEAK
Update #4032.
2020-07-24 07:12:58 +02:00
Sebastian Huber
cc3fd8fcf1 libtest: Add T_interrupt_test()
Update #3199.
2020-07-23 09:27:47 +02:00
Sebastian Huber
c9d2405848 libtest: Add rtems_test_run()
Update #3199.
2020-07-23 09:27:47 +02:00
Sebastian Huber
dddc9a5818 libtest: Add quiet assert NULL pointer checks
Update #3199.
2020-07-23 09:27:47 +02:00
Sebastian Huber
467ef5b431 libtest: Add T_unreachable()
Update #3199.
2020-07-23 09:27:47 +02:00
Sebastian Huber
d702c9f47d libtest: Make check message optional
This macro magic is in line with C11 and C++11, but limits the maximum
count of arguments.

Update #3199.
2020-07-23 09:27:47 +02:00
Sebastian Huber
35d9af6901 libtest: Add T_CHECK_FMT
Rename internal function T_check_true() to T_check() and use the new
flag T_CHECK_FMT to indicate if a format string is present.  This is a
preparation step to make the format string optional.

Make the check context the first parameter.

The API remains the same.

Update #3199.
2020-07-23 09:27:47 +02:00
Sebastian Huber
7781404026 libtest: Add T_stop()
Update #3199.
2020-07-23 09:27:47 +02:00
Sebastian Huber
63e4278429 libtest: Add T_get_scope()
Update #3199.
2020-07-23 09:27:47 +02:00
Sebastian Huber
cb3c6bdc0f libtest: Add push/pop fixture support
Update #3199.
2020-07-23 09:27:47 +02:00
Sebastian Huber
6b27e3251e libtest: Support custom scope messages via fixture
Update #3199.
2020-07-23 09:27:47 +02:00
Sebastian Huber
c081c68d34 libtest: Add T_make_runner()
Update #3199.
2020-07-23 09:27:47 +02:00
Sebastian Huber
af9266541f libtest: Add T_get_one_clock_tick_busy()
Update #3199.
2020-07-23 09:27:47 +02:00
Sebastian Huber
e3e3b871ee libtest: Add T_busy()
Update #3199.
2020-07-23 09:27:47 +02:00
Sebastian Huber
361404e87d libtest: Move <t.h> to <rtems/test.h>
Update #3199.
2020-07-23 09:27:45 +02:00
Sebastian Huber
9de8d61a9a libtest: <rtems/test.h> to <rtems/test-info.h>
Rename this header file to later move <t.h> to <rtems/test.h>.  The main
feature provided by <rtems/test-info.h> is the output of standard test
information which is consumed by the RTEMS Tester.

Update #3199.
2020-07-23 09:27:10 +02:00
Sebastian Huber
1fab9726c9 score: Improve _Thread_Start() description 2020-07-21 17:13:47 +02:00
Christian Mauderer
3a95a07d88 media-server: Add ability for retry.
This adds the possibility to request a retry in the media-listener if an
operation failed. Usefull for example if you want to automatically
reformat a disk if it wasn't possible to mount it.
2020-07-17 08:12:37 +02:00
Sebastian Huber
a3ed421939 score: Remove deprecated Thread
This type was deprecated in RTEMS 5.1.

Close #3991.
2020-07-14 07:25:48 +02:00
Sebastian Huber
53a5af2155 rtems: Remove deprecated proc_ptr definition
Close #3586.
2020-07-14 07:25:47 +02:00
Sebastian Huber
2adf328d05 rtems: Remove support for RTEMS_DEPRECATED_TYPES
Close #3584.
2020-07-14 07:25:47 +02:00
Sebastian Huber
312fcf2fd4 rtems: Remove rtems_thread_cpu_usage_t
This type was deprecated in RTEMS 5.1.

Close #3594.
2020-07-14 07:25:47 +02:00
Sebastian Huber
1546b1c01d rtems: Remove region_information_block
This type was deprecated in RTEMS 5.1.

Close #3592.
2020-07-14 07:25:47 +02:00
Sebastian Huber
f8998f19da rtems: Remove rtems_context_fp
This type was deprecated in RTEMS 5.1.

Close #3590.
2020-07-14 07:25:47 +02:00
Sebastian Huber
df2dac388d rtems: Remove rtems_context
This type was deprecated in RTEMS 5.1.

Close #3588.
2020-07-14 07:25:47 +02:00
Sebastian Huber
65dc040bfb rtems: Remove rtems_rate_monotonic_period_time_t
This type was deprecated in RTEMS 5.1.

Close #3596.
2020-07-14 07:25:47 +02:00