summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Delete Thread_queue_Control::timeout_statusSebastian Huber2015-05-199-11/+19
| | | | | Use a parameter for _Thread_queue_Enqueue() instead to reduce memory usage.
* score: Add Thread_queue_Control::LockSebastian Huber2015-05-196-14/+13
| | | | | | | | | | | Move the complete thread queue enqueue procedure into _Thread_queue_Enqueue_critical(). It is possible to use the thread queue lock to protect state of the object embedding the thread queue. This enables per object fine grained locking in the future. Delete _Thread_queue_Enter_critical_section(). Update #2273.
* score: Generalize _Event_Timeout()Sebastian Huber2015-05-193-72/+7
| | | | | | | Add a thread wait timeout code. Replace _Event_Timeout() with a general purpose _Thread_Timeout() watchdog handler. Update #2273.
* score: Reduce thread wait statesSebastian Huber2015-05-192-4/+4
| | | | | | | | | | Merge THREAD_WAIT_STATE_SATISFIED, THREAD_WAIT_STATE_TIMEOUT, THREAD_WAIT_STATE_INTERRUPT_SATISFIED, and THREAD_WAIT_STATE_INTERRUPT_TIMEOUT into one state THREAD_WAIT_STATE_READY_AGAIN. This helps to write generic routines to block a thread. Update #2273.
* rtems: Use once mutex for timer server initSebastian Huber2015-05-191-2/+3
|
* score: New timer server implementationSebastian Huber2015-05-193-399/+227
| | | | | | | | Use mostly the standard watchdog operations. Use a system event for synchronization. This implementation is simpler and offers better SMP performance. Close #2131.
* score: Add Watchdog_IteratorSebastian Huber2015-05-191-0/+6
| | | | | | | | | | Rewrite the _Watchdog_Insert(), _Watchdog_Remove() and _Watchdog_Tickle() functions to use iterator items to synchronize concurrent operations. This makes it possible to get rid of the global variables _Watchdog_Sync_level and _Watchdog_Sync_count which are a blocking point for scalable SMP solutions. Update #2307.
* score: Add header to _Watchdog_Remove()Sebastian Huber2015-05-1914-18/+60
| | | | | | | | Add watchdog header parameter to _Watchdog_Remove() to be in line with the other operations. Add _Watchdog_Remove_ticks() and _Watchdog_Remove_seconds() for convenience. Update #2307.
* score: _Thread_queue_Extract()Sebastian Huber2015-05-195-5/+5
| | | | | Remove thread queue parameter from _Thread_queue_Extract() since the current thread queue is stored in the thread control block.
* score: Delete Thread_queue_Control::stateSebastian Huber2015-04-232-2/+2
| | | | | Use a parameter for _Thread_queue_Enqueue() instead to reduce memory usage.
* score: Add _Thread_Get_interrupt_disable()Sebastian Huber2015-04-217-74/+57
| | | | | | | | | | Remove _Thread_Acquire() and _Thread_Acquire_for_executing(). Add utility functions for the default thread lock. Use the default thread lock for the RTEMS events. There is no need to disable thread dispatching and a Giant acquire in _Event_Timeout() since this was already done by the caller. Update #2273.
* score: _Objects_Get_isr_disable()Sebastian Huber2015-04-211-0/+8
| | | | | | | | Do not disable thread dispatching and do not acquire the Giant lock. This makes it possible to use this object get variant for fine grained locking. Update #2273.
* score: _Objects_Get_isr_disable()Sebastian Huber2015-04-212-8/+16
| | | | | | | Use ISR_lock_Context instead of ISR_Level to allow use of ISR locks for low-level locking. Update #2273.
* score: Rename _Watchdog_Reset()Sebastian Huber2015-04-141-2/+1
| | | | Update #2307.
* score: Add Watchdog_HeaderSebastian Huber2015-04-133-22/+22
| | | | | | | This type is intended to encapsulate all state to manage a watchdog chain. Update #2307.
* score: Split _Watchdog_Adjust()Sebastian Huber2015-04-131-1/+1
| | | | | | | | | Split _Watchdog_Adjust() into _Watchdog_Adjust_backward() and _Watchdog_Adjust_forward(). Remove Watchdog_Adjust_directions, _Watchdog_Adjust_seconds() and _Watchdog_Adjust_ticks(). This avoids to check the same condition again. Update #2307.
* rtems: Atomically suspend/resume tasksSebastian Huber2015-04-082-12/+10
|
* score: Add scheduler acquire/releaseSebastian Huber2015-03-241-3/+3
| | | | | | | This is currently a global lock for all scheduler instances. It should get replaced with one lock per scheduler instance in the future. Update #2273.
* Disable deprecated warning on implementation of deprecated methodsJoel Sherrill2015-03-178-4/+46
|
* cpukit: Remove old DESCRIPTION: in commentsJoel Sherrill2015-03-113-37/+15
| | | | These were remnants of pre-Doxygen comment style.
* cpukit: deprecate task variables. closes #2293.Gedare Bloom2015-03-102-4/+12
|
* cpukit: deprecate rtems_clock_get(). closes #2294.Gedare Bloom2015-03-101-1/+4
|
* cpukit: deprecate notepadsGedare Bloom2015-03-101-3/+9
| | | | | | | | | | | | | | | Deprecate Classic API Notepads. Mark task_set/get_note() with the deprecated attribute, and also mark the notepads field. Replace disable with enable option for notepads in confdefs.h, and make notepads disabled by default. The previous option CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS is now unused and will emit a compile-time warning. A new option CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS is available to turn on notepads, but it also will emit a compile-time warning to indicate that notepads are deprecated. Closes #2265
* Fix more Doxygen typosJoel Sherrill2015-03-061-1/+1
|
* Fix a number of minor Doxygen formatting issuesJoel Sherrill2015-03-062-5/+5
|
* score: Implement fine-grained locking for eventsSebastian Huber2015-03-0512-221/+205
| | | | | | | Use the ISR lock of the thread object to protect the event state and use the Giant lock only for the blocking operations. Update #2273.
* score: Simplify and fix signal deliverySebastian Huber2015-03-051-1/+0
| | | | | | | Deliver the POSIX signals after the thread state was updated to avoid race-conditions on SMP configurations. Update #2273.
* score: Update _Thread_Heir only if necessarySebastian Huber2015-03-051-35/+15
| | | | | | | | | | | | | | | | | | | | Previously, the _Thread_Heir was updated unconditionally in case a new heir was determined. The _Thread_Dispatch_necessary was only updated in case the executing thread was preemptible or an internal thread was unblocked. Change this to update the _Thread_Heir and _Thread_Dispatch_necessary only in case the currently selected heir thread is preemptible or a dispatch is forced. Move the schedule decision into the change priority operation and use the schedule operation only in rtems_task_mode() in case preemption is enabled or an ASR dispatch is necessary. This is a behaviour change. Previously, the RTEMS_NO_PREEMPT also prevented signal delivery in certain cases (not always). Now, signal delivery is no longer influenced by RTEMS_NO_PREEMPT. Since the currently selected heir thread is used to determine if a new heir is chosen, non-preemptible heir threads currently not executing now prevent a new heir. This may have an application impact, see change test tm04. Document this change in sp04. Update #2273.
* score: Add and use PRIORITY_PSEUDO_ISRSebastian Huber2015-03-051-1/+1
|
* score: C/C++ compatibility macros for ISR locksSebastian Huber2015-03-051-0/+45
| | | | Update #2273.
* libnetworking: Fix close of active socketsSebastian Huber2015-01-201-0/+5
| | | | | | | Send a special event to notify tasks waiting for a socket state change in case this socket gets closed. This prevents a use after free. Close #785.
* rtems: Add rtems_cache_coherent_allocate()Sebastian Huber2014-11-271-0/+61
| | | | Add rtems_cache_coherent_free() and rtems_cache_coherent_add_area().
* score: Rework global constructionSebastian Huber2014-10-131-1/+12
| | | | | | Ensure that the global construction is performed in the context of the first initialization thread. On SMP this was not guaranteed in the previous implementation.
* rtems: SMP fix for timer serverSebastian Huber2014-08-271-1/+3
|
* rtems: Add more clock tick functionsSebastian Huber2014-08-261-0/+71
| | | | | Add rtems_clock_tick_later(), rtems_clock_tick_later_usec() and rtems_clock_tick_before().
* rtems: Inline rtems_clock_get_ticks_since_boot()Sebastian Huber2014-08-253-39/+7
| | | | Update documentation.
* score: Add SMP support to the cache managerDaniel Cederman2014-08-221-0/+82
| | | | | | | | | Adds functions that allows the user to specify which cores that should perform the cache operation. SMP messages are sent to all the specified cores and the caller waits until all cores have acknowledged that they have flushed their cache. If CPU_CACHE_NO_INSTRUCTION_CACHE_SNOOPING is defined the instruction cache invalidation function will perform the operation on all cores using the previous method.
* Delete unused *_Is_null() functionsSebastian Huber2014-07-267-86/+0
|
* semdelete.c: Correct spacingJoel Sherrill2014-07-141-1/+1
|
* rtems: Delete unused <rtems/rtems/atomic.h>Sebastian Huber2014-06-303-43/+0
|
* score: Remove scheduler parameter from most opsSebastian Huber2014-06-233-20/+4
| | | | | | | | | | | | | Remove the scheduler parameter from most high level scheduler operations like - _Scheduler_Block(), - _Scheduler_Unblock(), - _Scheduler_Change_priority(), - _Scheduler_Update_priority(), - _Scheduler_Release_job(), and - _Scheduler_Yield(). This simplifies the scheduler operations usage.
* score: Fix _Thread_Delay_ended() on SMPSebastian Huber2014-06-203-11/+13
| | | | | | | | | | | | | | | | Suppose we have two tasks A and B and two processors. Task A is about to delete task B. Now task B calls rtems_task_wake_after(1) on the other processor. Task B will block on the Giant lock. Task A progresses with the task B deletion until it has to wait for termination. Now task B obtains the Giant lock, sets its state to STATES_DELAYING, initializes its watchdog timer and waits. Eventually _Thread_Delay_ended() is called, but now _Thread_Get() returned NULL since the thread is already marked as deleted. Thus task B remained forever in the STATES_DELAYING state. Instead of passing the thread identifier use the thread control block directly via the watchdog user argument. This makes _Thread_Delay_ended() also a bit more efficient.
* score: PR2181: Add _Thread_Yield()Sebastian Huber2014-06-121-2/+1
| | | | | | | | | | | | | | | | | | | The _Scheduler_Yield() was called by the executing thread with thread dispatching disabled and interrupts enabled. The rtems_task_suspend() is explicitly allowed in ISRs: http://rtems.org/onlinedocs/doc-current/share/rtems/html/c_user/Interrupt-Manager-Directives-Allowed-from-an-ISR.html#Interrupt-Manager-Directives-Allowed-from-an-ISR Unlike the other scheduler operations the locking was performed inside the operation. This lead to the following race condition. Suppose a ISR suspends the executing thread right before the yield scheduler operation. Now the executing thread is not longer in the set of ready threads. The typical scheduler operations did not check the thread state and will now extract the thread again and enqueue it. This corrupted data structures. Add _Thread_Yield() and do the scheduler yield operation with interrupts disabled. This has a negligible effect on the interrupt latency.
* score: Add and use _Thread_Owns_resources()Sebastian Huber2014-06-031-1/+1
|
* score: _Scheduler_Set_affinity()Sebastian Huber2014-06-021-0/+11
| | | | | Do not change the scheduler with this function. Documentation. Coding style.
* score: _Scheduler_Get_affinity()Sebastian Huber2014-06-021-1/+0
| | | | Drop scheduler parameter. Coding style.
* rtems: Coding styleSebastian Huber2014-06-021-19/+15
|
* score: Multiprocessor Resource Sharing ProtocolSebastian Huber2014-05-2811-10/+309
| | | | | | | | | | | | | | | | | | | | | | Add basic support for the Multiprocessor Resource Sharing Protocol (MrsP). The Multiprocessor Resource Sharing Protocol (MrsP) is defined in A. Burns and A.J. Wellings, A Schedulability Compatible Multiprocessor Resource Sharing Protocol - MrsP, Proceedings of the 25th Euromicro Conference on Real-Time Systems (ECRTS 2013), July 2013. It is a generalization of the Priority Ceiling Protocol to SMP systems. Each MrsP semaphore uses a ceiling priority per scheduler instance. These ceiling priorities can be specified with rtems_semaphore_set_priority(). A task obtaining or owning a MrsP semaphore will execute with the ceiling priority for its scheduler instance as specified by the MrsP semaphore object. Tasks waiting to get ownership of a MrsP semaphore will not relinquish the processor voluntarily. In case the owner of a MrsP semaphore gets preempted it can ask all tasks waiting for this semaphore to help out and temporarily borrow the right to execute on one of their assigned processors. The help out feature is not implemented with this patch.
* rtems: Fix sp2038 test.Chris Johns2014-05-221-14/+93
| | | | | | | | Avoid using newlib's gmtime_r call which fails with a max signed int. Add an RTEMS specific version for 1/1/1988 to 31/12/2100. Update sp2038 to test every day from 1/1/1988 to 31/12/2100. Only days need be tested as the code splits the seconds based on days.
* rtems: Simplify rtems_semaphore_obtain()Sebastian Huber2014-05-221-2/+4
|