summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* rtems: _Message_queue_Get_interrupt_disable()Sebastian Huber2016-05-2010-365/+348
| | | | | | Use _Objects_Get_local() for _Message_queue_Get_interrupt_disable() to get rid of the location parameter. Move remote object handling to message queue MPCI support.
* rtems: Remove location from _Partition_Get()Sebastian Huber2016-05-206-124/+138
| | | | | Use _Objects_Get_local() for _Partition_Get() to get rid of the location parameter. Move remote object handling to partition MPCI support.
* mpci: Delete unused region supportSebastian Huber2016-05-201-12/+0
|
* score: Add per scheduler instance maximum prioritySebastian Huber2016-05-201-0/+1
| | | | | | | | | | | The priority values are only valid within a scheduler instance. Thus, the maximum priority value must be defined per scheduler instance. The first scheduler instance defines PRIORITY_MAXIMUM. This implies that RTEMS_MAXIMUM_PRIORITY and POSIX_SCHEDULER_MAXIMUM_PRIORITY are only valid for threads of the first scheduler instance. Further API/implementation changes are necessary to fix this. Update #2556.
* score: Rename _ISR_Flash() into _ISR_Local_flash()Sebastian Huber2016-05-202-2/+2
| | | | | | This is a preparation to remove the Giant lock. Update #2555.
* score: Rename _ISR_Disable() and _ISR_Enable()Sebastian Huber2016-05-202-4/+4
| | | | | | | | | 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.
* score: Rename _ISR_Disable_without_giant()Sebastian Huber2016-05-201-2/+2
| | | | | | | | | 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.
* rtems: Avoid Giant lock for rtems_task_delete()Sebastian Huber2016-05-202-48/+52
| | | | Update #2555.
* score: Avoid Giant lock for _Thread_Start()Sebastian Huber2016-05-201-44/+14
| | | | Update #2555.
* posix: Rework pthread_join()Sebastian Huber2016-05-201-1/+9
| | | | | | | | | Rework pthread_join() to use _Thread_Join(). Close #2402. Update #2555. Update #2626. Close #2714.
* score: Split _Thread_Restart()Sebastian Huber2016-05-201-21/+21
| | | | | | | | | | | Split _Thread_Restart() into _Thread_Restart_self() and _Thread_Restart_other(). Move content of existing _Thread_Restart_self() into new _Thread_Restart_self(). Avoid Giant lock for thread restart. _Thread_Restart_self() is a no-return function and used by _Thread_Global_construction(). Update #2555. Update #2626.
* score: Avoid superfluous life protectionSebastian Huber2016-05-201-6/+0
| | | | | | | | Disable thread dispatching is enough to prevent deletion of the executing thread. There is no need for an additional life protection. Update #2555. Update #2626.
* score: Add _Thread_Exit()Sebastian Huber2016-05-201-1/+8
| | | | | | | | The goal is to make _Thread_Exit() a no-return function in follow up patches. Update #2555. Update #2626.
* rtems: Add rtems_interrupt_lock_interrupt_disableSebastian Huber2016-05-121-0/+13
| | | | Update #2707.
* score: Avoid Giant lock for scheduler set/getSebastian Huber2016-05-122-51/+51
| | | | Update #2555.
* score: Avoid Giant lock _Scheduler_Get_affinity()Sebastian Huber2016-05-121-24/+27
| | | | Update #2555.
* score: Avoid Giant lock _Scheduler_Set_affinity()Sebastian Huber2016-05-121-19/+24
| | | | Update #2555.
* score: Use thread state lock for current stateSebastian Huber2016-05-121-2/+2
| | | | | | | In addition protect scheduler of thread by thread state lock. Enables use of scheduler per-instance locks. Update #2555.