Commit Graph
25470 Commits
Author SHA1 Message Date
Gedare Bloom e4c192655e dosfs: Unsigned compared against 0
Fix the type of "cmpltd" to be ssize_t so that assigning it to -1
will terminate processing as intended.
2013-09-05 13:09:37 -04:00
Gedare Bloom 551468c2db dosfs: Unintentional integer overflow
Explicitly promote 32-bit integer to 64-bits for multiplication.
2013-09-05 12:58:34 -04:00
Gedare Bloom 96654dcc1a shell: Out-of-bounds access
In case the length of cwd path plus the userScriptName exceeds
PATH_MAX (255), the strncat calls will overflow scriptFile. Also
check for getcwd failure.
2013-09-05 12:15:27 -04:00
Gedare Bloom a6d3525604 IMFS: Resource leak
Free fs_info in case root_node is NULL.
2013-09-05 11:53:39 -04:00
Sebastian Huber d157a4fd4d bsps/arm: Fix ARM CP15 opcode for get functions 2013-09-05 09:37:17 +02:00
Sebastian Huber 03e097b7be nios2: Include proper header file 2013-09-03 12:59:54 +02:00
Sebastian Huber 4a8c334fb2 smptests/smpatomic08: Add initialization test case 2013-09-03 11:07:37 +02:00
Sebastian Huber 3bac8a4c40 score: Use void * for some atomic pointer ops 2013-09-03 11:07:36 +02:00
Sebastian Huber 29f7d31782 score: Use unsigned long for atomic integers
Use unsigned long instead of uint_fast32_t since C11 provides only a
ATOMIC_LONG_LOCK_FREE macro constant.  This makes it also possible to
use properly typed integer literals like 123UL.  It is now clear which
compatible type should be used for the atomic integer.
2013-09-03 11:07:36 +02:00
Karel Gardas 0c47440c6a bsp/lm4f120: new BSP to support TI LM4F120 XL LaunchPad board 2013-09-02 09:06:20 +02:00
Sebastian Huber 47b6fad012 smptests/smpatomic08: Avoid copy and paste 2013-09-01 15:18:11 +02:00
Sebastian Huber 7136d7f1af smptests/smpatomic08: Simplify or/and test case
Renamed and use common integer variables.
2013-09-01 15:17:02 +02:00
Sebastian Huber d39ccd69f1 smptests/smpatomic08: Fix compare and exchange 2013-09-01 15:17:01 +02:00
WeiY 4238affc5f add atomic sub, and, or, compare_exchange test cases into smpatomic08 2013-09-01 15:17:01 +02:00
Sebastian Huber bf30999cc6 smp: Add and use _Assert_Owner_of_giant()
Add and use _ISR_Disable_without_giant() and
_ISR_Enable_without_giant() if RTEMS_SMP is defined.

On single processor systems the ISR disable/enable was the big hammer
which ensured system-wide mutual exclusion.  On SMP configurations this
no longer works since other processors do not care about disabled
interrupts on this processor and continue to execute freely.

On SMP in addition to ISR disable/enable an SMP lock must be used.
Currently we have only the Giant lock so we can check easily that ISR
disable/enable is used only in the right context.
2013-08-30 11:16:28 +02:00
Sebastian Huber 1215fd4d94 sapi: SMP support for chains
Add ISR lock to chain control for proper SMP protection.  Replace
rtems_chain_extract() with rtems_chain_explicit_extract() and
rtems_chain_insert() with rtems_chain_explicit_insert() on SMP
configurations.  Use rtems_chain_explicit_extract() and
rtems_chain_explicit_insert() to provide SMP support.
2013-08-30 11:16:28 +02:00
Sebastian Huber e127c4c9ea smptests/smpatomic08: Fix race conditions 2013-08-29 10:05:16 +02:00
Sebastian Huber 79d03e30bf smptests/smpatomic08: New test 2013-08-28 14:58:51 +02:00
Sebastian Huber 03aad60a05 score: Atomic flag changes
Delete _Atomic_Init_flag().  Change ATOMIC_INITIALIZER_FLAG into a
constant.  Rename _Atomic_Clear_flag() to _Atomic_Flag_clear().  Rename
_Atomic_Test_set_flag() to _Atomic_Flag_test_and_set().  This is now in
line with the C11 schema.
2013-08-28 14:58:50 +02:00
WeiY 58a70b7635 score: Simplify <rtems/score/cpuatomic.h>
Add proper license and copyright.
2013-08-28 14:58:50 +02:00
Sebastian Huber 4288f9fd01 score: Use static inline directly
This file uses already C11 features.  Include proper header file.
2013-08-28 14:58:50 +02:00
Sebastian Huber 2bbcb644f9 smptests: Move ATOMIC conditional to top-level 2013-08-28 14:58:50 +02:00
WeiY 697d31e660 add atomic init function 2013-08-28 14:58:50 +02:00
Sebastian Huber 7bff82f34f posix: Avoid NULL pointer access 2013-08-28 14:58:49 +02:00
Sebastian Huber 7d9fff6e28 posix: Add and use _POSIX_signals_Acquire()
Add and use _POSIX_signals_Release().  The post-switch handler is not
protected by disabled thread dispatching.  Use proper SMP lock for
signal management.
2013-08-27 12:51:46 +02:00
Sebastian Huber a4c3e717a5 score: Add SMP support to _Watchdog_Report_chain() 2013-08-27 10:48:18 +02:00
Sebastian Huber ff0dcf2c45 sptests/spthreadq01: Add SMP support 2013-08-27 10:48:17 +02:00
Sebastian Huber c955f99f6e sptests/spnsext01: Add SMP support 2013-08-27 10:48:17 +02:00
Sebastian Huber ca68215e19 posix: _POSIX_signals_Clear_process_signals()
Do not disable interrupts since the caller did this already.
2013-08-27 10:48:17 +02:00
Sebastian Huber 75f6d18ee0 rtems: Add SMP support for signals
Add and use _ASR_Get_posted_signals().  The post-switch handler is not
protected by disabled thread dispatching.  Use proper SMP lock for
signal management.
2013-08-27 10:48:17 +02:00
Sebastian Huber ef3640f7a7 ringbuf: Add SMP support 2013-08-27 10:48:17 +02:00
Sebastian Huber 4957272cb1 Filesystem: Use unprotected chain operations
This area is protected by the IO library mutex.
2013-08-27 10:48:16 +02:00
Sebastian Huber 58a5889610 posix: Protect access to _POSIX_signals_Vectors
Assume the sigaction() is called only from thread context.  Protect
against concurrent sigaction() invocations by different threads.
2013-08-27 10:48:16 +02:00
Sebastian Huber 23de794d15 score: Add and use CHAIN_INITIALIZER_ONE_NODE().
Add and use CHAIN_NODE_INITIALIZER_ONE_NODE_CHAIN(),
RTEMS_CHAIN_INITIALIZER_ONE_NODE() and
RTEMS_CHAIN_NODE_INITIALIZER_ONE_NODE_CHAIN().
2013-08-27 10:48:16 +02:00
Sebastian Huber d56f76ac93 bsps: Fix header includes 2013-08-27 10:48:16 +02:00
Sebastian Huber 07ad4b6660 libblock: Use unprotected chain extract
This area is protected by the media mutex.
2013-08-27 10:48:15 +02:00
Sebastian Huber a839d62b88 RFS: Use unprotected chain operations
This area is protected by the RFS file system instance lock.
2013-08-27 10:48:15 +02:00
Joel Sherrill 3109857c88 bsps: Add and use CLOCK_DRIVER_ISRS_PER_TICK_VALUE
pc386 set CLOCK_DRIVER_ISRS_PER_TICK to a
string rather than a numeric value. Add
CLOCK_DRIVER_ISRS_PER_TICK_VALUE and
other clean up on the clock driver.
2013-08-26 16:16:38 -04:00
Sebastian Huber db0e05ff6f score: Delete unused function parameter 2013-08-26 10:02:53 +02:00
Sebastian Huber f8f1bdad27 score: PR2140: Fix _Thread_queue_Process_timeout()
The _Thread_queue_Process_timeout() operation had several race
conditions in the event of nested interrupts.  Protect the critical
sections via disabled interrupts.
2013-08-26 10:02:53 +02:00
Sebastian Huber 215ccceed3 score: PR2140: _Thread_queue_Extract()
Return if the executing context performed the extract operation since
interrupts may interfere.
2013-08-26 10:02:53 +02:00
Sebastian Huber 842d63bae5 libblock: Avoid uninitialized variable 2013-08-26 09:53:22 +02:00
Ric Claus 2bd440ed58 bsp/xilinx-zynq: Add cache support 2013-08-26 09:53:06 +02:00
Cynthia Rempel 2f0d5e453b Initialize the string before replacing characters 2013-08-26 09:25:58 +02:00
Cynthia Rempel df533f10c0 Stop a resource leak
Stops a resource leak in the event that the system cannot malloc
2013-08-26 09:18:37 +02:00
Sebastian Huber 7cba8ae676 smp: Fix warnings 2013-08-23 12:56:35 +02:00
Sebastian Huber ec987ec00a sptests/spintrcritical20: PR2140: New test 2013-08-23 12:56:19 +02:00
Sebastian Huber 396f6442e1 psxtests/psxfatal0[12]: Update due to API changes 2013-08-23 12:54:03 +02:00
Sebastian Huber 07332ae4db score: _Thread_queue_Enqueue_with_handler()
Add thread parameter to _Thread_queue_Enqueue_with_handler() to avoid
access to global _Thread_Executing.
2013-08-23 12:54:03 +02:00
Sebastian Huber f4804efa50 Filesystem: Remove superfluous free() 2013-08-23 10:06:46 +02:00