_TOD_Set lock release question

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Dec 4 06:51:21 UTC 2019


On 04/12/2019 04:04, Joel Sherrill wrote:
> Hi
> 
> _TOD_Set() currently can't fail. With the addition of the TOD hooks, if a
> BSP hook returns false, then _TOD_Set will fail. This requires that the lock
> acquired by _TOD_Acquire before _TOD_Set is invoked as in rtems_clock_set()
> should be released on the failure path.  I don't see a _TOD_Release method.
> What method needs to be invoked on the hook error path?

You have to move

#define _Timecounter_Release(lock_context) \
   _ISR_lock_Release_and_ISR_enable(&_Timecounter_Lock, lock_context)

to <rtems/score/timecounter.h> and use it to add a _TOD_Release() to 
<rtems/score/todimpl.h>.

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