summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/condition.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-05-20Update company nameSebastian Huber1-1/+1
The embedded brains GmbH & Co. KG is the legal successor of embedded brains GmbH.
2022-03-10cpukit/: Scripted embedded brains header file clean upJoel Sherrill1-6/+0
Updates #4625.
2022-02-28score/src/[a-m]*.c: Change license to BSD-2Joel Sherrill1-3/+22
Updates #3053.
2021-06-10score: Fix initialization of thread queue contextSebastian Huber1-2/+2
Set Thread_queue_Context::timeout_absolute in _Thread_queue_Context_set_timeout_argument() to avoid using it uninitialized. The bug was introduced by a89ecaa1a94d49ddae7753d6b83923e9d2a00486.
2020-12-02score: Canonicalize Doxygen @file commentsSebastian Huber1-0/+12
Use common phrases for the file brief descriptions. Update #3706.
2020-04-16Canonicalize config.h includeSebastian Huber1-2/+2
Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
2018-07-25score: RTEMS_PREDICT_TRUE(), RTEMS_PREDICT_FALSE()Sebastian Huber1-1/+3
Add RTEMS_PREDICT_TRUE() and RTEMS_PREDICT_FALSE() for static branch prediction hints. Close #3475.
2017-10-24score: Move thread queue timeout handlingSebastian Huber1-43/+45
Update #3117. Update #3182.
2017-08-25Include missing <limits.h>Sebastian Huber1-0/+1
Update #2132.
2017-01-13configure: Remove HAVE_STRUCT__THREAD_QUEUE_QUEUESebastian Huber1-4/+0
2017-01-13score: Add Thread_queue_Queue::nameSebastian Huber1-1/+1
Update #2858.
2017-01-11score: Add STATES_THREAD_QUEUE_WITH_IDENTIFIERSebastian Huber1-1/+1
Add thread state bit to identify thread queues that are embedded in an object with identifier.
2016-12-23score: Relax <sys/lock.h> static assertionsSebastian Huber1-1/+1
Only require that the Newlib defined structure is big enough.
2016-11-24score: Optimize _Thread_queue_Enqueue()Sebastian Huber1-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.
2016-11-23score: Rename _Thread_queue_Enqueue_critical()Sebastian Huber1-1/+1
Delete unused _Thread_queue_Enqueue() and rename _Thread_queue_Enqueue_critical() to _Thread_queue_Enqueue().
2016-11-23score: Add thread queue enqueue calloutSebastian Huber1-73/+78
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.
2016-09-08score: Introduce Thread_queue_Lock_contextSebastian Huber1-12/+14
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-07-25posix: cond_timedwait remember and use clock from condattrGedare Bloom1-2/+2
updates #2745
2016-07-25cpukit: Add and use Watchdog_Discipline.Gedare Bloom1-6/+11
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-05-30score: _CORE_mutex_Check_dispatch_for_seize()Sebastian Huber1-40/+48
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 Huber1-1/+1
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 Huber1-4/+2
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-25score: Move thread queue MP callout to contextSebastian Huber1-18/+18
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 Huber1-1/+0
Get rid of the mp_id parameter used for some thread queue methods. Use THREAD_QUEUE_QUEUE_TO_OBJECT() instead.
2016-04-22score: Use _Thread_queue_Flush_critical() for condSebastian Huber1-67/+41
2016-04-06score: Rework MP thread queue callout supportSebastian Huber1-1/+3
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.
2016-03-04score: Replace watchdog handler implementationSebastian Huber1-1/+1
Use a red-black tree instead of delta chains. Close #2344. Update #2554. Update #2555. Close #2606.
2015-07-30score: Add self-contained condition implementationSebastian Huber1-0/+309