Hey,
Sorry if this has been discussed in the past, I couldn't
find anything much about it.
In a lot of our code sched_active_thread is converted into
a non-volatile pointer. Is that correct? Here [1] it is described
that such conversion is undefined behavior.
Interestingly, there was an issue [2] which was closed with the following
remark:
"Abandoned, since I don't think that there are two reviewers that
understand the meaning of volatile."
Some more food for thought, from an artical by John Regehr [3]
"Arch Robison says that volatile is almost useless for multi-threaded
programming. [4]"
[1] https://en.cppreference.com/w/c/language/volatile
[2] https://github.com/RIOT-OS/RIOT/issues/252
[3] https://blog.regehr.org/archives/28
[4]
http://software.intel.com/en-us/blogs/2007/11/30/volatile-almost-useless-for-multi-threaded-programming/
--
Kees
_______________________________________________
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel