summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-09-21rtems: Add rtems_task_get_priority()Sebastian Huber3-0/+107
Update #2556. Update #2784.
2016-09-21score: Rework thread priority managementSebastian Huber6-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.
2016-09-08score: Introduce _Thread_Get_priority()Sebastian Huber1-2/+2
Avoid direct access to thread internal data fields.
2016-09-08score: Introduce Thread_queue_Lock_contextSebastian Huber5-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.
2016-09-08score: Simplify thread queue acquire/releaseSebastian Huber3-6/+6
2016-08-04score: Fix a release/cancel job race conditionSebastian Huber9-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.
2016-08-04score: Indroduce cancel job scheduler operationSebastian Huber1-1/+1
Do not use a deadline value of zero to indicate a job cancellation. Use a dedicated scheduler operation for this.
2016-08-03score: Fix for RTEMS_DEBUGSebastian Huber1-0/+1
2016-07-27score: Turn thread lock into thread wait lockSebastian Huber6-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.
2016-07-25cpukit/rtems: fix return type mismatch for _TOD_To_secondsGedare Bloom1-1/+1
2016-07-25cpukit: Add and use Watchdog_Discipline.Gedare Bloom6-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
2016-07-04rtems+bsps/cache: Define cache manager operations for code synchronization ↵Pavel Pisa1-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.
2016-07-01rtems: Fix rtems_task_set_scheduler() APISebastian Huber2-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.
2016-06-30score: Avoid atomic fences for thread wait flagsSebastian Huber4-13/+4
The use of atomic fences is brittle and may break due to changes in different areas which is hard to manage.
2016-06-24score: Change Priority_Control to 64-bitSebastian Huber1-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.
2016-06-22score: Modify release job scheduler operationSebastian Huber1-3/+4
Pass the deadline in watchdog ticks to the scheduler. Update #2173.
2016-06-22score: Introduce map priority scheduler operationSebastian Huber3-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.
2016-06-22rtems: Rework RTEMS API to SuperCore prioritySebastian Huber6-109/+191
Use same structure as POSIX API for thread priority conversion to/from SuperCore.
2016-06-22Avoid <rtems/print.h> in <rtems/rtems/ratemon.h>Sebastian Huber1-2/+3
This gets rid of the pull in of <stdarg.h> via <rtems.h> via <rtems/rtems/ratemon.h> via <rtems/print.h>.
2016-06-22Move printer initialization to separate headerSebastian Huber1-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>.
2016-06-16rtems: Fix rtems_semaphore_create()Sebastian Huber1-0/+4
Destroy the thread queue in case of a priority ceiling violation, otherwise the SMP profiling data gets corrupted.
2016-06-07rtems: Simplify rtems_semaphore_create()Sebastian Huber1-132/+113
Remove superfluous includes. Use one attribute compare for each semaphore variant. Text size drops by 10% on PowerPC due to this.
2016-06-06rtems: Fix no protocol mutex releaseSebastian Huber1-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
2016-05-30rtems: Remove superfluous includesSebastian Huber1-5/+0
2016-05-30rtems: Fix semaphore field nameSebastian Huber4-7/+7
2016-05-30rtems: Move MrsP semaphore operationsSebastian Huber6-26/+26
Move MrsP semaphore operations to a less prominent location. Fix field name.
2016-05-30score: Rework CORE inherit priority mutexSebastian Huber8-38/+28
Provide dedicated seize and surrender methods for inherit priority mutexes. This eliminates CORE_mutex_Attributes.
2016-05-30score: Rework CORE priority ceiling mutexSebastian Huber7-51/+100
Rework seize and surrender methods to use CORE_ceiling_mutex_Control. This eliminates CORE_mutex_Disciplines.
2016-05-30score: Add CORE mutex variantsSebastian Huber8-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.
2016-05-30rtems: Remove superfluous includesSebastian Huber1-11/+1
2016-05-30rtems: Simplify rtems_semaphore_delete()Sebastian Huber1-11/+6
Due to the unified status codes, we can now use a common flush and destroy method for semaphore and mutex variants.
2016-05-30rtems: Simplify rtems_semaphore_flush()Sebastian Huber1-10/+5
Due to the unified status codes, we can now use a common flush method for semaphore and mutex variants.
2016-05-30score: Simplify CORE mutexSebastian Huber6-33/+53
Remove superfluous support for simple binary semaphores. With this we can get rid of the CORE_MUTEX_NESTING_BLOCKS variant.
2016-05-30score: Add semaphore variantsSebastian Huber7-122/+178
2016-05-30rtems: Simplify rtems_semaphore_delete()Sebastian Huber3-28/+28
2016-05-30score: Use thread queue lock for MrsPSebastian Huber1-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.
2016-05-30score: _CORE_mutex_Check_dispatch_for_seize()Sebastian Huber1-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().
2016-05-30score: Add _Thread_queue_Context_set_MP_callout()Sebastian Huber15-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.
2016-05-26score: Add Status_Control for all APIsSebastian Huber30-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.
2016-05-26Fix semaphore post overflow statusSebastian Huber2-1/+2
Close #2720.
2016-05-25score: Move thread queue MP callout to contextSebastian Huber19-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.
2016-05-25score: Get rid of mp_id parameterSebastian Huber10-13/+1
Get rid of the mp_id parameter used for some thread queue methods. Use THREAD_QUEUE_QUEUE_TO_OBJECT() instead.
2016-05-25score: Move thread queue object supportSebastian Huber3-10/+4
2016-05-25cpukit, testsuite: Add rtems_printf and rtems_printer support.Chris Johns2-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.
2016-05-24score: _CORE_message_queue_Seize()Sebastian Huber1-1/+0
Delete unused parameter.
2016-05-24mpci: Add missing return statementsSebastian Huber8-8/+8
2016-05-20score: _CORE_semaphore_Seize()Sebastian Huber1-1/+0
Delete unused parameter.
2016-05-20Replace *_Get_interrupt_disable() with *_Get()Sebastian Huber28-50/+28
Uniformly use *_Get() to get an object by identifier with a lock context.
2016-05-20score: Rename _Objects_Get_local()Sebastian Huber7-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.
2016-05-20rtems: _Semaphore_Get_interrupt_disable()Sebastian Huber8-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.