summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/semobtain.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* rtems: Canonicalize Doxygen @file commentsSebastian Huber2020-12-021-3/+5
| | | | | | Use common phrases for the file brief descriptions. Update #3706.
* Canonicalize config.h includeSebastian Huber2020-04-161-1/+1
| | | | | | | | Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
* rtems: Optimize semaphore control blockSebastian Huber2019-12-111-5/+10
| | | | | | | Move variant, discipline, and global information to flags stored in a node pointer of active semaphores. Update #3833.
* score: Fix legacy RTEMS_STATIC_ASSERT()Sebastian Huber2018-10-051-4/+8
| | | | | | | | | In standard C pointer operands are not allowed in integer constant expressions. Avoid a static assertion based on an array typedef since this could lead to warnings ("variably modified 'x' at file scope" and "typedef 'x' locally defined but not used"); This implementation requires unique messages.
* score: Move thread queue timeout handlingSebastian Huber2017-10-241-1/+5
| | | | | Update #3117. Update #3182.
* score: Unify CORE mutex seize/surrenderSebastian Huber2016-09-271-1/+2
| | | | | | Use the Thread_Control::resource_count for the no protocol mutexes. Merge the no protocol and priority inherit CORE mutex seize/surrender operations.
* cpukit: Add and use Watchdog_Discipline.Gedare Bloom2016-07-251-5/+2
| | | | | | | | | 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: Fix semaphore field nameSebastian Huber2016-05-301-2/+2
|
* rtems: Move MrsP semaphore operationsSebastian Huber2016-05-301-12/+12
| | | | | Move MrsP semaphore operations to a less prominent location. Fix field name.
* score: Rework CORE inherit priority mutexSebastian Huber2016-05-301-3/+4
| | | | | Provide dedicated seize and surrender methods for inherit priority mutexes. This eliminates CORE_mutex_Attributes.
* score: Rework CORE priority ceiling mutexSebastian Huber2016-05-301-0/+10
| | | | | Rework seize and surrender methods to use CORE_ceiling_mutex_Control. This eliminates CORE_mutex_Disciplines.
* score: Add CORE mutex variantsSebastian Huber2016-05-301-2/+13
| | | | | | | | 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.
* score: Simplify CORE mutexSebastian Huber2016-05-301-1/+4
| | | | | 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-301-29/+31
|
* rtems: Simplify rtems_semaphore_delete()Sebastian Huber2016-05-301-0/+5
|
* 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: Add _Thread_queue_Context_set_MP_callout()Sebastian Huber2016-05-301-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.
* score: Add Status_Control for all APIsSebastian Huber2016-05-261-18/+13
| | | | | | | | | | | 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.
* score: Move thread queue MP callout to contextSebastian Huber2016-05-251-9/+9
| | | | | | | | 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: Move thread queue object supportSebastian Huber2016-05-251-3/+2
|
* mpci: Add missing return statementsSebastian Huber2016-05-241-1/+1
|
* score: _CORE_semaphore_Seize()Sebastian Huber2016-05-201-1/+0
| | | | Delete unused parameter.
* Replace *_Get_interrupt_disable() with *_Get()Sebastian Huber2016-05-201-1/+1
| | | | | Uniformly use *_Get() to get an object by identifier with a lock context.
* rtems: _Semaphore_Get_interrupt_disable()Sebastian Huber2016-05-201-74/+52
| | | | | | Use _Objects_Get_local() for _Semaphore_Get_interrupt_disable() to get rid of the location parameter. Move remote object handling to semaphore MPCI support.
* score: Rename _MRSP_Obtain()Sebastian Huber2016-04-211-1/+1
| | | | | | Rename _MRSP_Obtain() into _MRSP_Seize(). Rename _MRSP_Release() into _MRSP_Surrender(). This avoids confusion with the ISR lock acquire and release.
* score: Remove id parameter _CORE_mutex_Seize()Sebastian Huber2016-04-211-1/+0
| | | | Parameter was unused.
* score: Delete Thread_Wait_information::idSebastian Huber2016-04-061-1/+11
| | | | | | | | | | | 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: Fine grained locking for MrsPSebastian Huber2015-05-191-5/+2
| | | | Update #2273.
* score: Fine grained locking for mutexesSebastian Huber2015-05-191-7/+0
| | | | Update #2273.
* score: Delete _CORE_semaphore_Seize()Sebastian Huber2015-05-191-1/+1
| | | | Rename _CORE_semaphore_Seize_isr_disable() to _CORE_semaphore_Seize().
* score: Fine grained locking for semaphoresSebastian Huber2015-05-191-5/+4
| | | | Update #2273.
* score: _Objects_Get_isr_disable()Sebastian Huber2015-04-211-0/+8
| | | | | | | | Do not disable thread dispatching and do not acquire the Giant lock. This makes it possible to use this object get variant for fine grained locking. Update #2273.
* score: _Objects_Get_isr_disable()Sebastian Huber2015-04-211-5/+9
| | | | | | | Use ISR_lock_Context instead of ISR_Level to allow use of ISR locks for low-level locking. Update #2273.
* score: Multiprocessor Resource Sharing ProtocolSebastian Huber2014-05-281-1/+18
| | | | | | | | | | | | | | | | | | | | | | Add basic support for the Multiprocessor Resource Sharing Protocol (MrsP). The Multiprocessor Resource Sharing Protocol (MrsP) is defined in A. Burns and A.J. Wellings, A Schedulability Compatible Multiprocessor Resource Sharing Protocol - MrsP, Proceedings of the 25th Euromicro Conference on Real-Time Systems (ECRTS 2013), July 2013. It is a generalization of the Priority Ceiling Protocol to SMP systems. Each MrsP semaphore uses a ceiling priority per scheduler instance. These ceiling priorities can be specified with rtems_semaphore_set_priority(). A task obtaining or owning a MrsP semaphore will execute with the ceiling priority for its scheduler instance as specified by the MrsP semaphore object. Tasks waiting to get ownership of a MrsP semaphore will not relinquish the processor voluntarily. In case the owner of a MrsP semaphore gets preempted it can ask all tasks waiting for this semaphore to help out and temporarily borrow the right to execute on one of their assigned processors. The help out feature is not implemented with this patch.
* rtems: Simplify rtems_semaphore_obtain()Sebastian Huber2014-05-221-2/+4
|
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* rtems/*.c: Remove use of register keywordJoel Sherrill2014-02-031-2/+2
|
* score: Create object implementation headerSebastian Huber2013-07-261-1/+0
| | | | | | Move implementation specific parts of object.h and object.inl into new header file objectimpl.h. The object.h contains now only the application visible API.
* score: Create mpci implementation headerSebastian Huber2013-07-261-3/+0
| | | | | Move implementation specific parts of mpci.h into new header file mpciimpl.h. The mpci.h contains now only the application visible API.
* score: Create threadq implementation headerSebastian Huber2013-07-261-1/+0
| | | | | | | | 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: Create states implementation headerSebastian Huber2013-07-261-1/+0
| | | | | | Move implementation specific parts of states.h and states.inl into new header file statesimpl.h. The states.h contains now only the application visible API.
* score: Merge sysstate API into one fileSebastian Huber2013-07-241-1/+0
|
* rtems: Create attr implementation headerSebastian Huber2013-07-231-1/+1
| | | | | | Move implementation specific parts of attr.h and attr.inl into new header file attrimpl.h. The attr.h contains now only the application visible API.
* rtems: Create options implementation headerSebastian Huber2013-07-231-1/+1
| | | | | | Move implementation specific parts of options.h and options.inl into new header file optionsimpl.h. The options.h contains now only the application visible API.
* score: Avoid direct usage of _Thread_ExecutingSebastian Huber2013-07-221-0/+1
| | | | | | Pass the executing thread as a function parameter. Obtain the executing thread inside a thread dispatch critical section to avoid problems on SMP.
* score: Create semaphore implementation headerSebastian Huber2013-07-221-1/+1
| | | | | | 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.
* score: Avoid direct usage of _Thread_ExecutingSebastian Huber2013-07-181-2/+5
| | | | | | Pass the executing thread as a function parameter. Obtain the executing thread inside a thread dispatch critical section to avoid problems on SMP.
* score: Create mutex implementation headerSebastian Huber2013-07-181-1/+1
| | | | | | Move implementation specific parts of coremutex.h and coremutex.inl into new header file coremuteximpl.h. The coremutex.h contains now only the application visible API.
* rtems: Create semaphore implementation headerSebastian Huber2013-07-181-1/+1
| | | | | | Move implementation specific parts of sem.h and sem.inl into new header file semimpl.h. The sem.h contains now only the application visible API.
* score: Add _Objects_Put_for_get_isr_disable()Sebastian Huber2013-06-071-0/+2
| | | | | Provide SMP support. The ISR disable/enable is not enough to ensure mutual exclusion for SMP configurations.