Commit Graph

25318 Commits

Author SHA1 Message Date
Sebastian Huber
2d915cf389 score: Add and use ISR locks
ISR locks are low-level locks to protect critical sections accessed by
threads and interrupt service routines.

On single processor configurations the ISR locks degrade to simple ISR
disable/enable sequences.  No additional storage or objects are
required.

This synchronization primitive is supported on SMP configurations.  Here
SMP locks are used.
2013-07-31 15:09:04 +02:00
Sebastian Huber
f20275db90 sptests/sp37: Improved interrupt lock tests 2013-07-31 15:09:04 +02:00
Sebastian Huber
e31a9c8b0d tmtests/tm26: Fixes for RTEMS_DEBUG 2013-07-31 15:09:04 +02:00
Sebastian Huber
c236082873 smp: Provide cache optimized Per_CPU_Control
Delete _Per_CPU_Information_p.
2013-07-31 15:09:04 +02:00
Sebastian Huber
ac72e3b91e score: Format <rtems/score/percpu.h> 2013-07-31 15:09:04 +02:00
Sebastian Huber
9e6df6adf3 score/cpu: Fix _CPU_SMP_lock_Acquire()
Avoid infinite loops due to compiler optimization.
2013-07-30 17:22:25 +02:00
Sebastian Huber
b23abb48d8 bsps/i386: Include missing header and fix warnings 2013-07-30 17:22:25 +02:00
Sebastian Huber
f346bcf705 score/i386: Fix _CPU_Fatal_halt() 2013-07-30 17:22:24 +02:00
Sebastian Huber
d5ef7ae2a3 smp: Delete _SMP_Request_other_cores_to_dispatch()
Use an event triggered unicast to inform remote processors about a
necessary thread dispatch instead.
2013-07-30 09:53:25 +02:00
Sebastian Huber
3f317e9033 score: Move _Thread_Dispatch_if_necessary()
Rename to _RTEMS_Tasks_Dispatch_if_necessary().
2013-07-30 09:53:25 +02:00
Sebastian Huber
0628824714 posix: Simplify pthread_kill()
Delete _Thread_Signal_notification() since this is a side-effect of
_POSIX_signals_Unblock_thread().
2013-07-30 09:53:25 +02:00
Sebastian Huber
6c0e43d31a score: Add and use _Thread_Signal_notification() 2013-07-30 09:53:25 +02:00
Sebastian Huber
876dcd02e0 smptests/smppsxsignal01: New test 2013-07-30 09:53:24 +02:00
Sebastian Huber
d4f13d1479 smptests/smpsignal01: New test 2013-07-30 09:53:24 +02:00
Sebastian Huber
21ff802c7f smp: Delete _ISR_Disable_on_this_core(), etc.
Delete _ISR_Enable_on_this_core(), _ISR_Flash_on_this_core(),
_ISR_SMP_Disable(), _ISR_SMP_Enable(), _ISR_SMP_Flash().

The ISR disable/enable interface has no parameter to pass a specific
object.  Thus it is only possible to implement a single global lock
object with this interface.  Using the ISR disable/enable as the giant
lock on SMP configurations is not feasible.

Potentially blocking resource obtain sequences protected by the thread
dispatch disable level are subdivided into smaller ISR disabled critical
sections.  This works since on single processor configurations there is
only one thread of execution that can block.  On SMP this is different
(image a mutex obtained concurrently by different threads on different
processors).

The thread dispatch disable level is currently used as the giant lock.
There is not need to complicate things with this unused interface.
2013-07-30 09:53:24 +02:00
Sebastian Huber
e4c9176531 smp: Delete _ISR_SMP_Initialize() 2013-07-30 09:53:24 +02:00
Sebastian Huber
10b51ae739 score: Critical section change in _Thread_Dispatch
If we enter _Thread_Dispatch() then _Thread_Dispatch_disable_level must
be zero.  Single processor RTEMS assumes that stores of non-zero values
to _Thread_Dispatch_disable_level are observed by interrupts as non-zero values.

Move the _Thread_Dispatch_set_disable_level( 1 ) out of the first ISR
disabled critical section.  In case interrupts happen between the
_Thread_Dispatch_set_disable_level( 1 ) and _ISR_Disable( level ) then
the interrupt will observe a non-zero _Thread_Dispatch_disable_level and
will not issue a _Thread_Dispatch() and we can enter the ISR disabled
section directly after interrupt processing.

This change leads to symmetry between the single processor and SMP
configuration.
2013-07-30 09:53:24 +02:00
Sebastian Huber
99970a7912 score: Add assert to _Per_CPU_Get()
Thread dispatching must be repressed to use the per CPU control of the
current processor consistently.
2013-07-30 09:53:23 +02:00
Sebastian Huber
4088377398 score: Add _Assert_Thread_dispatching_repressed() 2013-07-30 09:53:23 +02:00
Sebastian Huber
95519eede2 score: New header file <rtems/score/assert.h> 2013-07-30 09:53:23 +02:00
Sebastian Huber
fe52e7c07c smp: Add and use _Per_CPU_Get()
Add and use _Per_CPU_Get_by_index() and _Per_CPU_Get_index().  Add
_Per_CPU_Send_interrupt().  This avoids direct access of
_Per_CPU_Information.
2013-07-30 09:53:23 +02:00
Sebastian Huber
ff63d2dbf9 smp: Use Thread_Control.is_executing
FIXME: This area needs proper locking.
2013-07-30 09:53:22 +02:00
Shubham Somani
45ca51c4f7 doc/user/conf.t: More clean ups 2013-07-29 13:06:31 -05:00
Vipul Nayyar
2bdcf4fd51 Updated legacy code in i386 pc386 2013-07-29 09:07:19 +02:00
Sebastian Huber
f6efd0bf8a score: Move object content to public API 2013-07-28 14:00:19 +02:00
Sebastian Huber
0a10eb30c2 score: Move object MP content to public API 2013-07-28 14:00:19 +02:00
Sebastian Huber
7c8830c787 testsuites: Include missing header files 2013-07-28 14:00:19 +02:00
Chris Johns
681f198539 Return the amount of data written when an error occurs rather than
the error.

The change lets the mrfs_fsrdwr test pass.
2013-07-27 23:57:05 +10:00
Sebastian Huber
ede5a2a4d5 libtests/malloc04: Fixes for RTEMS_DEBUG 2nd try 2013-07-26 14:00:00 +02:00
Sebastian Huber
fcff6c7190 bsp/nds: Include missing <rtems/framebuffer.h> 2013-07-26 11:55:48 +02:00
Sebastian Huber
91404ded25 libmisc: Provide libutf8proc conditionally 2013-07-26 11:55:48 +02:00
Sebastian Huber
4e00fe62d3 bsps: Include missing <rtems/score/heapimpl.h> 2013-07-26 11:55:48 +02:00
Vipul Nayyar
1f4321b8fd Removed legacy data types from arm 2013-07-26 11:55:48 +02:00
Pavel Pisa
02632e83e0 bsp/csb336: mc9328mxl correct AITC access in bsp_interrupt_dispatch.
The original version is missing void and result is that (*x >> 16) is
optimized to ldh rX,[rY]. But it is not allowed/supported to access
bus/address range used by AITC by other than 32 bit wide accesses
and 16-bit access results in the data abort exception.
The corrected version works on real hardware and is even
more readable.

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2013-07-26 11:55:47 +02:00
Sebastian Huber
88c74ab115 score: Merge tod implementation into one file
Delete TOD_MICROSECONDS_PER_SECOND, TOD_MICROSECONDS_TO_TICKS() and
TOD_MILLISECONDS_TO_TICKS().
2013-07-26 11:55:47 +02:00
Sebastian Huber
a2e3f33f39 score: Create object implementation header
Move implementation specific parts of object.h and object.inl into new
header file objectimpl.h.  The object.h contains now only the
application visible API.
2013-07-26 11:55:47 +02:00
Sebastian Huber
0c3edbf0cf Include missing <rtems/score/threaddispatch.h> 2013-07-26 11:55:47 +02:00
Sebastian Huber
bfd0d7a337 score: Include missing <rtems/score/thread.h> 2013-07-26 11:55:46 +02:00
Sebastian Huber
0b9f472116 score: Move mppkt implementation into mpciimpl.h 2013-07-26 11:55:46 +02:00
Sebastian Huber
7f04cb18ff score: Create mpci implementation header
Move implementation specific parts of mpci.h into new header file
mpciimpl.h.  The mpci.h contains now only the application visible API.
2013-07-26 11:55:46 +02:00
Sebastian Huber
6cec745f6c rtems: Create signal implementation header
Move implementation specific parts of signal.h into new header file
signalimpl.h.  The signal.h contains now only the application visible
API.
2013-07-26 11:55:46 +02:00
Sebastian Huber
cba15292d9 score: Merge objectmp implementation into one file 2013-07-26 11:55:46 +02:00
Sebastian Huber
3cf392389d rtems: Fix partition includes 2013-07-26 11:55:46 +02:00
Sebastian Huber
9892d677d3 rtems: Use proper header guard 2013-07-26 11:55:45 +02:00
Sebastian Huber
a1123646ac score: Create threadq implementation header
Move implementation specific parts of tqdata.h, threadq.h and
threadq.inl into new header file threadqimpl.h.  The threadq.h contains
now only the application visible API.

Delete tqdata.h.
2013-07-26 11:55:45 +02:00
Sebastian Huber
8d0bf3224b score: Delete threadq.inl 2013-07-26 11:55:45 +02:00
Sebastian Huber
62590a7331 score: Merge threadmp implementation into one file 2013-07-26 11:55:45 +02:00
Sebastian Huber
fe6c170cf5 score: Create states implementation header
Move implementation specific parts of states.h and states.inl into new
header file statesimpl.h.  The states.h contains now only the
application visible API.
2013-07-26 11:55:45 +02:00
Sebastian Huber
5618c37a7a score: Create thread implementation header
Move implementation specific parts of thread.h and thread.inl into new
header file threadimpl.h.  The thread.h contains now only the
application visible API.

Remove superfluous header file includes from various files.
2013-07-26 11:55:44 +02:00
Sebastian Huber
f0bfd7d81d score: Create prioritybitmap implementation header
Move implementation specific parts of prioritybitmap.h and
prioritybitmap.inl into new header file prioritybitmapimpl.h.  The
prioritybitmap.h contains now only the application visible API.

Move content of bitfield.h into prioritybitmapimpl.h.
2013-07-26 11:55:44 +02:00