[PATCH 9/9] score: Add and use _Objects_Release()

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jun 6 10:53:33 UTC 2013


On 06/05/2013 05:22 PM, Sebastian Huber wrote:
> Add and use _Objects_Release_without_thread_dispatch().  These two
> functions pair with the _Objects_Get() function.  This helps to
> introduce object specific SMP locks to avoid lock contention.

Maybe it is better to name it _Objects_Put().  So we have

obj = _Objects_Get()
do_something_with_it(obj)
_Objects_Put(obj)

For SMP it is desirable to gradually introduce more fine grained locking.  So 
we may add a SMP lock to Objects_Control and use new functions 
_Objects_Acquire() and _Objects_Release() to protect the object state.  For 
example a mutex obtain may use only the object specific lock if it is free and 
use additional locks if it has to perform a blocking operation which requires 
intervention of the scheduler.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list