summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* score: Fix debug thread queue context initSebastian Huber2016-12-021-2/+2
| | | | | On ARM Thumb we may have function addresses ending with 0x7f, if we are lucky.
* score: Fix thread queue context initializationSebastian Huber2016-11-283-2/+7
| | | | | Initialize the thread queue context with invalid data in debug configurations to catch missing set up steps.
* score: Optimize _Thread_queue_Enqueue()Sebastian Huber2016-11-2413-15/+47
| | | | | | | | | Move thread state for _Thread_queue_Enqueue() to the thread queue context. This reduces the parameter count of _Thread_queue_Enqueue() from five to four (ARM for example has only four function parameter registers). Since the thread state is used after several function calls inside _Thread_queue_Enqueue() this parameter was saved on the stack previously.
* score: Fix interrupt profilingSebastian Huber2016-11-241-5/+14
| | | | | | | | | | Callers of _Thread_Do_dispatch() must have a valid Per_CPU_Control::Stats::thread_dispatch_disabled_instant. Call _Profiling_Outer_most_interrupt_entry_and_exit() with the interrupt stack to not exceed Per_CPU_Control::Interrupt_frame. Update #2751.
* posix: Add self-contained pthread spinlockSebastian Huber2016-11-232-153/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Turn pthread_spinlock_t into a self-contained object. On uni-processor configurations, interrupts are disabled in the lock/trylock operations and the previous interrupt status is restored in the corresponding unlock operations. On SMP configurations, a ticket lock is a acquired and released in addition. The self-contained pthread_spinlock_t object is defined by Newlib in <sys/_pthreadtypes.h>. typedef struct { struct _Ticket_lock_Control _lock; __uint32_t _interrupt_state; } pthread_spinlock_t; This implementation is simple and efficient. However, this test case of the Linux Test Project would fail due to call of printf() and sleep() during spin lock ownership: https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c There is only limited support for profiling on SMP configurations. Delete CORE spinlock implementation. Update #2674.
* score: Rename _Thread_queue_Enqueue_critical()Sebastian Huber2016-11-2313-13/+13
| | | | | Delete unused _Thread_queue_Enqueue() and rename _Thread_queue_Enqueue_critical() to _Thread_queue_Enqueue().
* score: Add thread queue enqueue calloutSebastian Huber2016-11-2313-128/+164
| | | | | | | Replace the expected thread dispatch disable level with a thread queue enqueue callout. This enables the use of _Thread_Dispatch_direct() in the thread queue enqueue procedure. This avoids impossible exection paths, e.g. Per_CPU_Control::dispatch_necessary is always true.
* score: Robust thread dispatchSebastian Huber2016-11-231-0/+15
| | | | | | | | | | | | On SMP configurations, it is a fatal error to call blocking operating system with interrupts disabled, since this prevents delivery of inter-processor interrupts. This could lead to executing threads which are not allowed to execute resulting in undefined behaviour. The ARM Cortex-M port has a similar problem, since the interrupt state is not a part of the thread context. Update #2811.
* score: Delete obsolete scheduler debug aidSebastian Huber2016-11-231-54/+0
|
* score: Optimize self-contained objectsSebastian Huber2016-11-183-41/+43
| | | | Avoid use of the stack for the hot paths.
* score: Restrict task interrupt level to 0 on SMPSebastian Huber2016-11-181-2/+8
| | | | Update #2811.
* score: Allow interrupts during thread dispatchSebastian Huber2016-11-183-34/+2
| | | | | | | | | Use a processor-specific interrupt frame during context switches in case the executing thread is longer executes on the processor and the heir thread is about to start execution. During this period we must not use a thread stack for interrupt processing. Update #2809.
* score: Add Per_CPU_Control::Interrupt_frameSebastian Huber2016-11-181-1/+13
| | | | Update #2809.
* score: Add Per_CPU_Control::isr_dispatch_disableSebastian Huber2016-11-181-0/+6
| | | | Update #2751.
* score: Add and use _Thread_Dispatch_direct()Sebastian Huber2016-11-182-7/+17
| | | | | | | | | | This function is useful for operations which synchronously block, e.g. self restart, self deletion, yield, sleep. It helps to detect if these operations are called in the wrong context. Since the thread dispatch necessary indicator is not used, this is more robust in some SMP situations. Update #2751.
* rtems: Add scheduler processor add/removeSebastian Huber2016-11-106-2/+145
| | | | Update #2797.
* score: Add and use Thread_Control::is_idleSebastian Huber2016-11-091-0/+1
| | | | Update #2797.
* score: Rename _Scheduler_AssignmentsSebastian Huber2016-11-091-9/+35
| | | | | | | | Rename _Scheduler_Assignments into _Scheduler_Initial_assignments to make it clear that they may not reflect the run-time scheduler assignment. Update #2797.
* score: Clarify _Scheduler_SMP_Start_idle()Sebastian Huber2016-11-091-8/+12
|
* score: Add scheduler to per-CPU informationSebastian Huber2016-11-091-3/+7
| | | | | | | This makes it possible to adjust the scheduler of a processor at run-time. Update #2797.
* mpci: Use the first scheduler for MPCISebastian Huber2016-11-092-2/+2
| | | | Avoid use of processor index 0 which may have no scheduler assigned.
* score: Inline some SMP lock operations by defaultSebastian Huber2016-11-091-0/+4
| | | | | | | | | The SMP ticket lock release turned out to be suitable for inlining, e.g. a hand full of instructions, no branches. The changes in the screen files do not reflect the changes due to this commit. However, they are now up to date. Obtained on a T4240 running at 1.5GHz using GCC 7.0.0 20161108..
* Provide kernel space header filesSebastian Huber2016-11-081-0/+1
| | | | | These kernel space header files must be provided for Newlib 172e2050d95b41861db858dd9bc43a3fb4a28987.
* score: Add optional _CPU_Get_thread_executing()Sebastian Huber2016-11-071-1/+2
|
* score: Optimize self-contained mutexesSebastian Huber2016-11-041-32/+67
|
* score: Use non-inline thread queue lock opsSebastian Huber2016-11-041-0/+64
| | | | | | This reduces the code size and helps to reduce the amount of testing. Hot paths can use the _Thread_queue_Queue_acquire_critical() and _Thread_queue_Queue_release_critical() functions which are still inline.
* score: Default to non-inline SMP lock opsSebastian Huber2016-11-041-36/+7
| | | | | Use non-inline SMP lock acquire and release operations by default. Provide inline variants for the hot spots, e.g. mutex acquire/release.
* score: Conditionally enable thread resource countSebastian Huber2016-11-032-0/+4
| | | | | Maintain the thread resource count only in debug configurations. This is a performance optimization for non-debug configurations.
* score: Introduce thread resource count methodsSebastian Huber2016-11-032-8/+8
| | | | | This makes it easier to conditionally enable/disable the thread resource count usage.
* score: Simplify yield and unblock scheduler opsSebastian Huber2016-11-0211-79/+54
| | | | Update #2556.
* score: Introduce Thread_Scheduler_control::homeSebastian Huber2016-11-026-7/+6
| | | | | | | | Replace Thread_Scheduler_control::control and Thread_Scheduler_control::own_control with new Thread_Scheduler_control::home. Update #2556.
* score: Delete Thread_Scheduler_control::own_nodeSebastian Huber2016-11-026-18/+18
| | | | Update #2556.
* score: Delete Thread_Scheduler_control::nodeSebastian Huber2016-11-022-2/+1
| | | | Update #2556.
* score: Delete Resource HandlerSebastian Huber2016-11-021-104/+0
| | | | Update #2556.
* score: Second part of new MrsP implementationSebastian Huber2016-11-021-8/+0
| | | | Update #2556.
* score: Delete unused scheduler ask for help X opSebastian Huber2016-11-025-81/+0
|
* score: Simplify update priority scheduler opSebastian Huber2016-11-027-28/+16
| | | | Remove unused return status.
* score: Delete _Scheduler_Ask_for_help_if_necessarySebastian Huber2016-11-021-2/+0
| | | | | | Delete Thread_Control::Resource_node. Update #2556.
* score: Delete unused functionsSebastian Huber2016-11-021-80/+0
| | | | | | | Delete _Scheduler_Thread_change_resource_root() and _Scheduler_Thread_change_help_state(). Update #2556.
* score: First part of new MrsP implementationSebastian Huber2016-11-022-23/+145
| | | | Update #2556.
* score: Use scheduler instance specific locksSebastian Huber2016-11-021-4/+12
| | | | Update #2556.
* score: Add new SMP scheduler helping protocolSebastian Huber2016-11-029-16/+451
| | | | Update #2556.
* score: Add _Thread_Scheduler_process_requests()Sebastian Huber2016-11-021-0/+84
| | | | Update #2556.
* score: Add scheduler node requestsSebastian Huber2016-11-021-0/+4
| | | | | | | Add the ability to add/remove scheduler nodes to/from the set of scheduler nodes available to the schedulers for a particular thread. Update #2556.
* score: Add thread scheduler lockSebastian Huber2016-11-022-0/+2
| | | | Update #2556.
* score: Add _Thread_Scheduler_remove_wait_node()Sebastian Huber2016-11-022-4/+8
| | | | Update #2556.
* score: Add _Thread_Scheduler_add_wait_node()Sebastian Huber2016-11-022-8/+2
| | | | Update #2556.
* score: Add _Scheduler_Node_get_scheduler()Sebastian Huber2016-11-021-1/+1
| | | | Update #2556.
* score: Pass scheduler node to unblock operationSebastian Huber2016-11-028-26/+40
| | | | | | Changed for consistency with other scheduler operations. Update #2556.
* score: Pass scheduler node to block operationSebastian Huber2016-11-028-9/+23
| | | | | | Changed for consistency with other scheduler operations. Update #2556.