Commit Graph

3505 Commits

Author SHA1 Message Date
Sebastian Huber
d0c3983814 Use linker set for system initialization
Make rtems_initialize_data_structures(),
rtems_initialize_before_drivers() and rtems_initialize_device_drivers()
static.  Rename rtems_initialize_start_multitasking() to
rtems_initialize_executive() and call the registered system
initialization handlers in this function.  Add system initialization API
available via #include <rtems/sysinit.h>.  Update the documentation
accordingly.

This is no functional change, only the method to call the existing
initialization routines changes.  Instead of direct function calls a
table of function pointers contained in the new RTEMS system
initialization linker set is used.  This table looks like this (the
actual addresses depend on the target).

nm *.exe | grep _Linker | sort
0201a2d0 D _Linker_set__Sysinit_begin
0201a2d0 D _Linker_set__Sysinit_bsp_work_area_initialize
0201a2d4 D _Linker_set__Sysinit_bsp_start
0201a2d8 D _Linker_set__Sysinit_rtems_initialize_data_structures
0201a2dc D _Linker_set__Sysinit_bsp_libc_init
0201a2e0 D _Linker_set__Sysinit_rtems_initialize_before_drivers
0201a2e4 D _Linker_set__Sysinit_bsp_predriver_hook
0201a2e8 D _Linker_set__Sysinit_rtems_initialize_device_drivers
0201a2ec D _Linker_set__Sysinit_bsp_postdriver_hook
0201a2f0 D _Linker_set__Sysinit_end

Add test sptests/spsysinit01.

Update #2408.
2015-12-11 08:17:16 +01:00
Sebastian Huber
b618d8cfc5 Add RTEMS linker sets
Update #2408.
2015-12-08 09:25:22 +01:00
Sebastian Huber
60c5461547 score: Statically initialize API extensions
Update #2408.
2015-12-08 08:38:06 +01:00
Sebastian Huber
8054b1c718 Remove <rtems/debug.h>
Close #2477.
2015-12-07 13:11:07 +01:00
Joel Sherrill
4b8184f0ed psxtmtests_plan.csv: Fix typo 2015-12-01 08:33:43 -06:00
Sebastian Huber
459ebc8397 libtests/termios04: Avoid use of freed memory 2015-11-12 08:28:45 +01:00
Sebastian Huber
aa473025f7 sapi: Add rtems_chain_get_first_unprotected()
Close #2459.
2015-11-05 11:30:09 +01:00
Sebastian Huber
893f9efe10 sptests/spsimplesched02: Fix warning
Close #2455.
2015-11-04 07:37:41 +01:00
Sebastian Huber
08a807b0ad libblock: Print block sizes and count 2015-11-02 08:21:49 +01:00
Joel Sherrill
69be1a222a CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK was undocumented and not error checked
closes #2431.
2015-10-27 07:31:29 -05:00
Sebastian Huber
f97536dcd3 basdefs.h: Add and use RTEMS_UNUSED 2015-10-26 09:13:19 +01:00
Ben Gras
7e06bd982b Fail gracefully if pax is not found
The $(PAX) variable is used unconditionally so it shouldn't be
left empty if not found at configure time. Fixes #2437.
2015-10-22 21:56:50 +02:00
Sebastian Huber
c03c71b170 libfdt: Merge into librtemscpu
This allows BSPs to use this library.
2015-10-19 09:51:28 +02:00
Sebastian Huber
175263ec91 libfdt: Initial import
Import from:

git://git.kernel.org/pub/scm/utils/dtc/dtc.git

Commit:

604e61e081e3c6c8fa1a8189c71cb3908a5bbc1e

Date:

2015-09-29T09:09:08Z
2015-10-16 07:46:56 +02:00
Sebastian Huber
54406d9f6c Delete CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
This define accidentally re-appeared.
2015-10-15 11:56:15 +02:00
Sebastian Huber
cff773f580 libstdthreads: Add C11 threads 2015-10-14 07:47:12 +02:00
Sebastian Huber
258ad71e96 SMP: Fix and optimize thread dispatching
According to the C11 and C++11 memory models only a read-modify-write
operation guarantees that we read the last value written in modification
order.  Avoid the sequential consistent thread fence and instead use the
inter-processor interrupt to set the thread dispatch necessary
indicator.
2015-09-28 13:56:57 +02:00
Sebastian Huber
8d296cd54e score: Use uintptr_t for atomic pointer operations
Do not obfuscate the standard API.
2015-09-26 21:23:53 +02:00
Sebastian Huber
1f7c5c88ca score: Fix atomic compare exchange 2015-09-25 21:48:24 +02:00
Sebastian Huber
314ff3c43f score: Fix resource count for self-contained mutex 2015-09-14 08:30:09 +02:00
Sebastian Huber
10c4636947 rbheap: Fix rtems_rbheap_free()
Remove unused descriptor of merged free chunks from the free chain and
add them to the spare descriptors.

Close #2417.
2015-09-11 11:28:13 +02:00
Sebastian Huber
5e4714b032 libtests/rbheap01: Simplify
Update #2417.
2015-09-11 11:27:33 +02:00
Sebastian Huber
808230add9 Upgrade to 4.11.99.0 2015-09-11 08:24:18 +02:00
Sebastian Huber
dafa5d8843 score: Implement priority boosting 2015-09-04 13:26:17 +02:00
Sebastian Huber
3995e6d9c2 score: Implement SMP-specific priority queue 2015-09-04 13:25:03 +02:00
Sebastian Huber
e9fbaa3b48 rbtree: Replace implementation
Use the BSD <sys/tree.h> implementation since it is faster, more
flexible and uses less storage.  See https://github.com/sebhub/rb-bench.
2015-09-03 13:58:16 +02:00
Sebastian Huber
3b3d1489e4 posix: glibc compatibility 2015-09-02 14:05:02 +02:00
Sebastian Huber
d9d0a84f85 psxtests/psxcancel: Check return status
Update #2402.
2015-09-01 14:07:51 +02:00
Sebastian Huber
44f3ea917f score: Fix return status of mutex try acquire
This fixes a copy and paste error (from libbsd).
2015-09-01 12:50:56 +02:00
Sebastian Huber
509e8d7f4d rbtree: Delete rtems_rbtree_find_control()
This function is hard to support in alternative implementations.  It has
no internal use case.
2015-09-01 09:07:08 +02:00
Sebastian Huber
2d48456ef5 rbheap: Drop direction from _RBTree_Iterate() 2015-08-31 09:59:42 +02:00
Sebastian Huber
d7c93070cc sptests/sprbtree01: Avoid internal API 2015-08-31 09:56:55 +02:00
Sebastian Huber
d128b4f2ed sptests/sprbtree01: Fix random ops test case 2015-08-31 09:56:55 +02:00
Sebastian Huber
9e9e61d27d score: Add self-contained condition implementation 2015-07-30 09:11:18 +02:00
Sebastian Huber
a1b4af4bba score: Add scheduler <sys/lock.h> support 2015-07-30 09:11:18 +02:00
Sebastian Huber
40188718f2 score: Add self-contained futex implementation 2015-07-30 09:11:18 +02:00
Sebastian Huber
7237b3e076 score: Add self-contained semaphore implementation 2015-07-30 09:11:18 +02:00
Sebastian Huber
214d8edd18 score: Add self-contained mutex implementation
This mutex implementation uses a thread priority queue with a simple
priority inheritance mechanism (similar to the object based mutexes).
The storage space must be supplied by the user (16 bytes on 32-bit
targets).
2015-07-30 09:11:18 +02:00
Sebastian Huber
08135c85d8 i2c: Fix return status of i2c dev read/write 2015-07-23 09:00:31 +02:00
Sebastian Huber
d7665823b2 score: Introduce Thread_queue_Heads
Move the storage for the thread queue heads to the threads.  Each thread
provides a set of thread queue heads allocated from a dedicated memory
pool.  In case a thread blocks on a queue, then it lends its heads to
the queue.  In case the thread unblocks, then it takes a free set of
threads from the queue.  Since a thread can block on at most one queue
this works.  This mechanism is used in FreeBSD.  The motivation for this
change is to reduce the memory demands of the synchronization objects.
On a 32-bit uni-processor configuration the Thread_queue_Control size is
now 8 bytes, compared to 64 bytes in RTEMS 4.10 (other changes reduced
the size as well).
2015-07-23 08:01:13 +02:00
Sebastian Huber
e273501233 score: Introduce Thread_queue_Queue
Separate the thread queue heads and lock from the operations.  This
enables the support for light weight objects which only support one
queuing discipline.
2015-07-23 08:00:19 +02:00
Sebastian Huber
9341773152 score: Typo 2015-07-13 08:56:57 +02:00
Sebastian Huber
f59f2fe93e score: Accept NULL pointer in _Freechain_Put()
With this a _Freechain_Put( _Freechain_Get() ) works always.
2015-07-01 08:24:45 +02:00
Sebastian Huber
fdb45d6b26 score: Freechain handler API changes
Replace the extend function with an allocator since this fits better
to the current use case.
2015-07-01 08:24:31 +02:00
Sebastian Huber
d811daca69 score: Hide SMP lock profiling impl if disabled
The problem is that empty structures have a different size in C and C++.
2015-06-26 09:22:41 +02:00
Sebastian Huber
5f31bbe105 libmisc: Simplify <rtems/stackchk.h>
Drop the <rtems/score/percpu.h> include since this file exposes a lot of
implementation details.
2015-06-26 09:16:29 +02:00
Sebastian Huber
cdf30f0550 rtems: Add rtems_interrupt_local_disable|enable()
Add rtems_interrupt_local_disable|enable() as suggested by Pavel Pisa to
emphasize that interrupts are only disabled on the current processor.
Do not define the rtems_interrupt_disable|enable|flash() macros and
functions on SMP configurations since they don't ensure system wide
mutual exclusion.
2015-06-22 08:40:26 +02:00
Sebastian Huber
f9090ac82d tmtests/tm27: Use scheduler lock 2015-06-19 21:38:52 +02:00
Sebastian Huber
f22af606d4 sptests/sp37: Fix type and simplify 2015-06-19 21:21:27 +02:00
Joel Sherrill
e6b31b27fb Remove use ticks for statistics configure option.
This was obsolete and broken based upon recent time keeping changes.

Thie build option was previously enabled by adding
USE_TICKS_FOR_STATISTICS=1 to the configure command line.

This propagated into the code as preprocessor conditionals
using the __RTEMS_USE_TICKS_FOR_STATISTICS__ conditional.
2015-06-15 13:20:17 -05:00