[PATCH v3] score: Fix simple timecounter support

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jan 14 13:49:43 UTC 2016



On 14/01/16 14:44, Martin Galvan wrote:
> Thanks a lot for this patch. We've tested it and so far it's working fine.

Ok, I have to build all BSPs before I can check it in.

> However we have a couple of questions:
>
> 1) Is there a reason why you're using the ARMV7M_Timecounter struct instead of
> simply having a global boolean like we did in our patch? That pointer casting
> trick seems a bit unsafe.

Its probably more efficient and this is the standard way to do object 
orient stuff in C.

>
> 2) I saw you're using rtems_interrupt_disable/enable instead of
> Timecounter_Acquire/Release. Is there any particular reason for this?

I don't want to expose the _Timecounter_Acquire() to the BSP level. This 
rtems_interrupt_disable/enable is fine on uni-processor systems. On SMP 
systems, the simple timecounter doesn't work.

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