summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/coresemimpl.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Add _Thread_queue_Object_nameSebastian Huber2017-01-311-1/+1
| | | | | | | | | | | | | Add the special thread queue name _Thread_queue_Object_name to mark thread queues embedded in an object with identifier. Using the special thread state STATES_THREAD_QUEUE_WITH_IDENTIFIER is not reliable for this purpose since the thread wait information and thread state are protected by different SMP locks in separate critical sections. Remove STATES_THREAD_QUEUE_WITH_IDENTIFIER. Add and use _Thread_queue_Object_initialize(). Update #2858.
* score: Add STATES_THREAD_QUEUE_WITH_IDENTIFIERSebastian Huber2017-01-111-1/+1
| | | | | Add thread state bit to identify thread queues that are embedded in an object with identifier.
* score: Optimize _Thread_queue_Enqueue()Sebastian Huber2016-11-241-1/+4
| | | | | | | | | Move thread state for _Thread_queue_Enqueue() to the thread queue context. This reduces the parameter count of _Thread_queue_Enqueue() from five to four (ARM for example has only four function parameter registers). Since the thread state is used after several function calls inside _Thread_queue_Enqueue() this parameter was saved on the stack previously.
* score: Rename _Thread_queue_Enqueue_critical()Sebastian Huber2016-11-231-1/+1
| | | | | Delete unused _Thread_queue_Enqueue() and rename _Thread_queue_Enqueue_critical() to _Thread_queue_Enqueue().
* score: Add thread queue enqueue calloutSebastian Huber2016-11-231-1/+1
| | | | | | | Replace the expected thread dispatch disable level with a thread queue enqueue callout. This enables the use of _Thread_Dispatch_direct() in the thread queue enqueue procedure. This avoids impossible exection paths, e.g. Per_CPU_Control::dispatch_necessary is always true.
* score: Simplify thread queue acquire/releaseSebastian Huber2016-09-081-8/+2
|
* cpukit: Add and use Watchdog_Discipline.Gedare Bloom2016-07-251-3/+0
| | | | | | | | | 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: Simplify rtems_semaphore_delete()Sebastian Huber2016-05-301-14/+0
| | | | | Due to the unified status codes, we can now use a common flush and destroy method for semaphore and mutex variants.
* score: Add semaphore variantsSebastian Huber2016-05-301-26/+28
|
* 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 Status_Control for all APIsSebastian Huber2016-05-261-57/+12
| | | | | | | | | | | 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-261-1/+2
| | | | Close #2720.
* score: Move thread queue MP callout to contextSebastian Huber2016-05-251-97/+69
| | | | | | | | 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-251-11/+0
| | | | | Get rid of the mp_id parameter used for some thread queue methods. Use THREAD_QUEUE_QUEUE_TO_OBJECT() instead.
* score: _CORE_semaphore_Seize()Sebastian Huber2016-05-201-2/+0
| | | | Delete unused parameter.
* score: Avoid Giant lock for CORE mtx/semSebastian Huber2016-04-221-19/+27
| | | | | | | Avoid Giant lock for CORE mutex and semaphore flush and delete operations. Update #2555.
* score: Introduce _Thread_queue_Flush_critical()Sebastian Huber2016-04-211-10/+36
| | | | | | | | Replace _Thread_queue_Flush() with _Thread_queue_Flush_critical() and add a filter function for customization of the thread queue flush operation. Update #2555.
* score: Fix _CORE_semaphore_Flush()Sebastian Huber2016-04-211-8/+16
| | | | | | | Use proper CORE_semaphore_Status for _CORE_semaphore_Flush() and _CORE_semaphore_Destroy() operations. Close #2696.
* score: Rework MP thread queue callout supportSebastian Huber2016-04-061-42/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The thread queue implementation was heavily reworked to support SMP. This broke the multiprocessing support of the thread queues. This is fixed by this patch. A thread proxy is unblocked due to three reasons 1) timeout, 2) request satisfaction, and 3) extraction. In case 1) no MPCI message must be sent. This is ensured via the _Thread_queue_MP_callout_do_nothing() callout set during _Thread_MP_Allocate_proxy(). In case 2) and 3) an MPCI message must be sent. In case we interrupt the blocking operation during _Thread_queue_Enqueue_critical(), then this message must be sent by the blocking thread. For this the new fields Thread_Proxy_control::thread_queue_callout and Thread_Proxy_control::thread_queue_id are used. Delete the individual API MP callout types and use Thread_queue_MP_callout throughout. This type is only defined in multiprocessing configurations. Prefix the multiprocessing parameters with mp_ to ease code review. Multiprocessing specific parameters are optional due to use of a similar macro pattern. There is no overhead for non-multiprocessing configurations.
* score: _Thread_queue_Flush() parameter changesSebastian Huber2016-04-061-28/+14
| | | | | | | | | | | | Change _Thread_queue_Flush() into a macro that invokes _Thread_queue_Do_flush() with the parameter set defined by RTEMS_MULTIPROCESSING. For multiprocessing configurations add the object identifier to avoid direct use of the thread wait information. Use mp_ prefix for multiprocessing related parameters. Rename Thread_queue_Flush_callout to Thread_queue_MP_callout since this type will be re-used later for other operations as well.
* score: Delete Thread_Wait_information::idSebastian Huber2016-04-061-1/+0
| | | | | | | | | | | This field was only by the monitor in non-multiprocessing configurations. Add new field Thread_Wait_information::remote_id in multiprocessing configurations and use it for the remote procedure call thread queue. Add _Thread_Wait_get_id() to obtain the object identifier for debug and system information tools. Ensure the object layout via static asserts. Add test cases to sptests/spthreadq01.
* score: Use constant for maximum count of CORE semaSebastian Huber2016-03-291-3/+1
|
* score: Remove Thread_queue_Queue::operations fieldSebastian Huber2016-03-291-22/+13
| | | | | | | | | Remove the Thread_queue_Queue::operations field to reduce the size of this structure. Add a thread queue operations parameter to the _Thread_queue_First(), _Thread_queue_First_locked(), _Thread_queue_Enqueue(), _Thread_queue_Dequeue() and _Thread_queue_Flush() functions. This is a preparation patch to reduce the size of several synchronization objects.
* score: Introduce Thread_queue_QueueSebastian Huber2015-07-231-2/+4
| | | | | | Separate the thread queue heads and lock from the operations. This enables the support for light weight objects which only support one queuing discipline.
* score: Inline _CORE_semaphore_Surrender()Sebastian Huber2015-05-191-2/+40
|
* score: Inline _CORE_semaphore_Flush()Sebastian Huber2015-05-191-2/+9
|
* score: Delete _CORE_semaphore_Seize()Sebastian Huber2015-05-191-29/+1
| | | | Rename _CORE_semaphore_Seize_isr_disable() to _CORE_semaphore_Seize().
* score: Fine grained locking for semaphoresSebastian Huber2015-05-191-6/+7
| | | | Update #2273.
* score: Delete Thread_queue_Control::timeout_statusSebastian Huber2015-05-191-0/+1
| | | | | Use a parameter for _Thread_queue_Enqueue() instead to reduce memory usage.
* score: Add Thread_queue_Control::LockSebastian Huber2015-05-191-7/+12
| | | | | | | | | | | 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: Delete Thread_queue_Control::stateSebastian Huber2015-04-231-1/+7
| | | | | Use a parameter for _Thread_queue_Enqueue() instead to reduce memory usage.
* score: _Objects_Get_isr_disable()Sebastian Huber2015-04-211-5/+5
| | | | | | | Use ISR_lock_Context instead of ISR_Level to allow use of ISR locks for low-level locking. Update #2273.
* cpukit: Remove old DESCRIPTION: in commentsJoel Sherrill2015-03-111-3/+0
| | | | These were remnants of pre-Doxygen comment style.
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* score: _Thread_queue_Enqueue_with_handler()Sebastian Huber2013-08-231-1/+1
| | | | | Add thread parameter to _Thread_queue_Enqueue_with_handler() to avoid access to global _Thread_Executing.
* Include missing <rtems/score/threaddispatch.h>Sebastian Huber2013-07-261-0/+1
|
* score: Create threadq implementation headerSebastian Huber2013-07-261-3/+1
| | | | | | | | Move implementation specific parts of tqdata.h, threadq.h and threadq.inl into new header file threadqimpl.h. The threadq.h contains now only the application visible API. Delete tqdata.h.
* score: Avoid direct usage of _Thread_ExecutingSebastian Huber2013-07-221-3/+4
| | | | | | Pass the executing thread as a function parameter. Obtain the executing thread inside a thread dispatch critical section to avoid problems on SMP.
* score: Add const qualifierSebastian Huber2013-07-221-4/+4
|
* score: Create semaphore implementation headerSebastian Huber2013-07-221-0/+255
Move implementation specific parts of coresem.h and coresem.inl into new header file coresemimpl.h. The coresem.h contains now only the application visible API.