Commit Graph

25685 Commits

Author SHA1 Message Date
Ralf Kirchner
3dbb68d991 dosfs: Correct handling of iconv() return value 2013-09-10 14:48:51 +02:00
Sebastian Huber
f55215a837 bsps: Fix cache manager support 2013-09-10 08:51:06 +02:00
Sebastian Huber
784d2a1cc9 arm: Fix inconsistent define usage 2013-09-06 10:06:48 +02:00
Gedare Bloom
36fdd0bcff uuid: make integer arithmetic conversion explicit
Upcast multiplication to 64-bit integer arithmetic.
2013-09-05 14:50:46 -04:00
Gedare Bloom
8ee95e609f imfs: use safe string functions
Replace strcpy and strcat with counted variants.
2013-09-05 14:44:24 -04:00
Gedare Bloom
a803e04df6 termios: check return value from semaphore obtain/release
Raise a fatal error in case of failure.
2013-09-05 14:34:32 -04:00
Gedare Bloom
74d357513f flashdisk: swap arguments to checksum helper
The arguments to rtems_fdisk_calc_crc16() are reversed when called from
rtems_fdisk_page_checksum().

26052 Operands don't affect result
2013-09-05 14:31:14 -04:00
Gedare Bloom
59261fba76 nvdisk: swap arguments to checksum helper
The arguments to rtems_nvdisk_calc_crc16() are reversed when called from
rtems_nvdisk_page_checksum().

26053 Operands don't affect result
2013-09-05 14:28:14 -04:00
Gedare Bloom
5f040b8829 sparse-disk: check return value from semaphore_obtain/release
In case obtain/release is unsuccessful, cause a fatal error.
2013-09-05 14:21:32 -04:00
Gedare Bloom
97ae1eeb38 imfs: check return value from mkdir 2013-09-05 14:13:32 -04:00
Gedare Bloom
e075b38872 untar: check return value from mkdir
Check the return value from mkdir instead of failing silently.

1063857 Unchecked return value from library
2013-09-05 14:10:52 -04:00
Gedare Bloom
b6cfbab43f dosfs: Eliminate empty case statements that fall through to default.
Also eliminates possibly dead code in case the name_type can never
actually be MSDOS_NAME_INVALID.

1063860 Logically dead code.
2013-09-05 14:03:00 -04:00
Gedare Bloom
c963ac7e39 nfs: Fix ln option processing.
If opts is NULL, then strchr() will dereference it and search for 's'.

1063863 Dereference after null check
2013-09-05 13:44:04 -04:00
Gedare Bloom
121dd88103 bdpart: Argument cannot be negative
If open(fd) fails then avoid the error path that calls close(fd).
2013-09-05 13:22:49 -04:00
Gedare Bloom
a8007dc2ca dosfs: Unsigned compared against 0
Change the type for storing the return from iconv to be signed.
2013-09-05 13:15:33 -04:00
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