Commit Graph

3485 Commits

Author SHA1 Message Date
Sebastian Huber
80f376db6c score: Remove Giant lock in rtems_clock_tick()
Update #2307.
2015-05-19 12:00:47 +02:00
Sebastian Huber
900d337f96 score: Rework _Thread_Change_priority()
Move the writes to Thread_Control::current_priority and
Thread_Control::real_priority into _Thread_Change_priority() under the
protection of the thread lock.  Add a filter function to
_Thread_Change_priority() to enable specialized variants.

Avoid race conditions during a thread priority restore with the new
Thread_Control::priority_restore_hint for an important average case
optimizations used by priority inheritance mutexes.

Update #2273.
2015-05-19 12:00:47 +02:00
Sebastian Huber
cc366ec8c9 score: New thread queue implementation
Use thread wait flags for synchronization.  The enqueue operation is now
part of the initial critical section.  This is the key change and
enables fine grained locking on SMP for objects using a thread queue
like semaphores and message queues.

Update #2273.
2015-05-19 12:00:45 +02:00
Sebastian Huber
568af83542 score: Add Thread_queue_Operations
Replace the Thread_Priority_control with more general
Thread_queue_Operations which will be used for generic priority change,
timeout, signal and wait queue operations in the future.

Update #2273.
2015-05-19 12:00:45 +02:00
Sebastian Huber
08fe84b5d7 score: Generalize _Event_Timeout()
Add a thread wait timeout code.  Replace _Event_Timeout() with a general
purpose _Thread_Timeout() watchdog handler.

Update #2273.
2015-05-19 12:00:45 +02:00
Sebastian Huber
b7cff7feb0 score: Reduce thread wait states
Merge THREAD_WAIT_STATE_SATISFIED, THREAD_WAIT_STATE_TIMEOUT,
THREAD_WAIT_STATE_INTERRUPT_SATISFIED, and
THREAD_WAIT_STATE_INTERRUPT_TIMEOUT into one state
THREAD_WAIT_STATE_READY_AGAIN.  This helps to write generic routines to
block a thread.

Update #2273.
2015-05-19 12:00:44 +02:00
Sebastian Huber
a382010c62 score: New timer server implementation
Use mostly the standard watchdog operations.  Use a system event for
synchronization.  This implementation is simpler and offers better SMP
performance.

Close #2131.
2015-05-19 12:00:43 +02:00
Sebastian Huber
1ccbd05291 score: Add Watchdog_Iterator
Rewrite the _Watchdog_Insert(), _Watchdog_Remove() and
_Watchdog_Tickle() functions to use iterator items to synchronize
concurrent operations.  This makes it possible to get rid of the global
variables _Watchdog_Sync_level and _Watchdog_Sync_count which are a
blocking point for scalable SMP solutions.

Update #2307.
2015-05-19 12:00:43 +02:00
Sebastian Huber
290309014c score: Add header to _Watchdog_Remove()
Add watchdog header parameter to _Watchdog_Remove() to be in line with
the other operations.  Add _Watchdog_Remove_ticks() and
_Watchdog_Remove_seconds() for convenience.

Update #2307.
2015-05-19 12:00:42 +02:00
Sebastian Huber
22788bc2ba score: _Thread_queue_Extract()
Remove thread queue parameter from _Thread_queue_Extract() since the
current thread queue is stored in the thread control block.
2015-05-19 12:00:42 +02:00
Sebastian Huber
b1b5ddf028 smptests/smpcache01: Restructure
Restructure to avoid large maximum thread dispatch disabled times.
2015-05-15 13:23:03 +02:00
Sebastian Huber
be0366bb62 score: Fix scheduler helping protocol
Account for priority changes of threads executing in a foreign
partition.  Exchange idle threads in case a victim node uses an idle
thread and the new scheduled node needs an idle thread.
2015-05-11 08:58:40 +02:00
Alexander Krutwig
5b9dfff50b sptests/spcontext01: Check FPU task combinations 2015-05-07 08:34:16 +02:00
Sebastian Huber
40d24d54ab sptests/spstkalloc02: Fix namespace issue
Avoid collision with <sys/param.h> defined PAGE_SIZE.
2015-04-27 10:17:31 +02:00
Joel Sherrill
694f155589 sp13/system.h: Account for all message buffers
There may be a way to reduce the memory requirements but it
will require time to ensure the math is right and it passes
on all targets. At the current time, it fails on 22 BSPs which
run on simulators.
2015-04-23 12:48:04 -05:00
Sebastian Huber
9f10911d2b score: Delete Thread_queue_Control::state
Use a parameter for _Thread_queue_Enqueue() instead to reduce memory
usage.
2015-04-23 08:55:43 +02:00
Daniel Cederman
3641320161 smptests/smpcache01: Enable interrupts before waiting for other CPUs
Otherwise there is a risk that a CPU misses a cache manager message
from another CPU and the test hangs.
2015-04-22 09:29:56 +02:00
Sebastian Huber
1041de1ab0 score: Add _Thread_Get_interrupt_disable()
Remove _Thread_Acquire() and _Thread_Acquire_for_executing().  Add
utility functions for the default thread lock.   Use the default thread
lock for the RTEMS events.  There is no need to disable thread
dispatching and a Giant acquire in _Event_Timeout() since this was
already done by the caller.

Update #2273.
2015-04-21 08:25:32 +02:00
Sebastian Huber
1981b4697e score: Add _ISR_lock_ISR_disable/enable() 2015-04-20 08:23:26 +02:00
Sebastian Huber
26c142e5ad score: Refactor SMP cache manager support 2015-04-20 08:23:25 +02:00
Joel Sherrill
491434cd7c sp13: Document message buffer usage and adjust configuration 2015-04-17 09:49:45 -05:00
Sebastian Huber
b8cdc38b2f sptests/sp52: Reduce clock tick interval
This helps on slow simulators.
2015-04-17 10:47:21 +02:00
Sebastian Huber
a211a732fd score: Fix _TOD_Set_with_timestamp()
Update the current time before the watchdog adjust so that timer
routines observe the new time.
2015-04-17 08:38:09 +02:00
Sebastian Huber
ab69324746 sptests/sp68: Avoid use of internal variables 2015-04-16 20:29:29 +02:00
Sebastian Huber
e98df4d8d0 score: Add _ISR_lock_Flash() 2015-04-16 11:36:48 +02:00
Joel Sherrill
b1debed0b9 spcpuset01: Reduce output to reduce run-time 2015-04-14 15:00:57 -05:00
Joel Sherrill
351858d753 sp13: Update configuration to account for messages on fourth message queue 2015-04-14 14:07:35 -05:00
Joel Sherrill
fc0756e8d9 Add test assertion for allocator mutex being unlocked
The Allocator Mutex should not be locked outside a tested
service call. In an SMP test or heavily multithreaded test,
this is possible since another thread could have the lock
for an extended period of time but this is not the norm
for the tests.

updates 2319.
2015-04-14 11:17:10 -05:00
Sebastian Huber
54cf0e34c5 score: Add Watchdog_Header
This type is intended to encapsulate all state to manage a watchdog
chain.

Update #2307.
2015-04-13 13:39:26 +02:00
Sebastian Huber
edcf89b6f2 rtems: Atomically suspend/resume tasks 2015-04-08 11:48:15 +02:00
Sebastian Huber
f820f22cf0 fstests/fsfseeko01: Fix for long == off_t
Close #2317.
2015-04-08 07:46:10 +02:00
Joel Sherrill
7824d15fa4 disable-intrcritical-tests.tcfg: New file
This file contains the list of interrupt critical section tests.
There are some simulators these are unreliable on so they should
just be ignored.
2015-04-01 09:39:42 -05:00
Alexander Krutwig
2da28d2bee psxtmtests: Use timeout in more distant future
Adds future compatibility with strict monontonic software timestamps.
2015-03-31 15:16:43 +02:00
Alexander Krutwig
15031660b8 fstests: Increase stack size for symlink loop test 2015-03-31 15:15:23 +02:00
Alexander Krutwig
260cfe0500 fstests/fssymlink: Typo 2015-03-31 15:15:23 +02:00
Chris Johns
7790fec1c2 testsuites: dl02 needs an FPU init task. 2015-03-31 17:04:43 +11:00
Sebastian Huber
e7e86ba65f smpmigration01: Delete timing dependent assert
The cycles per runner depends too heavily on the hardware timing making
the assert unreliable.  Delete runner tasks before we print out the
status.
2015-03-25 11:46:04 +01:00
Sebastian Huber
4f10ed61d0 smptests/smpfatal08: Workaround for QorIQ BSPs 2015-03-24 14:35:05 +01:00
Sebastian Huber
2e9c3d5e29 score: Add thread priority change handler
Since the thread current priority change and thread queue requeue is
performed in one critical section it is possible to simplify the thread
queue requeue procedure.  Add a thread queue agnostic thread priority
change handler so that we are able to use alternative thread queue
implementations.

Update #2273.
2015-03-24 14:35:04 +01:00
Joel Sherrill
dd23125a88 testsuites/sptests/sp54/init.c: Add cast to avoid warning 2015-03-24 08:17:02 -05:00
Joel Sherrill
d05d31ff41 samples/minimum/init.c: Add cast to avoid warning 2015-03-24 08:17:00 -05:00
Joel Sherrill
5da717ac0a sptls03/init.c: Make type and constants uint32_t to avoid overflow warnings 2015-03-24 08:16:38 -05:00
Joel Sherrill
dc8ab4400b sptls01/init.c: Use larger data types for values 2015-03-24 08:16:37 -05:00
Joel Sherrill
73a2caf46b sptests/spwatchdog/init.c: Avoid integer overflow 2015-03-24 08:16:35 -05:00
Joel Sherrill
2fe0f16d13 sptests/spedfsched02: Reduce stack space usage to fix on smaller targets 2015-03-24 08:16:35 -05:00
Joel Sherrill
c6ef8708c3 sptests/spatomic01/init.c: Avoid integer overflow 2015-03-24 08:16:34 -05:00
Joel Sherrill
7075711493 sptests/sp34/changepri.c: Correct printf() warning 2015-03-24 08:16:33 -05:00
Joel Sherrill
6c1aff6633 sptests/sp33/init.c: Correct printf() warning 2015-03-24 08:16:33 -05:00
Joel Sherrill
6849e5379a sptests/sp20: Reduce memory requirements
This was checked on sparc/sis. If this fails on other targets, then
the task stack sizes needs to be reevaluated.
2015-03-24 08:16:32 -05:00
Joel Sherrill
2be0342a4b sptests/sp13/system.h: Fine tune message buffer configuration to avoid integer overflow 2015-03-24 08:16:32 -05:00