Doubt regarding Thread_Control_struct in rtems

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jul 16 07:19:21 UTC 2015



On 16/07/15 01:49, Saurabh Gadia wrote:
> Hi,
> Is there any explicit locking to avoid data races condition on members 
> of Thread_Control_struct in rtems? As for mutex we have ticket_lock 
> over its wait_queue in SMP architecture which can serve as explicit 
> locking in mutex. For thread I feel data race condition may happen 
> while setting *thread->current_priority. *As it is updated by thread 
> while restoring its priority and while some other thread trying to 
> promote for nested_mutex behavior.

There is no data race condition, see _Thread_Change_priority() and 
Thread_Lock_control. There is a potential problem with a deadlock at 
spin lock level however, in case the application provokes a deadlock at 
object level. This needs some further investigation.

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