summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* rtems: Add rtems_task_get_priority()Sebastian Huber2016-09-213-0/+107
| | | | | Update #2556. Update #2784.
* score: Rework thread priority managementSebastian Huber2016-09-216-70/+78
| | | | | | | | | | | | | | | | | | | | | | | | | Add priority nodes which contribute to the overall thread priority. The actual priority of a thread is now an aggregation of priority nodes. The thread priority aggregation for the home scheduler instance of a thread consists of at least one priority node, which is normally the real priority of the thread. The locking protocols (e.g. priority ceiling and priority inheritance), rate-monotonic period objects and the POSIX sporadic server add, change and remove priority nodes. A thread changes its priority now immediately, e.g. priority changes are not deferred until the thread releases its last resource. Replace the _Thread_Change_priority() function with * _Thread_Priority_perform_actions(), * _Thread_Priority_add(), * _Thread_Priority_remove(), * _Thread_Priority_change(), and * _Thread_Priority_update(). Update #2412. Update #2556.
* score: Introduce _Thread_Get_priority()Sebastian Huber2016-09-081-2/+2
| | | | Avoid direct access to thread internal data fields.
* score: Introduce Thread_queue_Lock_contextSebastian Huber2016-09-085-7/+12
| | | | | | 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.
* score: Simplify thread queue acquire/releaseSebastian Huber2016-09-083-6/+6
|
* score: Fix a release/cancel job race conditionSebastian Huber2016-08-049-37/+36
| | | | | | | | Split up the potential thread priority change in the scheduler release/cancel job operation. Protect the rate monotonic period state with a dedicated SMP lock. This avoids a race condition during _Rate_monotonic_Timeout() while _Rate_monotonic_Cancel() is called on another processor.
* score: Indroduce cancel job scheduler operationSebastian Huber2016-08-041-1/+1
| | | | | Do not use a deadline value of zero to indicate a job cancellation. Use a dedicated scheduler operation for this.
* score: Fix for RTEMS_DEBUGSebastian Huber2016-08-031-0/+1
|
* score: Turn thread lock into thread wait lockSebastian Huber2016-07-276-22/+20
| | | | | | | | | The _Thread_Lock_acquire() function had a potentially infinite run-time due to the lack of fairness at atomic operations level. Update #2412. Update #2556. Update #2765.
* cpukit/rtems: fix return type mismatch for _TOD_To_secondsGedare Bloom2016-07-251-1/+1
|
* cpukit: Add and use Watchdog_Discipline.Gedare Bloom2016-07-256-9/+5
| | | | | | | | | Clock disciplines may be WATCHDOG_RELATIVE, WATCHDOG_ABSOLUTE, or WATCHDOG_NO_TIMEOUT. A discipline of WATCHDOG_RELATIVE with a timeout of WATCHDOG_NO_TIMEOUT is equivalent to a discipline of WATCHDOG_NO_TIMEOUT. updates #2732
* rtems+bsps/cache: Define cache manager operations for code synchronization ↵Pavel Pisa2016-07-041-0/+29
| | | | | | | | | | | | | | and maximal alignment. There is need for unambiguous named and defined cache function which should be called when code is updated, loaded or is self-modifying. There should be function to obtain maximal cache line length as well. This function can and should be used for allocations which can be used for data and or code and ensures that there are no partial cache lines overlaps on start and end of allocated region.
* rtems: Fix rtems_task_set_scheduler() APISebastian Huber2016-07-012-13/+31
| | | | | | | | | | | Task priorities are only valid within a scheduler instance. The rtems_task_set_scheduler() directive moves a task from one scheduler instance to another using the current priority of the thread. However, the current task priority of the source scheduler instance is undefined in the target scheduler instance. Add a third parameter to specify the priority. Close #2749.
* score: Avoid atomic fences for thread wait flagsSebastian Huber2016-06-304-13/+4
| | | | | The use of atomic fences is brittle and may break due to changes in different areas which is hard to manage.
* score: Change Priority_Control to 64-bitSebastian Huber2016-06-241-1/+1
| | | | | | | | A 32-bit Priority_Control limits the uptime to 49 days with a 1ms clock tick in case the EDF scheduler is used. Increase it to 64-bit to enable proper operation of the EDF scheduler, Close 2173.
* score: Modify release job scheduler operationSebastian Huber2016-06-221-3/+4
| | | | | | Pass the deadline in watchdog ticks to the scheduler. Update #2173.
* score: Introduce map priority scheduler operationSebastian Huber2016-06-223-28/+50
| | | | | | | | | | | Introduce map/unmap priority scheduler operations to map thread priority values from/to the user domain to/from the scheduler domain. Use the map priority operation to validate the thread priority. The EDF schedulers use this new operation to distinguish between normal priorities and priorities obtain through a job release. Update #2173. Update #2556.
* rtems: Rework RTEMS API to SuperCore prioritySebastian Huber2016-06-226-109/+191
| | | | | Use same structure as POSIX API for thread priority conversion to/from SuperCore.
* Avoid <rtems/print.h> in <rtems/rtems/ratemon.h>Sebastian Huber2016-06-221-2/+3
| | | | | This gets rid of the pull in of <stdarg.h> via <rtems.h> via <rtems/rtems/ratemon.h> via <rtems/print.h>.
* Move printer initialization to separate headerSebastian Huber2016-06-221-1/+1
| | | | | | The RTEMS print user need to know nothing about a particular printer implementation. In particular get rid of the <stdio.h> include which would be visible via <rtems.h>.
* rtems: Fix rtems_semaphore_create()Sebastian Huber2016-06-161-0/+4
| | | | | Destroy the thread queue in case of a priority ceiling violation, otherwise the SMP profiling data gets corrupted.
* rtems: Simplify rtems_semaphore_create()Sebastian Huber2016-06-071-132/+113
| | | | | Remove superfluous includes. Use one attribute compare for each semaphore variant. Text size drops by 10% on PowerPC due to this.
* rtems: Fix no protocol mutex releaseSebastian Huber2016-06-061-1/+2
| | | | | | | | | | | | | | | | The Classic binary semaphores without a locking protocol (RTEMS_BINARY_SEMAPHORE) could be released by everyone, e.g. in contrast to the POSIX mutexes (all variants) or the Classic binary semphores with priority inheritance or ceiling, there was no owner check in the release path. This behaviour was a bit unexpected and not documented. Add an owner check to the release path. Update sptests/sp42 accordingly. This change has nothing to do with the simple binary semaphores (RTEMS_SIMPLE_BINARY_SEMAPHORE) which have no owner at all. Update #2725
* rtems: Remove superfluous includesSebastian Huber2016-05-301-5/+0
|
* rtems: Fix semaphore field nameSebastian Huber2016-05-304-7/+7
|
* rtems: Move MrsP semaphore operationsSebastian Huber2016-05-306-26/+26
| | | | | Move MrsP semaphore operations to a less prominent location. Fix field name.
* score: Rework CORE inherit priority mutexSebastian Huber2016-05-308-38/+28
| | | | | Provide dedicated seize and surrender methods for inherit priority mutexes. This eliminates CORE_mutex_Attributes.
* score: Rework CORE priority ceiling mutexSebastian Huber2016-05-307-51/+100
| | | | | Rework seize and surrender methods to use CORE_ceiling_mutex_Control. This eliminates CORE_mutex_Disciplines.
* score: Add CORE mutex variantsSebastian Huber2016-05-308-33/+71
| | | | | | | | Add CORE_recursive_mutex_Control and CORE_ceiling_mutex_Control to avoid the run-time evaluation of attributes to figure out how a particular mutex methods should behave. Start with the no protocol variants. This eliminates the CORE_MUTEX_DISCIPLINES_FIFO and CORE_MUTEX_DISCIPLINES_PRIORITY disciplines.
* rtems: Remove superfluous includesSebastian Huber2016-05-301-11/+1
|
* rtems: Simplify rtems_semaphore_delete()Sebastian Huber2016-05-301-11/+6
| | | | | Due to the unified status codes, we can now use a common flush and destroy method for semaphore and mutex variants.
* rtems: Simplify rtems_semaphore_flush()Sebastian Huber2016-05-301-10/+5
| | | | | Due to the unified status codes, we can now use a common flush method for semaphore and mutex variants.
* score: Simplify CORE mutexSebastian Huber2016-05-306-33/+53
| | | | | Remove superfluous support for simple binary semaphores. With this we can get rid of the CORE_MUTEX_NESTING_BLOCKS variant.
* score: Add semaphore variantsSebastian Huber2016-05-307-122/+178
|
* rtems: Simplify rtems_semaphore_delete()Sebastian Huber2016-05-303-28/+28
|
* score: Use thread queue lock for MrsPSebastian Huber2016-05-301-0/+7
| | | | | | Replace the ISR lock in MRSP_Control with a thread queue. This simplifies the Classic semaphore implementation. Only the lock part of the thread queue is used.
* score: _CORE_mutex_Check_dispatch_for_seize()Sebastian Huber2016-05-301-1/+2
| | | | | | | | | | | Move the safety check performed by _CORE_mutex_Check_dispatch_for_seize() out of the performance critical path and generalize it. Blocking on a thread queue with an unexpected thread dispatch disabled level is illegal in all system states. Add the expected thread dispatch disable level (which may be 1 or 2 depending on the operation) to Thread_queue_Context and use it in _Thread_queue_Enqueue_critical().
* score: Add _Thread_queue_Context_set_MP_callout()Sebastian Huber2016-05-3015-73/+47
| | | | | | 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.
* score: Add Status_Control for all APIsSebastian Huber2016-05-2630-403/+133
| | | | | | | | | | | Unify the status codes of the Classic and POSIX API to use the new enum Status_Control. This eliminates the Thread_Control::Wait::timeout_code field and the timeout parameter of _Thread_queue_Enqueue_critical() and _MPCI_Send_request_packet(). It gets rid of the status code translation tables and instead uses simple bit operations to get the status for a particular API. This enables translation of status code constants at compile time. Add _Thread_Wait_get_status() to avoid direct access of thread internal data structures.
* Fix semaphore post overflow statusSebastian Huber2016-05-262-1/+2
| | | | Close #2720.
* score: Move thread queue MP callout to contextSebastian Huber2016-05-2519-124/+157
| | | | | | | | 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.
* score: Get rid of mp_id parameterSebastian Huber2016-05-2510-13/+1
| | | | | Get rid of the mp_id parameter used for some thread queue methods. Use THREAD_QUEUE_QUEUE_TO_OBJECT() instead.
* score: Move thread queue object supportSebastian Huber2016-05-253-10/+4
|
* cpukit, testsuite: Add rtems_printf and rtems_printer support.Chris Johns2016-05-252-21/+19
| | | | | | | | | | | | | | | | | | | This change adds rtems_printf and related functions and wraps the RTEMS print plugin support into a user API. All references to the plugin are removed and replaced with the rtems_printer interface. Printk and related functions are made to return a valid number of characters formatted and output. The function attribute to check printf functions has been added to rtems_printf and printk. No changes to remove warrnings are part of this patch set. The testsuite has been moved over to the rtems_printer. The testsuite has a mix of rtems_printer access and direct print control via the tmacros.h header file. The support for begink/endk has been removed as it served no purpose and only confused the code base. The testsuite has not been refactored to use rtems_printf. This is future work.
* score: _CORE_message_queue_Seize()Sebastian Huber2016-05-241-1/+0
| | | | Delete unused parameter.
* mpci: Add missing return statementsSebastian Huber2016-05-248-8/+8
|
* score: _CORE_semaphore_Seize()Sebastian Huber2016-05-201-1/+0
| | | | Delete unused parameter.
* Replace *_Get_interrupt_disable() with *_Get()Sebastian Huber2016-05-2028-50/+28
| | | | | Uniformly use *_Get() to get an object by identifier with a lock context.
* score: Rename _Objects_Get_local()Sebastian Huber2016-05-207-7/+7
| | | | | | Rename _Objects_Get_local() into _Objects_Get(). Confusions with the previous _Objects_Get() function are avoided since the Objects_Locations parameter is gone.
* rtems: _Semaphore_Get_interrupt_disable()Sebastian Huber2016-05-208-357/+286
| | | | | | Use _Objects_Get_local() for _Semaphore_Get_interrupt_disable() to get rid of the location parameter. Move remote object handling to semaphore MPCI support.