summaryrefslogtreecommitdiffstats
path: root/cpukit/score (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Rework MP thread queue callout supportSebastian Huber2016-04-0623-384/+774
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* score: Simplify _Thread_queue_Do_flush()Sebastian Huber2016-04-061-4/+1
| | | | | Also set the thread wait return code for thread proxies since this causes no harm.
* score: _Thread_queue_Flush() parameter changesSebastian Huber2016-04-0610-150/+154
| | | | | | | | | | | | 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.
* score: Fix _Thread_queue_Extract_locked()Sebastian Huber2016-04-061-4/+8
| | | | | | We must update the wait flags under protection of the current thread lock, otherwise a _Thread_Timeout() running on another processor may interfere.
* score: Delete MP support for RW locksSebastian Huber2016-04-063-36/+13
| | | | MP support was not implemented.
* score: Delete Thread_Wait_information::idSebastian Huber2016-04-0614-13/+100
| | | | | | | | | | | 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.
* score: Add and use _RBTree_Insert_inline()Sebastian Huber2016-04-011-0/+40
|
* score: Add and use _RBTree_Find_inline()Sebastian Huber2016-04-011-0/+41
|
* score: _User_extensions_Remove_set()Sebastian Huber2016-03-311-1/+4
| | | | | | | Use unprotected chain operation in _User_extensions_Remove_set() since the caller must own the object allocator lock. Update #2555.
* score: Objects_Thread_queue_Extract_calloutSebastian Huber2016-03-302-3/+8
| | | | | Change parameters of the objects thread queue extract callout to avoid a cast and explicit use of the thread wait information.
* score: The API mutexes are not globalSebastian Huber2016-03-291-1/+1
|
* score: Fix _Objects_MP_Is_remote()Sebastian Huber2016-03-291-1/+1
| | | | | | Bug introduced by be8897644043e4378db7add02c3c9e1ac7fde563. Update #2555.
* score: Fix multiprocessing thread proxiesSebastian Huber2016-03-295-14/+59
| | | | | | | We must provide thread queue heads for the thread wait information for each thread proxy (thread queue heads were introduced by d7665823b208daefb6855591d808e1f3075cedcb). The thread proxy must be allocated before the enqueue operation.
* score: Allow MPCI packet receive function to blockSebastian Huber2016-03-291-0/+2
|
* score: Fix CORE mutex RTEMS_MULTIPROCESSINGSebastian Huber2016-03-291-8/+3
| | | | Make sure that the thread proxy is registered as the mutex owner.
* score: Use constant for maximum count of CORE semaSebastian Huber2016-03-294-20/+1
|
* score: Remove Thread_queue_Queue::operations fieldSebastian Huber2016-03-2931-219/+184
| | | | | | | | | Remove the Thread_queue_Queue::operations field to reduce the size of this structure. Add a thread queue operations parameter to the _Thread_queue_First(), _Thread_queue_First_locked(), _Thread_queue_Enqueue(), _Thread_queue_Dequeue() and _Thread_queue_Flush() functions. This is a preparation patch to reduce the size of several synchronization objects.
* score: Use RTEMS_UNREACHABLE()Sebastian Huber2016-03-231-0/+2
| | | | | The _CPU_Context_switch() in _Thread_Start_multitasking() does in fact not return.
* score: Add and use RTEMS_UNREACHABLESebastian Huber2016-03-234-15/+22
|
* score: Fix for RTEMS_DEBUGSebastian Huber2016-03-222-3/+10
| | | | | | | The rtems_extension_create() no longer uses the Giant lock. Ensure that we call _User_extensions_Add_set() only in the right context. Update #2555.
* score: Always declare _Objects_Get_by_name()Sebastian Huber2016-03-221-2/+0
| | | | | | | Still define it only if RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES is defined. Close #2672.
* score: Fix for RTEMS_DEBUGSebastian Huber2016-03-221-3/+8
| | | | Update #2627.
* rtems: Rework rate-monotonic schedulerSebastian Huber2016-03-221-1/+6
| | | | | | | | | | Use the default thread lock to protect rate-monotonic state changes. This avoids use of the Giant lock. Split rtems_rate_monotonic_period() body into several static functions. Introduce a new thread wait class THREAD_WAIT_CLASS_PERIOD for period objects to synchronize the blocking operation. Close #2631.
* mpci: Avoid Giant lockSebastian Huber2016-03-181-7/+11
| | | | | | The object creation/deletion is protected by the object allocator lock. Update #2555.
* mpci: Avoid Giant lockSebastian Huber2016-03-181-8/+11
| | | | Update #2555.
* score: Avoid Giant lock for CORE spinlockSebastian Huber2016-03-186-126/+80
| | | | | | Use an ISR lock to protect the spinlock state. Remove empty attributes. Update #2555.
* score: Add _Objects_Get_by_name()Sebastian Huber2016-03-182-37/+61
| | | | | | | | | | Replace _Objects_Name_to_id_string() with _Objects_Get_by_name() since all users of this function are interested in the object itself and not the identifier. Use the object allocator lock to protect the search. Update #2555.
* score: C++ compatibilitySebastian Huber2016-03-181-1/+1
|
* posix: Use per-thread lookup tree for POSIX KeysSebastian Huber2016-03-183-10/+21
| | | | | | Yields higher performance on SMP systems. Close #2625.
* score: Destroy thread timer lockSebastian Huber2016-03-181-4/+1
| | | | Update #2554.
* score: Fix CPU time used by executing threadsSebastian Huber2016-03-177-69/+99
| | | | | | | | | | | | | | The CPU time used of a thread was previously maintained per-processor mostly during _Thread_Dispatch(). However, on SMP configurations the actual processor of a thread is difficult to figure out since thread dispatching is a highly asynchronous process (e.g. via inter-processor interrupts). Only the intended processor of a thread is known to the scheduler easily. Do the CPU usage accounting during thread heir updates in the context of the scheduler operations. Provide the function _Thread_Get_CPU_time_used() to get the CPU usage of a thread using proper locks to get a consistent value. Close #2627.
* timecounter: Avoid invalid memcpy()Sebastian Huber2016-03-161-0/+8
| | | | | In uni-processor configurations we have only one timehand. Do not issue a memcpy() with equal source and destination.
* score: Fix intenal mutex attributesSebastian Huber2016-03-161-1/+1
| | | | A mutex must be released by its owner.
* score: Use allocator lock in _Objects_Get_next()Sebastian Huber2016-03-162-32/+10
| | | | | | | | Use the object allocator lock in _Objects_Get_next() instead of disabled thread dispatching since object creation and deletion is covered by this lock. Update #2555.
* score: Add and use _Objects_Get_local()Sebastian Huber2016-03-143-0/+77
| | | | | | This simplifies the handling with local-only objects. Update #2555.
* i386: Define _CPU_SMP_Prepare_start_multitasking()Sebastian Huber2016-03-041-1/+2
| | | | | Define _CPU_SMP_Prepare_start_multitasking() as empty macro to prevent a link-time error on SMP configurations.
* score: Replace watchdog handler implementationSebastian Huber2016-03-0424-871/+621
| | | | | | | | | Use a red-black tree instead of delta chains. Close #2344. Update #2554. Update #2555. Close #2606.
* score: Distribute clock tick to all online CPUsSebastian Huber2016-03-045-22/+43
| | | | Update #2554.
* score: Add _SMP_Before_multitasking_action()Sebastian Huber2016-03-045-11/+164
| | | | | | | | | The use case for this is the Cortex-A9 MPCore which has per-processor registers (only accessible by a particular processor) for the global timer used by the clock driver. This might be useful for other drivers as well. Update #2554.
* score: Add _Per_CPU_Is_boot_processor()Sebastian Huber2016-03-042-0/+21
|
* score: Add _SMP_Online_processorsSebastian Huber2016-03-042-1/+15
|
* score: Rename Per_CPU_Control::startedSebastian Huber2016-03-043-6/+6
| | | | | Rename Per_CPU_Control::started into Per_CPU_Control::online to match standard nomenclature.
* score: Add Processor_mask, etc.Sebastian Huber2016-03-043-0/+95
|
* score: Add CPU_MAXIMUM_PROCESSORSSebastian Huber2016-03-0417-0/+38
| | | | Maximum number of processors of all systems supported by this CPU port.
* i386: refactor libcpu/cpu.h into rtems/score/i386.hJoel Sherrill2016-03-032-19/+423
| | | | Fixes #2515.
* i386 ..score/cpu.h: Fix spacingJoel Sherrill2016-03-031-2/+2
|
* i386: prepare for paravirtualized interruptsGedare Bloom2016-03-033-1/+19
|
* i386: relocate fatal halt to bsp layerGedare Bloom2016-03-031-9/+2
|
* i386: remove redundant CPP definesGedare Bloom2016-03-031-3/+0
|
* i386: move idle thread into BSP layerGedare Bloom2016-03-032-9/+1
|