summaryrefslogtreecommitdiffstats
path: root/testsuites/tmtests/tm26/task1.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-04-07testsuites/tmtests/*: Change license to BSD-2Joel Sherrill1-3/+22
Updates #3053.
2020-03-04config: Remove <rtems/btimer.h> includeSebastian Huber1-0/+1
The use of CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER does not define anything, so remove the <rtems/btimer.h> include. Update #3875.
2019-03-07testsuite: Make the OPERATION_COUNT a test configuration parameter.Chris Johns1-0/+4
- Add a small memory test config file. - Update the small memory PowerPC BSPs to use the new test config.
2018-10-05tests: Use rtems_task_exit()Sebastian Huber1-2/+1
Update #3533.
2018-02-09tests: Support %g print format specifierSebastian Huber1-0/+1
2017-11-24Remove coverhd.hSebastian Huber1-1/+0
This header file contained timing overhead values which are hard to maintain. Update #3254.
2017-10-28tests: Remove TEST_INITSebastian Huber1-2/+0
The TEST_EXTERN is a used only by the system.h style tests and they use CONFIGURE_INIT appropriately. Update #3170. Update #3199.
2017-10-23testsuite: Use printk for all test output where possible.Chris Johns1-0/+2
- Remove the printf support leaving the direct printk support configured with TESTS_USE_PRINTK and all other output goes via a buffered vsniprintf call to printk. - Control the test's single init for functions and global data with TEST_INIT and not CONFIGURE_INIT. They are now separate. Updates #3170.
2016-11-07score: Prevent assignment to _Thread_ExecutingSebastian Huber1-11/+1
2016-11-02score: Introduce Thread_Scheduler_control::homeSebastian Huber1-4/+4
Replace Thread_Scheduler_control::control and Thread_Scheduler_control::own_control with new Thread_Scheduler_control::home. Update #2556.
2016-09-08score: Introduce Thread_queue_Lock_contextSebastian Huber1-1/+1
Introduce Thread_queue_Lock_context to contain the context necessary for thread queue lock and thread wait lock acquire/release operations to reduce the Thread_Control size.
2016-05-30score: Add _Thread_queue_Context_set_MP_callout()Sebastian Huber1-1/+1
Add _Thread_queue_Context_set_MP_callout() to simplify _Thread_queue_Context_initialize(). This makes it possible to more easily add additional fields to Thread_queue_Context.
2016-05-25score: Move thread queue MP callout to contextSebastian Huber1-5/+6
Drop the multiprocessing (MP) dependent callout parameter from the thread queue extract, dequeue, flush and unblock methods. Merge this parameter with the lock context into new structure Thread_queue_Context. This helps to gets rid of the conditionally compiled method call helpers.
2016-05-20Replace *_Get_interrupt_disable() with *_Get()Sebastian Huber1-9/+6
Uniformly use *_Get() to get an object by identifier with a lock context.
2016-05-20rtems: _Semaphore_Get_interrupt_disable()Sebastian Huber1-3/+0
Use _Objects_Get_local() for _Semaphore_Get_interrupt_disable() to get rid of the location parameter. Move remote object handling to semaphore MPCI support.
2016-05-20score: Rename _ISR_Flash() into _ISR_Local_flash()Sebastian Huber1-1/+1
This is a preparation to remove the Giant lock. Update #2555.
2016-05-20score: Rename _ISR_Disable() and _ISR_Enable()Sebastian Huber1-2/+2
Rename _ISR_Disable() into _ISR_Local_disable(). Rename _ISR_Enable() into _ISR_Local_enable(). Remove _Debug_Is_owner_of_giant(). This is a preparation to remove the Giant lock. Update #2555.
2016-05-20score: Rename _ISR_Disable_without_giant()Sebastian Huber1-6/+6
Rename _ISR_Disable_without_giant() into _ISR_Local_disable(). Rename _ISR_Enable_without_giant() into _ISR_Local_enable(). This is a preparation to remove the Giant lock. Update #2555.
2016-05-20testsuites: Avoid Giant lockSebastian Huber1-83/+15
Replace _Thread_Disable_dispatch() with _Thread_Dispatch_disable(). Replace _Thread_Enable_dispatch() with _Thread_Dispatch_enable(). This is a preparation to remove the Giant lock. Update #2555.
2016-05-20testsuites: Replace _Thread_Get()Sebastian Huber1-11/+14
Replace _Thread_Get() with _Thread_Get_interrupt_disable() to avoid the Giant lock. Update #2555.
2016-05-20score: Avoid Giant lock for _Thread_Start()Sebastian Huber1-3/+3
Update #2555.
2016-05-02rtems: Avoid Giant lock for semaphoresSebastian Huber1-3/+11
Update #2555.
2015-06-22rtems: Add rtems_interrupt_local_disable|enable()Sebastian Huber1-2/+7
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-05-29tmtests/tm26: Fix context switch to FP taskSebastian Huber1-3/+0
It is wrong to restore the floating point context here. The _Context_Switch() ends up in _Thread_Handler() which will call _Thread_Restore_fp(). In _Thread_Do_dispatch() the FP restore is after the context switch.
2015-05-29Revert "tmtests/tm26: Avoid NULL pointer access"Sebastian Huber1-0/+3
There is no NULL pointer access. Please note that _Thread_Get_executing() != executing variable in Low_task(). This reverts commit 5611839a7e2e371dd1f327c336c785095f634e55.
2015-05-29tmtests/tm26: Avoid NULL pointer accessSebastian Huber1-3/+0
2015-04-08rtems: Atomically suspend/resume tasksSebastian Huber1-1/+1
2015-03-05score: Add and use _Thread_Do_dispatch()Sebastian Huber1-0/+4
The _Thread_Dispatch() function is quite complex and the time to set up and tear down the stack frame is significant. Split this function into two parts. The complex part is now in _Thread_Do_dispatch(). Call _Thread_Do_dispatch() in _Thread_Enable_dispatch() only if necessary. This increases the average case performance. Simplify _Thread_Handler() for SMP configurations. Update #2273.
2014-05-07score: Implement forced thread migrationSebastian Huber1-2/+0
The current implementation of task migration in RTEMS has some implications with respect to the interrupt latency. It is crucial to preserve the system invariant that a task can execute on at most one processor in the system at a time. This is accomplished with a boolean indicator in the task context. The processor architecture specific low-level task context switch code will mark that a task context is no longer executing and waits that the heir context stopped execution before it restores the heir context and resumes execution of the heir task. So there is one point in time in which a processor is without a task. This is essential to avoid cyclic dependencies in case multiple tasks migrate at once. Otherwise some supervising entity is necessary to prevent life-locks. Such a global supervisor would lead to scalability problems so this approach is not used. Currently the thread dispatch is performed with interrupts disabled. So in case the heir task is currently executing on another processor then this prolongs the time of disabled interrupts since one processor has to wait for another processor to make progress. It is difficult to avoid this issue with the interrupt latency since interrupts normally store the context of the interrupted task on its stack. In case a task is marked as not executing we must not use its task stack to store such an interrupt context. We cannot use the heir stack before it stopped execution on another processor. So if we enable interrupts during this transition we have to provide an alternative task independent stack for this time frame. This issue needs further investigation.
2014-04-15score: Static scheduler configurationSebastian Huber1-14/+17
Do not allocate the scheduler control structures from the workspace. This is a preparation step for configuration of clustered/partitioned schedulers on SMP.
2014-04-04score: Add scheduler control to scheduler opsSebastian Huber1-4/+8
Scheduler operations must be free of a global scheduler context to enable partitioned/clustered scheduling.
2014-04-03score: Move priority bit map to scheduler instanceSebastian Huber1-18/+13
Delete global variables _Priority_Major_bit_map and _Priority_Bit_map. This makes it possible to use multiple priority scheduler instances for example with clustered/partitioned scheduling on SMP.
2014-03-25tmtests: convert to test.hbjorn larsson1-3/+5
2014-03-21Change all references of rtems.com to rtems.org.Chris Johns1-1/+1
2014-03-06score: Delete _Thread_Dispatch_set_disable_level()Sebastian Huber1-1/+3
This function was only used in some tests and can be replaced with other functions.
2014-03-06tmtests/tm26: Fix deadlock for SMP configurationsSebastian Huber1-1/+2
Some _Context_Switch() invocations end up in _Thread_Handler(). Create the right context for this function.
2013-12-07tmtests: Make output more uniformJoel Sherrill1-25/+28
2013-08-30smp: Add and use _Assert_Owner_of_giant()Sebastian Huber1-25/+85
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-09score: Per-CPU thread dispatch disable levelSebastian Huber1-15/+21
Use a per-CPU thread dispatch disable level. So instead of one global thread dispatch disable level we have now one instance per processor. This is a major performance improvement for SMP. On non-SMP configurations this may simplifiy the interrupt entry/exit code. The giant lock is still present, but it is now decoupled from the thread dispatching in _Thread_Dispatch(), _Thread_Handler(), _Thread_Restart_self() and the interrupt entry/exit. Access to the giant lock is now available via _Giant_Acquire() and _Giant_Release(). The giant lock is still implicitly acquired via _Thread_Dispatch_decrement_disable_level(). The giant lock is only acquired for high-level operations in interrupt handlers (e.g. release of a semaphore, sending of an event). As a side-effect this change fixes the lost thread dispatch necessary indication bug in _Thread_Dispatch(). A per-CPU thread dispatch disable level greatly simplifies the SMP support for the interrupt entry/exit code since no spin locks have to be acquired in this area. It is only necessary to get the current processor index and use this to calculate the address of the own per-CPU control. This reduces the interrupt latency considerably. All elements for the interrupt entry/exit code are now part of the Per_CPU_Control structure: thread dispatch disable level, ISR nest level and thread dispatch necessary. Nothing else is required (except CPU port specific stuff like on SPARC).
2013-07-31tmtests/tm26: Fixes for RTEMS_DEBUGSebastian Huber1-36/+100
2013-07-18rtems: Create semaphore implementation headerSebastian Huber1-0/+1
Move implementation specific parts of sem.h and sem.inl into new header file semimpl.h. The sem.h contains now only the application visible API.
2012-05-11Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill1-2/+0
Script does what is expected and tries to do it as smartly as possible. + remove occurrences of two blank comment lines next to each other after Id string line removed. + remove entire comment blocks which only exited to contain CVS Ids + If the processing left a blank line at the top of a file, it was removed.
2011-04-212011-04-21 Jennifer Averett <Jennifer.Averett@OARcorp.comJennifer Averett1-1/+2
PR 1777/cpukit * support/include/tmacros.h, tmtests/tm26/task1.c, tmtests/tm27/task1.c: Consolidated access to _Thread_Dispatch_disable_level.
2011-03-162011-03-16 Jennifer Averett <jennifer.averett@OARcorp.com>Joel Sherrill1-0/+7
PR 1743/cpu * tm26/task1.c, tm27/task1.c: Add Simple Priority Scheduler as complement to existing Deterministic Priority Scheduler. Modify these tests to verify the scheduler they are designed to work with is the default scheduler.
2011-03-162011-03-16 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber1-1/+1
* tm26/task1.c: Update for API change.
2011-02-22Add HAVE_CONFIG_H.Ralf Corsepius1-0/+4
2011-02-182011-02-18 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-12/+18
* tm26/task1.c, tm27/task1.c: Adjust for name changes.
2010-11-252010-11-25 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber1-5/+5
* tm26/task1.c, tm27/task1.c: Update for API changes.
2010-11-242010-11-24 Gedare Bloom <giddyup44@yahoo.com>Joel Sherrill1-5/+10
PR 1647/cpukit * tm26/task1.c, tm27/task1.c: Update documentation to reflect refactoring of SuperCore to add Scheduler Handler.
2010-10-252010-10-25 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber1-5/+5
* tm26/task1.c, tm27/task1.c: Do not violate chain API.