summaryrefslogtreecommitdiffstats
path: root/cpukit/score (follow)
Commit message (Collapse)AuthorAgeFilesLines
* sparc: Optimize CPU counter supportSebastian Huber2016-06-225-38/+98
|
* Move printer initialization to separate headerSebastian Huber2016-06-221-2/+2
| | | | | | 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>.
* Rename and move RTEMS_PRINTF_ATTRIBUTE()Sebastian Huber2016-06-221-0/+11
| | | | | Rename RTEMS_PRINTF_ATTRIBUTE() into RTEMS_PRINTFLIKE() (similar to <sys/cdefs.h> __printflike()) and move it to <rtems/score/basedefs.h>.
* sparc: Rework CPU counter supportSebastian Huber2016-06-214-26/+88
| | | | | Rework CPU counter support to enable use of the GR740 up-counter via %asr22 and %asr23.
* score: Refine system initialization orderSebastian Huber2016-06-201-3/+13
|
* score: Fix thread delete race condition on SMPSebastian Huber2016-06-161-6/+17
|
* score: _Scheduler_priority_Ready_queue_initializeSebastian Huber2016-06-144-7/+17
| | | | | Use priority maximum of scheduler instance. This avoids a potential memory corruption on SMP configurations.
* score: _Thread_Create_idle_for_CPU()Sebastian Huber2016-06-141-12/+12
| | | | Use priority maximum of scheduler instance.
* i386: Fix _CPU_Bitfield_Find_first_bit()Sebastian Huber2016-06-131-6/+5
| | | | Bug introduced by b04b76c6a0c87ffc9670d356e793108411ce355a.
* score: Comment _Thread_queue_Enqueue_critical()Sebastian Huber2016-06-091-0/+9
|
* score: Add an SMP sequence lock implementationSebastian Huber2016-06-093-0/+178
|
* score: Use builtin for _Bitfield_Find_first_bit()Sebastian Huber2016-06-081-0/+2
| | | | | | In case the CPU architecture provides no specialized _CPU_Bitfield_Find_first_bit() macro, then use the __builtin_clz() builtin in case __GNUC__ is defined.
* score: Inline _Bitfield_Find_first_bit()Sebastian Huber2016-06-081-32/+23
| | | | Turn _Bitfield_Find_first_bit() macro into an inline function.
* score: Define _Priority_Bits_index() onceSebastian Huber2016-06-081-25/+13
|
* score: Define _Priority_Mask() onceSebastian Huber2016-06-081-21/+13
|
* score: Simplify priority bit map implementationSebastian Huber2016-06-0822-81/+21
| | | | | | | | | | The priority bit map can deal with a maximum of 256 priority values ranging from 0 to 255. Consistently use an unsigned int for computation, due to the usual integer promotion rules. Make Priority_bit_map_Word definition architecture-independent and define it to uint16_t. This was already the case for all architectures except PowerPC. Adjust the PowerPC bitmap support accordingly.
* score: Delete CPU_USE_GENERIC_BITFIELD_DATASebastian Huber2016-06-0820-56/+7
| | | | | | Rename __log2table into _Bitfield_Leading_zeros since it acually returns the count of leading zeros of an 8-bit integer. The value for zero is a bit odd. Provide it unconditionally.
* powerpc: Define bitmap defines to FALSESebastian Huber2016-06-081-0/+4
|
* score: Delete dead copy and paste codeSebastian Huber2016-06-0810-1064/+5
|
* rtems: Fix no protocol mutex releaseSebastian Huber2016-06-061-43/+11
| | | | | | | | | | | | | | | | 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
* arm: Fix printk warnings.Chris Johns2016-06-031-16/+18
|
* score: Maybe fix _Thread_Lock_acquire()Sebastian Huber2016-06-022-42/+7
| | | | | | | The approach with the generation number was broken. The load/store of the current lock, the thread queue and the thread queue operations were not properly synchronized. Under certain conditions on a PowerPC T4240 old thread queue operations operated on a new thread queue (NULL pointer).
* score: Fix _Thread_Lock_acquire()Sebastian Huber2016-06-011-11/+12
| | | | | | | | | A read-modify-write operation is necessary to read the last value written. See for example C11 standard or Power ISA 2.07, Book II: Power ISA Virtual Environment Architecture, Section 1.6.3 Memory Coherence Required [Category: Memory Coherence] and Section 1.7.3 Atomic Update.
* score: Use owner of thread queue for CORE mutexSebastian Huber2016-05-302-13/+8
|
* score: Rework CORE inherit priority mutexSebastian Huber2016-05-3012-385/+159
| | | | | Provide dedicated seize and surrender methods for inherit priority mutexes. This eliminates CORE_mutex_Attributes.
* score: Rework CORE priority ceiling mutexSebastian Huber2016-05-306-160/+199
| | | | | Rework seize and surrender methods to use CORE_ceiling_mutex_Control. This eliminates CORE_mutex_Disciplines.
* score: Add CORE mutex variantsSebastian Huber2016-05-306-86/+247
| | | | | | | | 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: Simplify rtems_semaphore_delete()Sebastian Huber2016-05-302-28/+0
| | | | | Due to the unified status codes, we can now use a common flush and destroy method for semaphore and mutex variants.
* score: Simplify CORE mutexSebastian Huber2016-05-303-12/+0
| | | | | 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-304-54/+39
|
* score: Use thread queue lock for MrsPSebastian Huber2016-05-302-10/+17
| | | | | | 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-3019-203/+264
| | | | | | | | | | | 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-3011-39/+53
| | | | | | 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: Adjust thread queue layoutSebastian Huber2016-05-304-41/+49
| | | | | | Adjust thread queue layout according to Newlib. This makes it possible to use the same implementation for <sys/lock.h> and CORE mutexes in the future.
* score: Add libatomic supportSebastian Huber2016-05-304-212/+80
| | | | Close #2695.
* score: Add Status_Control for all APIsSebastian Huber2016-05-2640-532/+395
| | | | | | | | | | | 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-2/+3
| | | | Close #2720.
* posix: Fix pthread_spin_unlock() error statusSebastian Huber2016-05-252-15/+6
| | | | Close #2719.
* score: Move thread queue MP callout to contextSebastian Huber2016-05-2533-965/+678
| | | | | | | | 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-2523-133/+22
| | | | | 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-26/+29
|
* mpci: Fix thread queue flush methodSebastian Huber2016-05-256-97/+56
| | | | | | | We must call the MP callout for proxies if we unblock them after a thread queue extraction. This was missing in _Thread_queue_Flush_critical(). Move thread remove timer and unblock code to new function _Thread_Remove_timer_and_unblock().
* score/i386: Fix printk format warnings.Chris Johns2016-05-251-5/+7
|
* cpukit, testsuite: Add rtems_printf and rtems_printer support.Chris Johns2016-05-251-17/+13
| | | | | | | | | | | | | | | | | | | 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: Fix blocking _CORE_message_queue_Submit()Sebastian Huber2016-05-242-4/+3
| | | | Close #2718.
* score: _CORE_message_queue_Seize()Sebastian Huber2016-05-242-4/+0
| | | | Delete unused parameter.
* score: _CORE_semaphore_Seize()Sebastian Huber2016-05-202-3/+0
| | | | Delete unused parameter.
* Replace *_Get_interrupt_disable() with *_Get()Sebastian Huber2016-05-207-7/+7
| | | | | Uniformly use *_Get() to get an object by identifier with a lock context.
* score: Rename _Objects_Get_local()Sebastian Huber2016-05-206-6/+6
| | | | | | Rename _Objects_Get_local() into _Objects_Get(). Confusions with the previous _Objects_Get() function are avoided since the Objects_Locations parameter is gone.
* score: Delete unused _Objects_Get_isr_disable()Sebastian Huber2016-05-203-98/+1
| | | | Delete now unused Objects_Locations.