Commit Graph

29503 Commits

Author SHA1 Message Date
Pavel Pisa
8dcb8837f3 MAINTAINERS: added self 2016-06-24 11:23:46 +02:00
Sebastian Huber
a4a307dfbd score: Fix _Scheduler_EDF_Yield()
A non-preemptive task must yield if it says so.
2016-06-24 10:28:02 +02:00
Sebastian Huber
51e008dda1 posix: Fix pthread_create()
Do not access data of the executing thread without proper locks.
2016-06-24 10:28:02 +02:00
Sebastian Huber
b364d386c9 sptests/spintrcritical23: Explicity set scheduler
This test uses scheduler-specific data structures, thus it must use the
right scheduler.
2016-06-24 10:27:53 +02:00
Sebastian Huber
b679b4929d sptests/sp42: Relax priority requirements 2016-06-23 10:36:23 +02:00
Sebastian Huber
93f158f943 score: Fix EDF no-preempt thread handling 2016-06-23 10:36:23 +02:00
Sebastian Huber
ec5d95e15e smptests/smpmrsp01: Fix due to API changes
Commit 77ff5599e0 introduced a change in
the rtems_semaphore_create() behaviour for MrsP semaphores.  The ceiling
priorities for all schedulers except the scheduler of the executing
thread are initialized to zero.
2016-06-23 10:36:22 +02:00
Alexander Krutwig
0c1413c284 bsp/atsam: Add I2C driver 2016-06-23 07:54:20 +02:00
Alexander Krutwig
0fddefe65b bsp/atsam: Fix QSPI driver API
We support read/write of arbitrary buffers.
2016-06-22 16:09:01 +02:00
Alexander Krutwig
006af6ac76 score: Improve heap protection
Check block pointers of deferred free list before use.
2016-06-22 16:07:43 +02:00
Sebastian Huber
9bfad8cd51 score: Add thread priority to scheduler nodes
The thread priority is manifest in two independent areas.  One area is
the user visible thread priority along with a potential thread queue.
The other is the scheduler.  Currently, a thread priority update via
_Thread_Change_priority() first updates the user visble thread priority
and the thread queue, then the scheduler is notified if necessary.  The
priority is passed to the scheduler via a local variable.  A generation
counter ensures that the scheduler discards out-of-date priorities.

This use of a local variable ties the update in these two areas close
together.  For later enhancements and the OMIP locking protocol
implementation we need more flexibility.  Add a thread priority
information block to Scheduler_Node and synchronize priority value
updates via a sequence lock on SMP configurations.

Update #2556.
2016-06-22 14:44:56 +02:00
Sebastian Huber
69a6802bfa score: Move _RBTree_Find()
The _RBTree_Find() is no longer used in the score.  Move it to sapi and
make it rtems_rbtree_find().  Move corresponding types and support
functions to sapi.
2016-06-22 14:37:11 +02:00
Sebastian Huber
768c483b70 score: Move _RBTree_Insert()
The _RBTree_Insert() is no longer used in the score.  Move it to sapi
and make it rtems_rbtree_insert().
2016-06-22 14:37:11 +02:00
Sebastian Huber
99fc1d1d1b score: Rework EDF scheduler
Use inline red-black tree insert.  Do not use shifting priorities since
this is not supported by the thread queues.  Due to the 32-bit
Priority_Control this currently limits the uptime to 49days with a 1ms
clock tick.

Update #2173.
2016-06-22 14:37:11 +02:00
Sebastian Huber
9a78f8a507 score: Modify release job scheduler operation
Pass the deadline in watchdog ticks to the scheduler.

Update #2173.
2016-06-22 14:37:10 +02:00
Sebastian Huber
7ec66e0890 score: Remove hidden deadline overrule for CBS
Do what the user commands.  Maybe we should add a rtems_cbs_period()
that calls rtems_rate_monotonic_period() with the right parameter.

Update #2173.
2016-06-22 14:37:10 +02:00
Sebastian Huber
77ff5599e0 score: Introduce map priority scheduler operation
Introduce map/unmap priority scheduler operations to map thread priority
values from/to the user domain to/from the scheduler domain.  Use the
map priority operation to validate the thread priority.  The EDF
schedulers use this new operation to distinguish between normal
priorities and priorities obtain through a job release.

Update #2173.
Update #2556.
2016-06-22 14:36:40 +02:00
Sebastian Huber
b8f76fa28e score: Delete unused _Scheduler_Priority_compare()
By convention, thread priorities must be integers in RTEMS.  Smaller
values represent more important threads.
2016-06-22 14:00:29 +02:00
Sebastian Huber
c82835a231 rtems: Rework RTEMS API to SuperCore priority
Use same structure as POSIX API for thread priority conversion to/from
SuperCore.
2016-06-22 14:00:28 +02:00
Sebastian Huber
1a4eac500c posix: Generalize _POSIX_Priority_To_core()
Move POSIX API priority validation into _POSIX_Priority_To_core().
2016-06-22 14:00:28 +02:00
Sebastian Huber
5a32c486f9 posix: Make POSIX API aware of scheduler instances 2016-06-22 14:00:28 +02:00
Sebastian Huber
eec08efc90 posix: Rework sporadic server scheduling policy
Instead of lowering the priority in case the initial budget is consumed
raise the priority for each new period.  Restore the normal priority
once the initial budget is consumed.  This makes it later easier to
combine the high priority phase with temporary priority boosts (e.g. via
priority ceiling and inheritance).

Use the thread lock to protect the POSIX thread attributes instead of
the thread state lock.  This makes it easier to change the thread
priority and keep the POSIX attributes consistent.

Fixes a false positive use of uninitialized variable warning.
2016-06-22 14:00:28 +02:00
Sebastian Huber
6bab009a61 posix: Delete POSIX_API_Control::schedparam
This field was redundant.
2016-06-22 14:00:28 +02:00
Sebastian Huber
4dc5450eeb posix: Delete POSIX_API_Control::schedpolicy
This field was redundant.
2016-06-22 14:00:28 +02:00
Sebastian Huber
4da078a8ad posix: Delete POSIX_API_Control::ss_high_priority
This field was unused.
2016-06-22 14:00:27 +02:00
Sebastian Huber
2df7fcff88 posix: _POSIX_Mutex_Default_attributes
Make _POSIX_Mutex_Default_attributes constant and independent of the
scheduler instance.  Use INT_MAX to indicate the default ceiling
priority.
2016-06-22 14:00:27 +02:00
Sebastian Huber
ce6e9ec22f posix: pthread_mutexattr_setprioceiling()
Accept all priority values in pthread_mutexattr_setprioceiling().  This
is in line with POSIX and FreeBSD.  The priority is validated in
pthread_mutex_init().  Validate the priority only for priority ceiling
mutexes.
2016-06-22 14:00:27 +02:00
Sebastian Huber
655ce0fb00 sparc: Optimize CPU counter support 2016-06-22 14:00:27 +02:00
Sebastian Huber
3d9fd2ce55 sptests/sp20: Use printer task
This avoids test failures due to slow output devices.
2016-06-22 07:45:49 +02:00
Sebastian Huber
22c3a54b8b Add printer task 2016-06-22 07:45:49 +02:00
Sebastian Huber
f153157410 Rename rtems_test_print() into rtems_test_printf() 2016-06-22 07:45:48 +02:00
Sebastian Huber
a33bfb6cb1 Avoid <rtems/print.h> in <rtems/rtems/ratemon.h>
This gets rid of the pull in of <stdarg.h> via <rtems.h> via
<rtems/rtems/ratemon.h> via <rtems/print.h>.
2016-06-22 07:45:12 +02:00
Sebastian Huber
506bfc8580 Move printer initialization to separate header
The RTEMS print user need to know nothing about a particular printer
implementation.  In particular get rid of the <stdio.h> include which
would be visible via <rtems.h>.
2016-06-22 07:29:26 +02:00
Sebastian Huber
ede1a4182d Make rtems/print.h independent of rtems/bspIo.h 2016-06-22 07:29:26 +02:00
Sebastian Huber
e8020d1914 Rename and move RTEMS_PRINTF_ATTRIBUTE()
Rename RTEMS_PRINTF_ATTRIBUTE() into RTEMS_PRINTFLIKE() (similar to
<sys/cdefs.h> __printflike()) and move it to <rtems/score/basedefs.h>.
2016-06-22 07:29:26 +02:00
Sebastian Huber
5c370a5df4 Make rtems_fprintf_plugin() static 2016-06-22 07:29:26 +02:00
Sebastian Huber
1ce8fc32c3 Make rtems_printf_plugin() static 2016-06-22 07:29:26 +02:00
Sebastian Huber
97fd93c23e Make printk_plugin() static 2016-06-22 07:29:25 +02:00
Pavel Pisa
91043bfa91 bsp/tms570: regenerate preinstall makefile by bootstrap -p. 2016-06-21 22:20:17 +02:00
Pavel Pisa
8df196f704 bsp/tms570: include complete peripheral initialization to SCI driver.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
2016-06-21 22:20:17 +02:00
Pavel Pisa
6626efe6f0 bsp/tms570: update pinmux to provide support for initialization lists and clear of alt outputs. 2016-06-21 22:20:17 +02:00
Pavel Pisa
bc884f6538 bsp/tms570: include package balls and PINMMR registers mapping for TMS570LS3135ZWT chip. 2016-06-21 22:20:16 +02:00
Sebastian Huber
a4ff2a2a4b bsp/leon3: Add up counter timecounter 2016-06-21 15:54:18 +02:00
Sebastian Huber
291945f137 bsp/leon3: Fix interrupt timestamping
Close #2684.
2016-06-21 15:54:18 +02:00
Sebastian Huber
9460333e99 sparc: Rework CPU counter support
Rework CPU counter support to enable use of the GR740 up-counter via
%asr22 and %asr23.
2016-06-21 15:54:18 +02:00
Sebastian Huber
4c927c7900 bsp/leon3: Fix LEON3_Cpu_Index initialization 2016-06-21 15:54:18 +02:00
Sebastian Huber
7222a65f0e sptests/spcpucounter01: Resurrect workaround
Resurrect workaround accidentially removed by
3e2a3c4948.
2016-06-21 15:54:18 +02:00
Pavel Pisa
fa239ff26c arm/raspberrypi: Ensure that buffers used for VC mail box communication are synchronized through cache. 2016-06-20 17:01:19 +02:00
Sebastian Huber
3e2a3c4948 sptests/spcpucounter01: Add some statistics 2016-06-20 13:56:34 +02:00
Sebastian Huber
40b80d86ef bsp/leon3: Use sysinit for bsp_debug_uart_init() 2016-06-20 08:18:39 +02:00