[PATCH 16/17] score: Use thread life protection for API mutexes

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Mar 26 16:48:31 UTC 2014


On 03/26/2014 04:11 PM, Gedare Bloom wrote:
> Hi Sebastian,
> I think your solution here would be cleaner if you just store the
> 'previous_thread_life_protection' field in the API_Mutex_Control so
> the implementation detail about life state would not bleed into the
> code surrounding critical sections.

Ok, this is a good idea.  I will update the patches accordingly.

>
> More generally, if any smp lock will need to protect the thread life
> state of the acquiring thread, then the smp lock context would need to
> store the previous_thread_life_protection. Propagating this stored
> state across fine-grained critical sections will become quite a mess.

SMP locks should not touch this high level thread life states area. They 
can protect the thread life with disabled interrupts or thread 
dispatching disabled.

-- 
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