summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/coremutexsurrender.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Add _Thread_queue_Surrender()Sebastian Huber2016-08-111-75/+0
| | | | | Add _Thread_queue_Surrender() to unify the mutex surrender procedures which involve a thread queue operation.
* score: Simplify _Thread_queue_Boost_priority()Sebastian Huber2016-07-271-7/+7
| | | | | | | | | | Raise the priority under thread queue lock protection and omit the superfluous thread queue priority change, since the thread is extracted anyway. The unblock operation will pick up the new priority. Update #2412. Update #2556. Update #2765.
* score: Rework CORE inherit priority mutexSebastian Huber2016-05-301-105/+22
| | | | | Provide dedicated seize and surrender methods for inherit priority mutexes. This eliminates CORE_mutex_Attributes.
* score: Rework CORE priority ceiling mutexSebastian Huber2016-05-301-13/+3
| | | | | Rework seize and surrender methods to use CORE_ceiling_mutex_Control. This eliminates CORE_mutex_Disciplines.
* score: Add CORE mutex variantsSebastian Huber2016-05-301-20/+8
| | | | | | | | 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-3/+0
| | | | | Remove superfluous support for simple binary semaphores. With this we can get rid of the CORE_MUTEX_NESTING_BLOCKS variant.
* score: Add Status_Control for all APIsSebastian Huber2016-05-261-7/+7
| | | | | | | | | | | 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-15/+12
| | | | | | | | 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-3/+1
| | | | | Get rid of the mp_id parameter used for some thread queue methods. Use THREAD_QUEUE_QUEUE_TO_OBJECT() instead.
* mpci: Fix thread queue flush methodSebastian Huber2016-05-251-2/+0
| | | | | | | 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: Delete __RTEMS_STRICT_ORDER_MUTEX__Sebastian Huber2016-05-021-55/+0
| | | | | | Remove support for strict order mutexes. Close #2124.
* score: Rework MP thread queue callout supportSebastian Huber2016-04-061-36/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Fix CORE mutex RTEMS_MULTIPROCESSINGSebastian Huber2016-03-291-8/+3
| | | | Make sure that the thread proxy is registered as the mutex owner.
* score: Remove Thread_queue_Queue::operations fieldSebastian Huber2016-03-291-2/+8
| | | | | | | | | 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.
* basdefs.h: Add and use RTEMS_UNUSEDSebastian Huber2015-10-261-2/+2
|
* score: Implement priority boostingSebastian Huber2015-09-041-0/+1
|
* score: Move wait flag update to tq extractSebastian Huber2015-07-231-1/+4
| | | | | | This makes it possible to use _Thread_queue_Extract_locked() for barrier operations which extract all threads on the queue in one critical section.
* score: Introduce Thread_queue_QueueSebastian Huber2015-07-231-2/+6
| | | | | | 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: Rework _Thread_Change_priority()Sebastian Huber2015-05-191-14/+17
| | | | | | | | | | | | | Move the writes to Thread_Control::current_priority and Thread_Control::real_priority into _Thread_Change_priority() under the protection of the thread lock. Add a filter function to _Thread_Change_priority() to enable specialized variants. Avoid race conditions during a thread priority restore with the new Thread_Control::priority_restore_hint for an important average case optimizations used by priority inheritance mutexes. Update #2273.
* score: Fine grained locking for mutexesSebastian Huber2015-05-191-24/+62
| | | | Update #2273.
* cpukit: Remove old DESCRIPTION: in commentsJoel Sherrill2015-03-111-2/+0
| | | | These were remnants of pre-Doxygen comment style.
* score: Add and use _Thread_Owns_resources()Sebastian Huber2014-06-031-1/+1
|
* score: Delete CORE_mutex_Control::lockSebastian Huber2014-03-311-2/+1
| | | | | | | | The holder field is enough to determine if a mutex is locked or not. This leads also to better error status codes in case a rtems_semaphore_release() is done for a mutex without having the ownership.
* score: Delete CORE_mutex_Control::holder_idSebastian Huber2014-03-311-4/+1
| | | | We can use the holder pointer to get the identifier if necessary.
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* 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: 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.
* score: use reference with strict mutexGedare Bloom2013-05-181-1/+1
|
* Score misc: Clean up Doxygen #8 (GCI 2012)Mathew Kallada2012-11-291-7/+7
| | | | | | | This patch is a task from GCI 2012 which improves the Doxygen comments in the RTEMS source. http://www.google-melange.com/gci/task/view/google/gci2012/7970221
* Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill2012-05-111-2/+0
| | | | | | | | | | | | Script does what is expected and tries to do it as smartly as possible. + remove occurrences of two blank comment lines next to each other after Id string line removed. + remove entire comment blocks which only exited to contain CVS Ids + If the processing left a blank line at the top of a file, it was removed.
* 2011-02-14 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2011-02-141-1/+1
| | | | | * rtems/src/semtranslatereturncode.c, score/src/coremutexsurrender.c: Now all conditionals have the correct sense and all tests pass.
* 2011-02-11 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2011-02-111-3/+5
| | | | | | | | * rtems/src/semtranslatereturncode.c, score/include/rtems/score/coremutex.h, score/src/coremutexsurrender.c, score/src/objectinitializeinformation.c: Disable code not reachable when POSIX is not enabled.
* 2010-07-15 Sebastian Huber <Sebastian.Huber@embedded-brains.de>Joel Sherrill2010-07-151-36/+63
| | | | | | PR 1607/cpukit * score/src/coremutexsurrender.c: Clean up and split out helper routines.
* Whitespace removal.Ralf Corsepius2009-11-291-1/+1
|
* 2009-07-07 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill2009-07-071-11/+21
| | | | | | | * posix/src/mutexsetprioceiling.c: Restructure to eliminate code paths which are unreachable. Also add more comments. * score/src/coremutexsurrender.c: Mark some code as RTEMS_DEBUG only since it cannot be hit unless coremutexseize.c is broken.
* Add __attribute__((unused)) to unused function args.Ralf Corsepius2008-12-311-0/+5
|
* Eliminate TRUE/FALSE.Ralf Corsepius2008-12-221-3/+3
|
* Rename __STRICT_ORDER_MUTEX__ to __RTEMS_STRICT_ORDER_MUTEX__.Ralf Corsepius2008-06-301-5/+5
|
* 2007-12-21 Xi Yang <hiyangxi@gmail.com>Joel Sherrill2007-12-211-2/+26
| | | | | | | | | * configure.ac, score/include/rtems/score/coremutex.h, score/include/rtems/score/thread.h, score/inline/rtems/score/coremutex.inl, score/src/coremutexsurrender.c, score/src/threadinitialize.c: Add support for proper stacking of priority inheritance on mutexes as well as enforce proper order of release.
* 2007-03-05 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2007-03-051-2/+9
| | | | | | | | | | | | | | | | | | | PR 1222/cpukit * score/Makefile.am, score/include/rtems/score/coremutex.h, score/include/rtems/score/threadq.h, score/inline/rtems/score/coremutex.inl, score/src/coremsgsubmit.c, score/src/coremutexsurrender.c, score/src/threadchangepriority.c, score/src/threadclearstate.c, score/src/threadhandler.c, score/src/threadinitialize.c, score/src/threadqdequeuefifo.c, score/src/threadqdequeuepriority.c, score/src/threadqenqueue.c, score/src/threadqenqueuefifo.c, score/src/threadqenqueuepriority.c, score/src/threadqextractfifo.c, score/src/threadqextractpriority.c, score/src/threadsetstate.c: Enhance so that when the prioirity of a thread that is blocked on a priority based thread queue is changed, that its placement in the queue is reevaluated based upon the new priority. This enhancement includes modifications to the SuperCore as well as new test cases. * score/src/threadqrequeue.c: New file.
* 2006-07-11 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2006-07-111-8/+19
| | | | | | | | | | | | PR 1124/rtems * score/include/rtems/score/threadq.h, score/src/coremutexseize.c, score/src/coremutexsurrender.c, score/src/threadqenqueue.c, score/src/threadqenqueuefifo.c, score/src/threadqenqueuepriority.c: The placement of the changing a thread's priority when using priority ceiling should be on the successful transfer of the mutex -- not when the thread tries to acquire. Plus the lack of a dispatch disable point lead to the potential for a thread timing out and already having inherited the ceiling priority.
* Include config.h.Ralf Corsepius2005-01-271-0/+4
|
* Remove stray white spaces.Ralf Corsepius2004-04-181-4/+4
|
* Remove stray white spaces.Ralf Corsepius2004-04-171-1/+1
|
* Remove stray white spaces.Ralf Corsepius2004-04-151-1/+0
|
* 2003-09-04 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2003-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/rtems/debug.h, include/rtems/seterr.h, include/rtems/system.h, include/rtems/score/address.h, include/rtems/score/apiext.h, include/rtems/score/apimutex.h, include/rtems/score/bitfield.h, include/rtems/score/chain.h, include/rtems/score/context.h, include/rtems/score/copyrt.h, include/rtems/score/coremsg.h, include/rtems/score/coremutex.h, include/rtems/score/coresem.h, include/rtems/score/heap.h, include/rtems/score/interr.h, include/rtems/score/isr.h, include/rtems/score/mpci.h, include/rtems/score/mppkt.h, include/rtems/score/object.h, include/rtems/score/objectmp.h, include/rtems/score/priority.h, include/rtems/score/stack.h, include/rtems/score/states.h, include/rtems/score/sysstate.h, include/rtems/score/thread.h, include/rtems/score/threadmp.h, include/rtems/score/threadq.h, include/rtems/score/tod.h, include/rtems/score/tqdata.h, include/rtems/score/userext.h, include/rtems/score/watchdog.h, include/rtems/score/wkspace.h, inline/rtems/score/address.inl, inline/rtems/score/chain.inl, inline/rtems/score/coremsg.inl, inline/rtems/score/coremutex.inl, inline/rtems/score/coresem.inl, inline/rtems/score/heap.inl, inline/rtems/score/isr.inl, inline/rtems/score/mppkt.inl, inline/rtems/score/object.inl, inline/rtems/score/objectmp.inl, inline/rtems/score/priority.inl, inline/rtems/score/stack.inl, inline/rtems/score/states.inl, inline/rtems/score/sysstate.inl, inline/rtems/score/thread.inl, inline/rtems/score/threadmp.inl, inline/rtems/score/tod.inl, inline/rtems/score/tqdata.inl, inline/rtems/score/userext.inl, inline/rtems/score/watchdog.inl, inline/rtems/score/wkspace.inl, macros/rtems/score/address.inl, macros/rtems/score/chain.inl, macros/rtems/score/coremsg.inl, macros/rtems/score/coremutex.inl, macros/rtems/score/coresem.inl, macros/rtems/score/heap.inl, macros/rtems/score/isr.inl, macros/rtems/score/mppkt.inl, macros/rtems/score/object.inl, macros/rtems/score/objectmp.inl, macros/rtems/score/priority.inl, macros/rtems/score/stack.inl, macros/rtems/score/states.inl, macros/rtems/score/sysstate.inl, macros/rtems/score/thread.inl, macros/rtems/score/threadmp.inl, macros/rtems/score/tod.inl, macros/rtems/score/tqdata.inl, macros/rtems/score/userext.inl, macros/rtems/score/watchdog.inl, macros/rtems/score/wkspace.inl, src/apiext.c, src/chain.c, src/coremsg.c, src/coremsgbroadcast.c, src/coremsgclose.c, src/coremsgflush.c, src/coremsgflushsupp.c, src/coremsgflushwait.c, src/coremsginsert.c, src/coremsgseize.c, src/coremsgsubmit.c, src/coremutex.c, src/coremutexflush.c, src/coremutexseize.c, src/coremutexsurrender.c, src/coresem.c, src/coresemflush.c, src/coresemseize.c, src/coresemsurrender.c, src/coretod.c, src/coretodset.c, src/coretodtickle.c, src/coretodtoseconds.c, src/coretodvalidate.c, src/heap.c, src/heapallocate.c, src/heapextend.c, src/heapfree.c, src/heapgetinfo.c, src/heapsizeofuserarea.c, src/heapwalk.c, src/interr.c, src/isr.c, src/iterateoverthreads.c, src/mpci.c, src/object.c, src/objectallocate.c, src/objectallocatebyindex.c, src/objectclearname.c, src/objectcomparenameraw.c, src/objectcomparenamestring.c, src/objectcopynameraw.c, src/objectcopynamestring.c, src/objectextendinformation.c, src/objectfree.c, src/objectget.c, src/objectgetbyindex.c, src/objectgetisr.c, src/objectgetnext.c, src/objectgetnoprotection.c, src/objectidtoname.c, src/objectinitializeinformation.c, src/objectmp.c, src/objectnametoid.c, src/objectshrinkinformation.c, src/thread.c, src/threadchangepriority.c, src/threadclearstate.c, src/threadclose.c, src/threadcreateidle.c, src/threaddelayended.c, src/threaddispatch.c, src/threadevaluatemode.c, src/threadget.c, src/threadhandler.c, src/threadidlebody.c, src/threadinitialize.c, src/threadloadenv.c, src/threadmp.c, src/threadq.c, src/threadqdequeue.c, src/threadqdequeuefifo.c, src/threadqdequeuepriority.c, src/threadqenqueue.c, src/threadqenqueuefifo.c, src/threadqenqueuepriority.c, src/threadqextract.c, src/threadqextractfifo.c, src/threadqextractpriority.c, src/threadqextractwithproxy.c, src/threadqfirst.c, src/threadqfirstfifo.c, src/threadqfirstpriority.c, src/threadqflush.c, src/threadqtimeout.c, src/threadready.c, src/threadreset.c, src/threadresettimeslice.c, src/threadrestart.c, src/threadresume.c, src/threadrotatequeue.c, src/threadsetpriority.c, src/threadsetstate.c, src/threadsettransient.c, src/threadstackallocate.c, src/threadstackfree.c, src/threadstart.c, src/threadstartmultitasking.c, src/threadsuspend.c, src/threadtickletimeslice.c, src/threadyieldprocessor.c, src/userext.c, src/watchdog.c, src/watchdogadjust.c, src/watchdoginsert.c, src/watchdogremove.c, src/watchdogtickle.c, src/wkspace.c: URL for license changed.
* 2001-08-30 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2001-08-301-14/+12
| | | | | | | | | | | | | * src/coremutex.c, src/coremutexseize.c, src/coremutexsurrender.c, inline/rtems/score/coremutex.inl: The per thread field resource_count should only be manipulated when a mutex is priority ceiling or priority inherit. This was reported by Chris Johns <ccj@acm.org> who also noticed that the use of switches for all disciplines generated less efficient code than using explicit tests for the one or two cases we were really interested in. Further review of his modifications made it apparent that the "isa" methods to test mutex discipline were not being used so this modification was swept into the code as well.
* 2001-08-16 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2001-08-161-1/+1
| | | | | | * src/coremutexsurrender.c: Use holder thread not executing thread because even though they may and often are the same it is not guaranteed unless the proper attribute is set.
* Format of return line changed.Joel Sherrill2000-07-061-3/+3
|