Commit Graph

28381 Commits

Author SHA1 Message Date
Sebastian Huber
b76dd97990 score: Inline _CORE_semaphore_Flush() 2015-05-19 12:00:47 +02:00
Sebastian Huber
cfa5aabc78 score: Delete _CORE_semaphore_Seize()
Rename _CORE_semaphore_Seize_isr_disable() to _CORE_semaphore_Seize().
2015-05-19 12:00:46 +02:00
Sebastian Huber
e76c517d07 score: Fine grained locking for semaphores
Update #2273.
2015-05-19 12:00:46 +02:00
Sebastian Huber
cc18d7bec7 score: Fine grained locking for message queues
Aggregate several critical sections into a bigger one.  Sending and
receiving messages is now protected by an ISR lock.  Thread dispatching
is only disabled in case a blocking operation is necessary.  The message
copy procedure is done inside the critical section (interrupts
disabled).  Thus this change may have a negative impact on the interrupt
latency in case very large messages are transferred.

Update #2273.
2015-05-19 12:00:46 +02:00
Sebastian Huber
c654b52517 score: Delete _CORE_message_queue_Flush_support()
Check the number of pending messages in _CORE_message_queue_Flush() to
avoid race conditions.
2015-05-19 12:00:46 +02:00
Sebastian Huber
f5d6c8b58d score: Delete Thread_queue_Control::timeout_status
Use a parameter for _Thread_queue_Enqueue() instead to reduce memory
usage.
2015-05-19 12:00:46 +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
383cf42217 score: More thread queue operations
Move thread queue discipline specific operations into
Thread_queue_Operations.  Use a separate node in the thread control
block for the thread queue to make it independent of the scheduler data
structures.

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
02c4c441a5 score: Add Thread_queue_Control::Lock
Move the complete thread queue enqueue procedure into
_Thread_queue_Enqueue_critical().  It is possible to use the thread
queue lock to protect state of the object embedding the thread queue.
This enables per object fine grained locking in the future.

Delete _Thread_queue_Enter_critical_section().

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
776a50c47a Filesystem: Thread life protection for env changes 2015-05-19 12:00:44 +02:00
Sebastian Huber
4a3c920d30 libcsupport: Fix umask() locking
Delete comment related to an obsolete implementation of
rtems_libio_set_private_env().
2015-05-19 12:00:44 +02:00
Sebastian Huber
2b0bbc4a65 libcsupport: Avoid Giant lock in rtems_verror() 2015-05-19 12:00:44 +02:00
Sebastian Huber
c07c85f4f2 Filesystem: Use lock for deferred release 2015-05-19 12:00:44 +02:00
Sebastian Huber
5f7f469a96 libcsupport: Avoid Giant lock in _times() 2015-05-19 12:00:43 +02:00
Sebastian Huber
d5a9c808f0 rtems: Use once mutex for timer server init 2015-05-19 12:00:43 +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
fd53d2514e score: Move _Watchdog_Tickle()
Make internal function _Watchdog_Remove_it() static to avoid accidental
usage.

Update #2307.
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
6d2539413b score: Add _Watchdog_Acquire|Release|Flash()
Update #2307.
2015-05-19 12:00:42 +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
a61d38501a score: Optimize _Thread_queue_Compare_priority() 2015-05-19 12:00:42 +02:00
Sebastian Huber
56729d83c9 score: Delete STATES_WAITING_ON_THREAD_QUEUE
Avoid the usage of the current thread state in
_Thread_queue_Extract_with_return_code() since thread queues should not
know anything about thread states.
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
cf255ff0b2 score: Add _SMP_Assert() 2015-05-19 12:00:42 +02:00
Sebastian Huber
7e19330e30 score: Fix assert 2015-05-19 11:37:26 +02:00
Joel Sherrill
e893061c2d Merge branch 'master' of ssh://dispatch.rtems.org/data/git/rtems 2015-05-18 18:17:09 -05:00
Sebastian Huber
b1b5ddf028 smptests/smpcache01: Restructure
Restructure to avoid large maximum thread dispatch disabled times.
2015-05-15 13:23:03 +02:00
Joel Sherrill
441e8ef21d Merge branch 'master' of ssh://dispatch.rtems.org/data/git/rtems 2015-05-14 06:41:00 -07:00
Joel Sherrill
b7f3ee9264 README:XXX 2015-05-14 06:40:45 -07:00
Sebastian Huber
a0001d64fe Remove obsolete rtems_clock_major/minor
These global variables are obsolete since
65f71f8472.
2015-05-14 11:17:00 +02:00
Sebastian Huber
47c9c083ed score: Avoid Giant lock in _Objects_Id_to_name()
This prevents a deadlock situation in the capture engine.
2015-05-12 10:53:47 +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
Joel Sherrill
438e78e8c0 mrm332-testsuite.tcfg: Add fileio 2015-05-07 08:31:29 -05:00
Alexander Krutwig
5b9dfff50b sptests/spcontext01: Check FPU task combinations 2015-05-07 08:34:16 +02:00
Sebastian Huber
a6502a58e6 score: Fix Thread_Control and Thread_Proxy_control
Fix layout of the common block of Thread_Control and
Thread_Proxy_control.  Ensure that the offsets match.
2015-05-06 11:54:19 +02:00
Sebastian Huber
c639cf2378 score: Delete unused Thread_queue_Timeout_callout 2015-04-30 15:26:23 +02:00
Chris Johns
a8e4352e6a libmisc/cpuuse: Top support for current load.
The cpuuse top command now supports the current load where the list of
tasks is ordered based on the current load rather than the total cpu usage.
This lets you see what is using the processor at any specific instance.

The ability to sort on a range of thread values is now supported.

Added memory usage stats for unified and separate workspace and C heaps as
well as displaying the allocated stack space.

Added a few more command keys to refresh the display, show all tasks in the
system, control the lines display and a scrolling mode that does not clear
the display on each refresh.

Removed support for tick kernel builds. The tick support in the kernel is to
be removed.
2015-04-29 15:24:00 +10: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
Sebastian Huber
7f53035504 bsps/sparc: Use inline functions for cache manager 2015-04-27 10:11:47 +02:00
Sebastian Huber
4bf2a6aa09 bsps/cache: Clarify range functions support 2015-04-27 09:40:16 +02:00
Hesham ALMatary
1602bf3973 Fix broken BSPs due to a shared cache function declaration.
Get rid of _CPU_cache_invalidate_instruction_range declaration
as it doesn't make sense here.
2015-04-27 09:25:39 +02:00
Sebastian Huber
f60b4f9344 dosfs: Fix warning fix 2015-04-27 09:10:49 +02:00
Hesham ALMatary
3dead51edd Fix or1k C++ build failure
Closes #2329
2015-04-26 12:44:12 -05:00
Sebastian Huber
d83127e9bd posix: Use right thread dispatch disable function 2015-04-24 08:36:52 +02:00
Sebastian Huber
f32935335a score: Fix POSIX thread join
A thread join is twofold.  There is one thread that exists and an
arbitrary number of threads that wait for the thread exit (one-to-many
relation).  The exiting thread may want to wait for a thread that wants
to join its exit (STATES_WAITING_FOR_JOIN_AT_EXIT in
_POSIX_Thread_Exit()).  On the other side we need a thread queue for all
the threads that wait for the exit of one particular thread
(STATES_WAITING_FOR_JOIN in pthread_join()).

Update #2035.
2015-04-23 21:42:13 +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
Joel Sherrill
5a8cd17d3c simsh*.tcfg: Add iostream 2015-04-23 12:48:04 -05:00