[En-Nut-Discussion] HANDLE in spibus.h: volatile or not?

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Mon Mar 9 13:09:55 CET 2015


>>>>> "Harald" == Harald Kipp <harald.kipp at egnite.de> writes:

    Harald> However, when calling an external function with a pointer to a
    Harald> non-constant variable, e.g. NutEventWait(&bus_mutex, 0), the
    Harald> compiler expects a change of the variable's content. In this
    Harald> case the volatile keyword is not required.

Thanks for pointing out.
Still learning...

hertz:~/devel/ethernut_sf/nut> find -name \*.c | xargs grep "HANDLE vol"|wc
     17     147    1502
hertz:~/devel/ethernut_sf/nut> find -name \*.c | xargs grep "ile HANDLE" | wc
      6      34     368
It seems that some ethernet driver introduces volatile in context with
HANDLE and all resulting drivers copied that construct. Should we correct?

Bye
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------


More information about the En-Nut-Discussion mailing list