Commit Graph

29577 Commits

Author SHA1 Message Date
Joel Sherrill
714efce48a conddefaultattributes.c: Add default clock to structure. 2016-04-14 16:28:10 -05:00
Joel Sherrill
04da96c763 posix/src/condattr*etpshared.c: Clean up and improve comments 2016-04-14 16:28:10 -05:00
Joel Sherrill
8228548d12 Add pthread_getconcurrency() and pthread_setconcurrency()
This is the very simple implementation specified by the Open Group
for implementations with 1:1 kernel thread to user thread mappings.

http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_getconcurrency.html

updates #2680.
2016-04-14 16:28:10 -05:00
Sebastian Huber
6efa349850 posix: Run key destructors during thread restart
POSIX key destructors must be called during thread restart.  Just like
the POSIX cleanup handlers.  This ensures that the TLS object
destructors are called during thread restart for example.  It is
important for the global construction, which uses a thread restart to
run the Init task in a clean environment.

Close #2689.
2016-04-14 08:56:53 +02:00
Sebastian Huber
a12724f934 bsp/qoriq: Fix MMU initialization for e6500
In case a hypervisor mode is present, then we must set MAS8 for some TLB
operations, otherwise the run-time behaviour is unpredictable.
2016-04-14 07:59:55 +02:00
Peng Fan
33a1a4dbdf cpukit: pppd: fix compile warning
rcsid is defined, but not used. So discard it.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
2016-04-13 12:09:25 -04:00
Sebastian Huber
f1a5630ad2 powerpc: Add FSL_EIS_MAS8 2016-04-13 09:30:28 +02:00
Sebastian Huber
3c293cc795 posix: Rename killinfo()
Apparently killinfo() is not defined by POSIX, glibc or FreeBSD.  Rename
killinfo() to _POSIX_signals_Send() to cleary mark it as an internal
function.
2016-04-12 07:58:35 +02:00
Sebastian Huber
f2ffd646fa shell: Fix warning visible with latest Newlib
Works also with previous Newlib versions.
2016-04-12 07:36:19 +02:00
Sebastian Huber
c39da818c7 rtems: Delete Region_Control::page_size 2016-04-12 07:36:19 +02:00
Sebastian Huber
60a2387552 rtems: Delete Region_Control::length 2016-04-12 07:36:19 +02:00
Sebastian Huber
acf7cf3bdb rtems: Delete Region_Control::starting_address 2016-04-12 07:36:19 +02:00
Sebastian Huber
b4b062f4df rtems: Delete Region_Control::number_of_used_blocks
Use Heap_Statistics::used_blocks instead.
2016-04-12 07:36:19 +02:00
Sebastian Huber
1142f5593a rtems: Add and use _Region_Get_and_lock()
Get region and lock allocator in _Region_Get_and_lock() in case the
region exists and unlock it in _Region_Unlock().
2016-04-12 07:36:19 +02:00
Sebastian Huber
572cb62429 score: Simplify _Objects_Get_no_protection()
This functions supports only local objects.  Thus, drop the location
parameter which was unused by all callers.

Remove superfluous includes from Classic Region implementation.
2016-04-12 07:36:18 +02:00
Sebastian Huber
0158a60cdc rtems: Ensure lock ownership for _Region_Get() 2016-04-12 07:36:18 +02:00
Sebastian Huber
d26b053d02 rtems: Remove dead code
The heap protection enabled by RTEMS_DEBUG offers the same functionality
and more.
2016-04-12 07:36:18 +02:00
Sebastian Huber
9555341f0f posix: Use a dedicated lock for scheduler changes
Update #2555.
2016-04-12 07:36:14 +02:00
Sebastian Huber
44ed3843dc posix: Use proper lock for sigaction()
Update #2555.
2016-04-08 08:25:28 +02:00
Sebastian Huber
01226ec56b score: Compatibility with latest Newlib 2016-04-08 08:22:18 +02:00
Sebastian Huber
d8ec270b33 libblock: Drop superfluous <stdlib.h> include
Drop superfluous <stdlib.h> include from <rtems/diskdevs.h> since this
leads to conflicts with the latest Newlib in case this header file is
used in the FreeBSD kernel space, e.g. for USB mass storage support.
2016-04-07 10:29:09 +02:00
Sebastian Huber
af13b01888 network: Quirk for Newlib compatibility
Newlib provides now a declration for random() in <stdlib.h>.  This
confilicts with the define in <rtems/rtems_bsdnet_internal.h>.
2016-04-07 09:09:48 +02:00
Sebastian Huber
d2f9fa510f score: Add missing declaration 2016-04-06 15:15:27 +02:00
Sebastian Huber
648a5df4ce malloc: Avoid memory leaks during task delete
Call _Malloc_Process_deferred_frees() owning the allocator lock to
prevent deletion of the executing thread while doing the deferred frees.
2016-04-06 13:52:25 +02:00
Sebastian Huber
d7e68c96b4 malloc: Fix early realloc() allocation 2016-04-06 13:50:16 +02:00
Sebastian Huber
d995a263b5 score: Delete _Chain_Append()
This function is not used in the score.

Update #2555.
2016-04-06 09:08:24 +02:00
Sebastian Huber
3bf2bcc8c6 score: Delete _Chain_Get()
This function is not used in the score.

Update #2555.
2016-04-06 09:08:24 +02:00
Sebastian Huber
223fff46b8 score: Delete _Chain_Extract()
This function is not used in the score.

Update #2555.
2016-04-06 09:08:23 +02:00
Sebastian Huber
b0354b0eee score: Delete _Chain_Insert()
This function is not used in the score.

Update #2555.
2016-04-06 09:08:23 +02:00
Sebastian Huber
cd90052365 score: Delete _Chain_Get_with_empty_check()
This function is not used in the score.

Update #2555.
2016-04-06 09:08:23 +02:00
Sebastian Huber
c130387985 score: Delete _Chain_Prepend_with_empty_check()
This function is not used in the score.

Update #2555.
2016-04-06 09:08:23 +02:00
Sebastian Huber
88f4157c93 score: Delete _Chain_Append_with_empty_check()
This function is not used in the score.

Update #2555.
2016-04-06 09:08:23 +02:00
Sebastian Huber
6406b693b6 score: Delete _Chain_Prepend()
This function is not used in the score.

Update #2555.
2016-04-06 09:08:22 +02:00
Sebastian Huber
3570ec684f rtems: Avoid Giant lock for partitions
Use an ISR lock to protect the partition state changes.

Update #2555.
2016-04-06 09:08:22 +02:00
Sebastian Huber
84f5c0a91b score: Use red-black tree for active global objects
Use a red-black tree to lookup active global objects by identifier or
name.

Update #2555.
2016-04-06 09:08:22 +02:00
Sebastian Huber
84dc9dfb24 score: Use red-black tree for active MP proxies
Update #2555.
2016-04-06 09:08:22 +02:00
Sebastian Huber
9ea69deef0 score: Add node map to _RBTree_Find_inline() 2016-04-06 09:08:21 +02:00
Sebastian Huber
8b922aafc7 posix: Fix _POSIX_signals_Check_signal()
Do not save and restore the thread wait information.  This is
superfluous and may overwrite thread wait information updates due to
interrupts leading to system corruption.
2016-04-06 09:08:21 +02:00
Sebastian Huber
3c89525608 posix: Make _POSIX_signals_Check_signal() static 2016-04-06 09:08:21 +02:00
Sebastian Huber
7d217001ab posix: Use proper lock for signals 2016-04-06 09:08:21 +02:00
Sebastian Huber
8f9658187a score: Rework MP thread queue callout support
The thread queue implementation was heavily reworked to support SMP.
This broke the multiprocessing support of the thread queues.  This is
fixed by this patch.

A thread proxy is unblocked due to three reasons
  1) timeout,
  2) request satisfaction, and
  3) extraction.

In case 1) no MPCI message must be sent.  This is ensured via the
_Thread_queue_MP_callout_do_nothing() callout set during
_Thread_MP_Allocate_proxy().

In case 2) and 3) an MPCI message must be sent.  In case we interrupt
the blocking operation during _Thread_queue_Enqueue_critical(), then
this message must be sent by the blocking thread.  For this the new
fields Thread_Proxy_control::thread_queue_callout and
Thread_Proxy_control::thread_queue_id are used.

Delete the individual API MP callout types and use
Thread_queue_MP_callout throughout.  This type is only defined in
multiprocessing configurations.  Prefix the multiprocessing parameters
with mp_ to ease code review.  Multiprocessing specific parameters are
optional due to use of a similar macro pattern.  There is no overhead
for non-multiprocessing configurations.
2016-04-06 09:08:21 +02:00
Sebastian Huber
818ad5eb76 score: Simplify _Thread_queue_Do_flush()
Also set the thread wait return code for thread proxies since this
causes no harm.
2016-04-06 09:08:20 +02:00
Sebastian Huber
9809d6e082 score: _Thread_queue_Flush() parameter changes
Change _Thread_queue_Flush() into a macro that invokes
_Thread_queue_Do_flush() with the parameter set defined by
RTEMS_MULTIPROCESSING.  For multiprocessing configurations add the
object identifier to avoid direct use of the thread wait information.

Use mp_ prefix for multiprocessing related parameters.

Rename Thread_queue_Flush_callout to Thread_queue_MP_callout since this
type will be re-used later for other operations as well.
2016-04-06 09:08:20 +02:00
Sebastian Huber
e581ea9218 score: Fix _Thread_queue_Extract_locked()
We must update the wait flags under protection of the current thread
lock, otherwise a _Thread_Timeout() running on another processor may
interfere.
2016-04-06 09:08:20 +02:00
Sebastian Huber
6ca60e5dc9 score: Delete MP support for RW locks
MP support was not implemented.
2016-04-06 09:08:20 +02:00
Sebastian Huber
97312fcc6d score: Delete Thread_Wait_information::id
This field was only by the monitor in non-multiprocessing
configurations.  Add new field Thread_Wait_information::remote_id in
multiprocessing configurations and use it for the remote procedure call
thread queue.

Add _Thread_Wait_get_id() to obtain the object identifier for debug and
system information tools.  Ensure the object layout via static asserts.
Add test cases to sptests/spthreadq01.
2016-04-06 09:08:20 +02:00
Sebastian Huber
d2c8693e15 bsp/atsam: Fix mbuf allocation 2016-04-01 08:33:29 +02:00
Sebastian Huber
9eaf564d52 score: Add and use _RBTree_Insert_inline() 2016-04-01 07:56:58 +02:00
Sebastian Huber
97127aa119 score: Add and use _RBTree_Find_inline() 2016-04-01 07:35:18 +02:00
Sebastian Huber
c01401c481 score: _User_extensions_Remove_set()
Use unprotected chain operation in _User_extensions_Remove_set() since
the caller must own the object allocator lock.

Update #2555.
2016-03-31 13:33:48 +02:00