Sebastian Huber
a4217c674d
score: Rename _Thread_queue_Enqueue_critical()
...
Delete unused _Thread_queue_Enqueue() and rename
_Thread_queue_Enqueue_critical() to _Thread_queue_Enqueue().
2016-11-23 12:52:06 +01:00
Sebastian Huber
125f248231
score: Add thread queue enqueue callout
...
Replace the expected thread dispatch disable level with a thread queue
enqueue callout. This enables the use of _Thread_Dispatch_direct() in
the thread queue enqueue procedure. This avoids impossible exection
paths, e.g. Per_CPU_Control::dispatch_necessary is always true.
2016-11-23 12:52:06 +01:00
Sebastian Huber
84e6f15c82
score: Robust thread dispatch
...
On SMP configurations, it is a fatal error to call blocking operating
system with interrupts disabled, since this prevents delivery of
inter-processor interrupts. This could lead to executing threads which
are not allowed to execute resulting in undefined behaviour.
The ARM Cortex-M port has a similar problem, since the interrupt state
is not a part of the thread context.
Update #2811 .
2016-11-23 12:52:06 +01:00
Sebastian Huber
a6283671f3
smptests/smplock01: Test TAS and TTAS locks
...
Cache align locks in the context.
2016-11-23 12:52:05 +01:00
Sebastian Huber
46b534388f
libtests/cpuuse: Check status only
...
We may own the allocator mutex during context switches.
2016-11-23 12:52:05 +01:00
Sebastian Huber
db20706d5a
smptests/smpscheduler02: Fix task initialization
...
Set scheduler before the task start.
2016-11-23 12:52:05 +01:00
Sebastian Huber
ec17ad4c24
score: Delete obsolete scheduler debug aid
2016-11-23 12:52:05 +01:00
Sebastian Huber
1d18a9027d
arm: Fix _ARMV4_Exception_interrupt
...
Use the right register to determine if a thread dispatch is allowed and
necessary.
Update #2751 .
2016-11-23 12:52:05 +01:00
Sebastian Huber
8954368f49
psxtests/psxkey08: Avoid rtems_semaphore_flush()
...
Avoid rtems_semaphore_flush() to reduce the maximum thread dispatch
disabled time of this test. Remove superfluous yield and malloc().
Ensure that no resource leak occurs.
2016-11-23 11:54:29 +01:00
Sebastian Huber
a550b3f35a
score: Force Per_CPU_Control::executing alignment
...
This fixes the CPU ports with relaxed alignment restrictions, e.g. type
alignment is less than the type size.
Close #2822 .
Close #2823 .
2016-11-23 07:52:42 +01:00
Sebastian Huber
3142727602
bsp/lpc23xx_tli800: Disable tar01 test
...
Close #2824 .
2016-11-23 07:47:00 +01:00
Sebastian Huber
4e2bc0a308
arm: Fix Thumb-1 targets
...
We cannot use the MRS or MSR instructions in Thumb-1 mode. Stay in ARM
mode for the Thumb-1 targets during interrupt low-level processing.
Update #2751 .
2016-11-21 13:15:35 +01:00
Sebastian Huber
f730c25b70
powerpc/mpc5xx: Rename CPU_Interrupt_frame
...
The MPC5XX support uses a legacy interrupt/exception infrastructure.
Close #2819 .
2016-11-21 11:19:37 +01:00
Sebastian Huber
ccc92b81c9
score: Group Per_CPU_Control members by alignment
...
Close #2820 .
2016-11-21 10:26:32 +01:00
Sebastian Huber
27eccdad87
sparc64: Fix _CPU_ISR_Is_enabled()
...
Update #2820 .
2016-11-21 10:25:58 +01:00
Sebastian Huber
fd6d3f1f03
nios2: Fix _CPU_ISR_Is_enabled()
...
Close #2818 .
2016-11-21 10:13:37 +01:00
Sebastian Huber
9f225dea19
arm: Fix ARM_CONTEXT_CONTROL_ISR_DISPATCH_DISABLE
...
Close #2816 .
2016-11-21 10:11:18 +01:00
Sebastian Huber
c6f446bd70
bfin: ASM compatibility for <rtems/score/cpu.h>
...
Close #2817 .
2016-11-21 10:06:36 +01:00
Sebastian Huber
142628edcd
score: Optimize self-contained objects
...
Avoid use of the stack for the hot paths.
2016-11-18 07:30:36 +01:00
Sebastian Huber
1b87f27cac
score: Constify _MRSP_Get_owner()
2016-11-18 07:30:35 +01:00
Sebastian Huber
408609f6b9
score: Add _ISR_Is_enabled()
...
In contrast to _ISR_Get_level() the _ISR_Is_enabled() function evaluates
a level parameter and returns a boolean value.
Update #2811 .
2016-11-18 07:30:35 +01:00
Sebastian Huber
537f00ebe8
score: Restrict task interrupt level to 0 on SMP
...
Update #2811 .
2016-11-18 07:30:35 +01:00
Sebastian Huber
7ce60b378d
powerpc: Use Per_CPU_Control::isr_dispatch_disable
...
Update #2751 .
2016-11-18 07:30:35 +01:00
Sebastian Huber
d59585db26
arm: Use Per_CPU_Control::isr_dispatch_disable
...
Update #2751 .
2016-11-18 07:30:35 +01:00
Sebastian Huber
2668e4f639
arm: Simplify _ARMV4_Exception_interrupt
...
Move profiling code closer to bsp_interrupt_disable() to allow re-use of
r9 later.
2016-11-18 07:30:34 +01:00
Sebastian Huber
4924756f69
arm: Use local labels
2016-11-18 07:30:34 +01:00
Sebastian Huber
c11ac2d59d
sparc: Use Per_CPU_Control::isr_dispatch_disable
...
Update #2751 .
2016-11-18 07:30:34 +01:00
Sebastian Huber
d5e073cde7
score: Allow interrupts during thread dispatch
...
Use a processor-specific interrupt frame during context switches in case
the executing thread is longer executes on the processor and the heir
thread is about to start execution. During this period we must not use
a thread stack for interrupt processing.
Update #2809 .
2016-11-18 07:30:34 +01:00
Sebastian Huber
f9aa34ddd9
score: Add Per_CPU_Control::Interrupt_frame
...
Update #2809 .
2016-11-18 07:30:34 +01:00
Sebastian Huber
2072dd242f
score: Add Per_CPU_Control::isr_dispatch_disable
...
Update #2751 .
2016-11-18 07:30:33 +01:00
Sebastian Huber
dbeccf0ec0
arm: Provide CPU_Interrupt_frame for ARMv4
...
Update #2809 .
2016-11-18 07:30:33 +01:00
Sebastian Huber
2599c8e63e
powerpc: Add up to date CPU_Interrupt_frame
...
Rename ppc_exc_min_frame to CPU_Interrupt_frame. Move it and the
corresponding defines to <rtems/score/cpuimpl.h>.
Update #2809 .
2016-11-18 07:30:33 +01:00
Sebastian Huber
bf4fdb1f1d
powerpc: Move legacy CPU_Interrupt_frame
...
The only remaining user of CPU_Interrupt_frame on PowerPC is the mpc5xx
support. Move it to here.
Update #2809 .
2016-11-18 07:30:33 +01:00
Sebastian Huber
40d592eb3e
bsps/powerpc: Avoid use of CPU_Interrupt_frame
...
This type is not relevant for the code since only a pointer is passed
around.
Update #2809 .
2016-11-18 07:30:33 +01:00
Sebastian Huber
c539a865f4
sparc: Move CPU_Interrupt_frame related defines
...
Move CPU_Interrupt_frame related defines to <rtems/score/cpuimpl.h>.
Update #2809 .
2016-11-18 07:30:33 +01:00
Sebastian Huber
427dcee837
sparc: Rename CPU_Minimum_stack_frame
...
Rename SPARC-specific CPU_Minimum_stack_frame to
SPARC_Minimum_stack_frame. Rename SPARC-specific
CPU_MINIMUM_STACK_FRAME_SIZE to SPARC_MINIMUM_STACK_FRAME_SIZE.
Update #2809 .
2016-11-18 07:30:32 +01:00
Sebastian Huber
d18560ae05
sparc64: Rename CPU_Minimum_stack_frame
...
Rename SPARC64-specific CPU_Minimum_stack_frame to
SPARC64_Minimum_stack_frame. Rename SPARC64-specific
CPU_MINIMUM_STACK_FRAME_SIZE to SPARC64_MINIMUM_STACK_FRAME_SIZE.
Update #2809 .
2016-11-18 07:30:32 +01:00
Sebastian Huber
141e16d225
rtems: Conditionally define rtems_interrupt_frame
...
Update #2808 .
2016-11-18 07:30:32 +01:00
Sebastian Huber
8ef8a32d00
bsps/mips: Use <libcpu/isr_entries.h>
...
Avoid duplicate mips_vector_isr_handlers() declarations.
2016-11-18 07:30:32 +01:00
Sebastian Huber
82d30a310c
score: Move CPU_PER_CPU_CONTROL_SIZE
...
Move CPU_PER_CPU_CONTROL_SIZE and the optional CPU_Per_CPU_control to
<rtems/score/cpuimpl.h> to hide it from <rtems.h>.
2016-11-18 07:30:32 +01:00
Sebastian Huber
d78d5294cd
score: Add and use _Thread_Dispatch_direct()
...
This function is useful for operations which synchronously block, e.g.
self restart, self deletion, yield, sleep. It helps to detect if these
operations are called in the wrong context. Since the thread dispatch
necessary indicator is not used, this is more robust in some SMP
situations.
Update #2751 .
2016-11-18 07:30:31 +01:00
Sebastian Huber
acc6d9bf37
score: Remove obsolete defines
...
The thread dispatch inline option is no longer used.
2016-11-18 07:30:31 +01:00
Sebastian Huber
0e658d456c
posix: Simplify cleanup push/pop
...
The POSIX cleanup list must be proteced from asynchronous thread
deletion. Here local interrupt disable is sufficient.
2016-11-18 07:30:31 +01:00
Sebastian Huber
1897fa6d82
sptests/sp37: Better cope with internal padding
2016-11-18 07:30:31 +01:00
Sebastian Huber
04bd261726
arm: Use TPIDRPRW for current per-CPU control
...
Use the previously unused TPIDRPRW register to get the per-CPU control
of the current processor. This avoids instructions in
GET_SELF_CPU_CONTROL which are not available in Thumb mode.
2016-11-18 07:30:31 +01:00
Chris Johns
3a30c6fa5c
Fix untar mkdir when the directory exists.
2016-11-18 09:10:20 +11:00
Christian Mauderer
bb5d97f3eb
bsp/atsamv: Make size of nocache-memory configurable.
2016-11-17 15:18:03 +01:00
Jiri Gaisler
316da9356a
rtl-mdreloc-sparc.c: Do not print unaligned pointer and cause unaligned access.
...
updates #2802 .
2016-11-14 08:21:12 -06:00
Sebastian Huber
38a1449fd4
powerpc: Add _CPU_Get_current_per_CPU_control()
...
Add _CPU_Get_current_per_CPU_control() on SMP configurations. Use SPRG0
for the current per-CPU control. This reduces the code size by three
instructions and is slightly faster.
Update #2805 .
2016-11-10 09:58:37 +01:00
Sebastian Huber
58bced64b9
score: Move _CPU_Get_current_per_CPU_control()
...
Move _CPU_Get_current_per_CPU_control() from <rtems/score/cpu.h> to
<rtems/score/cpuimpl.h>.
2016-11-10 09:22:18 +01:00