Commit Graph

27664 Commits

Author SHA1 Message Date
Sebastian Huber
7183f1cd8d score: Add compiler memory barrier to atomic ops 2015-03-05 11:51:25 +01:00
Sebastian Huber
7d6e94b12a score: Implement fine-grained locking for events
Use the ISR lock of the thread object to protect the event state and
use the Giant lock only for the blocking operations.

Update #2273.
2015-03-05 11:36:45 +01:00
Sebastian Huber
4c8a0acc3d score: Add thread wait flags
Update #2273.
2015-03-05 11:36:45 +01:00
Sebastian Huber
5b393fa5b5 score: Add thread acquire
Update #2273.
2015-03-05 11:36:44 +01:00
Sebastian Huber
43e1573c1f score: Add ISR lock to Objects_Control
This enables per-object SMP locks on SMP configurations and is the first
step to support fine-grained locking.  On uni-processor configuration
there will be no overhead.  The _Objects_Acquire() is intended to
replace _Objects_Get_isr_disable().

Update #2273.
2015-03-05 11:36:40 +01:00
Sebastian Huber
1512761142 score: Thread dispatch dis/enable without Giant
Update #2273.
2015-03-05 11:36:20 +01:00
Sebastian Huber
222dc77583 score: Add and use _Thread_Do_dispatch()
The _Thread_Dispatch() function is quite complex and the time to set up
and tear down the stack frame is significant.  Split this function into
two parts.  The complex part is now in _Thread_Do_dispatch().  Call
_Thread_Do_dispatch() in _Thread_Enable_dispatch() only if necessary.
This increases the average case performance.

Simplify _Thread_Handler() for SMP configurations.

Update #2273.
2015-03-05 11:36:19 +01:00
Sebastian Huber
6157743d67 score: Simplify and fix signal delivery
Deliver the POSIX signals after the thread state was updated to avoid
race-conditions on SMP configurations.

Update #2273.
2015-03-05 11:36:19 +01:00
Sebastian Huber
b8a5abf3fa score: Update _Thread_Heir only if necessary
Previously, the _Thread_Heir was updated unconditionally in case a new
heir was determined.  The _Thread_Dispatch_necessary was only updated in
case the executing thread was preemptible or an internal thread was
unblocked.  Change this to update the _Thread_Heir and
_Thread_Dispatch_necessary only in case the currently selected heir
thread is preemptible or a dispatch is forced.  Move the schedule
decision into the change priority operation and use the schedule
operation only in rtems_task_mode() in case preemption is enabled or an
ASR dispatch is necessary.  This is a behaviour change.  Previously, the
RTEMS_NO_PREEMPT also prevented signal delivery in certain cases (not
always).  Now, signal delivery is no longer influenced by
RTEMS_NO_PREEMPT.  Since the currently selected heir thread is used to
determine if a new heir is chosen, non-preemptible heir threads
currently not executing now prevent a new heir.  This may have an
application impact, see change test tm04.  Document this change in sp04.

Update #2273.
2015-03-05 11:36:19 +01:00
Sebastian Huber
81b03c62a6 score: Add and use PRIORITY_PSEUDO_ISR 2015-03-05 11:36:19 +01:00
Sebastian Huber
77510c72dc libmd: Disable SHA modules for m32c
Close #2219.
2015-03-05 11:34:01 +01:00
Sebastian Huber
16b2de3545 capture: Fix warnings 2015-03-05 11:33:57 +01:00
Sebastian Huber
c735cd5a1f dosfs: Fix warnings 2015-03-05 11:23:10 +01:00
Sebastian Huber
6fd5b4e486 tests: Fix warning 2015-03-05 11:23:10 +01:00
Sebastian Huber
d00612875b tests: Fix warnings 2015-03-05 11:23:10 +01:00
Sebastian Huber
5155069b23 libchip/serial: Fix warning 2015-03-05 11:23:09 +01:00
Sebastian Huber
b4fa5a5246 bsps: Fix warning 2015-03-05 11:23:09 +01:00
Sebastian Huber
2c8843882d IMFS: Fix warning 2015-03-05 11:23:09 +01:00
Sebastian Huber
29d36fa594 IMFS: Include missing header file 2015-03-05 11:23:09 +01:00
Sebastian Huber
81c73acf41 IMFS: Fix warning 2015-03-05 11:23:09 +01:00
Sebastian Huber
5d42857662 libblock: Fix warning 2015-03-05 11:23:08 +01:00
Sebastian Huber
b8aa1c10b0 score: C/C++ compatibility macros for ISR locks
Update #2273.
2015-03-05 11:22:48 +01:00
Sebastian Huber
5b5d2fd4f2 Filesystem: Delete unused null_op_fsmount_me() 2015-03-05 09:37:36 +01:00
Alexander Krutwig
7f577d3a56 tests: Refactor parallel test execution 2015-03-05 09:12:14 +01:00
Alexander Krutwig
51acbdc19c score: Documentation 2015-03-05 08:45:36 +01:00
Sebastian Huber
18d0a49129 Move test support from sapi to libmisc/testsupport 2015-03-05 08:44:59 +01:00
Sebastian Huber
8ac3549db3 score: Delete unused CPU_UNROLL_ENQUEUE_PRIORITY 2015-03-05 08:12:24 +01:00
Hesham ALMatary
3358d62fe7 score/cpu/or1k: Add cpuatomic.h to fix broken build.
4e3d9a4d6c broke or1k, cpuatomic.h has to
be added to all architectures.
2015-03-04 17:24:21 -06:00
Joel Sherrill
461a9302bc capture01: Update screen file 2015-03-04 14:53:36 -06:00
Joel Sherrill
57a914a3fb Add simple test for scandir() on all file systems tested
updates 1394
2015-03-04 14:46:14 -06:00
Gedare Bloom
56c7192606 psxtests/psxclock01: use clock() and CLOCKS_PER_SEC
Closes #2182
2015-03-04 15:38:53 -05:00
Gedare Bloom
76f37656a2 libcsupport: scale times() call to microseconds 2015-03-04 15:38:52 -05:00
Sebastian Huber
e50297e36c score: ISR lock C/C++ compatiblity issue
Empty structures are implementation-defined in C.  GCC gives them a size
of zero.  In C++ empty structures have a non-zero size.

Add ISR_LOCK_DEFINE() to define ISR locks for structures used by C and
C++.

Update #2273.
2015-03-04 12:03:04 +01:00
Sebastian Huber
d2ffb7dc77 score: Add and use _Thread_Enable_dispatch_body()
Update #2273.
2015-03-04 12:03:02 +01:00
Sebastian Huber
b99be6e53e score: Inline _Thread_Disable_dispatch() for SMP 2015-03-04 12:03:01 +01:00
Sebastian Huber
2b7fe35688 score: Add parameter to Giant acquire/release
Update #2273.
2015-03-04 12:02:50 +01:00
Sebastian Huber
c5436ff482 smptests/smpcapture01: Avoid livelock condition 2015-03-04 11:59:45 +01:00
Sebastian Huber
0324410836 smptests: Do not use Giant directly
This ensures that thread dispatching is disabled.  A Giant
acquire/release pair must take place in the same processor.
2015-03-04 07:46:16 +01:00
Joel Sherrill
396ce49604 xdr_float.c: Fix typo 2015-03-03 14:51:24 -06:00
Hesham ALMatary
262a0d7bbd or1k/or1k-exception-default.c: Eliminate dependency on BSP provided .h file 2015-03-03 15:31:04 -05:00
Hesham ALMatary
396557412a librpc: Include or1knd part of the recongnized CPUs at xdr_float.c
Close #2256
2015-03-03 13:51:47 -05:00
Joel Sherrill
e4154b8e4b mips BSPs: Remove .global for unprovided symbol
closes 2253
2015-03-03 09:18:00 -06:00
Sebastian Huber
4ccb79bc1b score: Enable SMP barriers for all configurations 2015-03-02 12:23:48 +01:00
Martin Galvan
991fdb330b ARM: Add BSP_START_NEEDS_REGISTER_INITIALIZATION
This patch adds the macro BSP_START_NEEDS_REGISTER_INITIALIZATION and
three hooks for BSP-specific register init code to arm/shared/start.S.
Said hooks are bsp_start_init_registers_core (intended for initializing
the ARM core registers), bsp_start_init_registers_banked_fiq (for the
FIQ mode banked registers) and bsp_start_init_registers_vfp (for the FPU
registers). BSP_START_NEEDS_REGISTER_INITIALIZATION would be defined in
a BSP's configure.ac (so that it appears in its bspopts.h).

This patch also adds the register init code required by the TMS570.
We've tested it with the tms570ls3137_hdk.cfg config and it works fine.
2015-02-27 12:05:36 +01:00
Martin Galvan
63e91fe689 ARM: Fix _ARMV4_Exception_fiq_default
In _ARMV4_Exception_fiq_default, set the F bit of the SPSR so that when
it gets loaded back to the CPSR in save_more_context it won't re-enable
the FIQs.

Tested on a TMS570LS3137.
2015-02-27 11:56:51 +01:00
Sebastian Huber
6357e14aac psxtests/psx05: Adjust test case
Update #2170.
2015-02-26 12:55:43 +01:00
Sebastian Huber
bd1c92480a sptests/sp76: Check that the right task executes 2015-02-26 10:20:47 +01:00
Gedare Bloom
c0e01a28da posix: fix error return code for pthread_mutex_trylock
pthread_mutex_trylock() should return EBUSY if the mutex is already
locked. The translations of CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED is
EDEADLK which is correct for pthread_mutex_lock(). This fixes the
translation for trylock.

Closes #2170.
2015-02-25 15:00:41 -05:00
Chris Johns
ee87007748 Panic on RTEMS_FAST_MUTEX network semaphore claim/release.
Fix the code to panic rather than perform a bad access if the network
semaphore is accessed without the stack being intialised.

Closes #2229.
2015-02-24 12:53:29 -05:00
Gedare Bloom
9d090fb70a sparc64: fix copyright notices.
The sparc64 port had some incorrect copyright notices affixed to
source code files.
2015-02-23 15:42:59 -05:00