Commit Graph

25543 Commits

Author SHA1 Message Date
Zhongwei Yao
b5c906429f Unlimited objects support for POSIX keys
This patch enables unlimited model in POSIX key manger and have a decent
runtime on POSIX key searching, adding and deleting operations.  Memory
overhead is lower than current implementation when the size of key and key
value becomes big.
2013-08-06 14:11:38 +02:00
Sebastian Huber
5a556e4ea8 bsp/realview-pbx-a9: Enable fast idle clock 2013-08-06 11:03:21 +02:00
Sebastian Huber
015bd1b818 smptests/smp07: Use suspend instead of delete 2013-08-06 11:03:11 +02:00
R. Diez
ffa2defc78 Fix compiler warnings 2013-08-06 11:02:56 +02:00
WeiY
3d68be1854 correct comments about atomic api 2013-08-06 11:02:56 +02:00
Sebastian Huber
71336bf445 arm: Fix ISR level context initialization 2013-08-05 17:31:45 +02:00
Sebastian Huber
25d921e435 sptests/sp37: Add ISR level test for new threads 2013-08-05 17:31:35 +02:00
Sebastian Huber
bfed5d5d15 smp: Support ASR path in rtems_task_mode() 2013-08-05 15:52:32 +02:00
Sebastian Huber
007bdc4f59 arm: Fix CPU_MODES_INTERRUPT_MASK
The set of interrupt levels must be a continuous range of non-negative
integers starting at zero.
2013-08-05 13:45:37 +02:00
Sebastian Huber
da831d06fd sptests/sp37: Add ISR set/get level tests 2013-08-05 13:45:37 +02:00
Sebastian Huber
20bb89d3eb smptests/smpswitchextension01: New test 2013-08-05 13:45:37 +02:00
Sebastian Huber
b9000fd571 smptests/smpmigration01: New test 2013-08-05 13:45:36 +02:00
Sebastian Huber
b4b309c559 smp: Generalize _Thread_Start_multitasking()
Add context parameter to _Thread_Start_multitasking() and use this
function in rtems_smp_secondary_cpu_initialize().  This avoids
duplication of code.

Fix missing floating point context initialization in
rtems_smp_secondary_cpu_initialize().  Now performed via
_Thread_Start_multitasking().
2013-08-05 13:45:36 +02:00
Sebastian Huber
2bca05f7d7 score: Delete SYSTEM_STATE_BEGIN_MULTITASKING
Nothing happened between the SYSTEM_STATE_BEGIN_MULTITASKING to
SYSTEM_STATE_UP transition.
2013-08-05 13:45:36 +02:00
Cynthia Rempel
ae39df4430 sptests/spfreechain01: Fix Makefile.am 2013-08-04 15:11:16 +02:00
Joel Sherrill
26bdc9fc27 bfin/cpu.h: Remove duplicate definition of CPU_SIMPLE_VECTORED_INTERRUPTS 2013-08-01 10:04:18 -05:00
WeiY
693088951d clean up spatomic testcase 2013-08-01 16:48:25 +02:00
Sebastian Huber
9bf74673f9 score: Use an ISR lock for TOD
Two issues are addressed.

1. On single processor configurations the set/get of the now/uptime
timestamps is now consistently protected by ISR disable/enable
sequences.  Previously nested interrupts could observe partially written
values since 64-bit writes are not atomic on 32-bit architectures in
general.  This could lead to non-monotonic uptime timestamps.

2. The TOD now/uptime maintanence is now independent of the giant lock.
This is the first step to remove the giant lock in _Thread_Dispatch().
2013-08-01 16:45:46 +02:00
Sebastian Huber
965a442a4e score: Move nanoseconds since last tick support
Move the nanoseconds since last tick support from the Watchdog to the
TOD handler.  Now the TOD managment is encapsulated in the TOD_Control
structure.
2013-08-01 16:45:46 +02:00
Sebastian Huber
b915762a68 score: Add and use _TOD_Is_set() 2013-08-01 16:45:45 +02:00
Sebastian Huber
dd8815a0c4 score: Delete _TOD_Activate and _TOD_Deactivate 2013-08-01 16:45:45 +02:00
Sebastian Huber
f031df0e63 score: Rename tod.h to todimpl.h 2013-08-01 16:45:45 +02:00
Sebastian Huber
8d640134ba score: ISR lock API changes 2013-08-01 16:45:45 +02:00
Sebastian Huber
1e51fa5f4d score: Add and use _Thread_Update_cpu_time_used()
Fix _times().
2013-08-01 16:45:44 +02:00
Sebastian Huber
09c00eea70 tmtests/tm27: Fixes for RTEMS_DEBUG 2013-08-01 16:45:44 +02:00
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