Here are updated versions of my patches that incorporate your suggestions.
One additional issue: I have noticed that gcc does not provide __sync_synchronize() on all ARM variants. I have added a workaround but it would be nice if L4 provided a function that causes a hardware memory barrier on platforms that have it, and does nothing on platforms that don't. l4_barrier(), l4_mb(), l4_wmb() only cause a compiler memory barrier.
On Tuesday 27 March 2012 00:45:25 Adam Lackorzynski wrote:
allows to set the link state up and down. The old protocol is still supported.
Great. I wonder if we still need the old one?
Removed.
+#if 0 +#define debug_printf(...) printf(__VA_ARGS__) +#else +#define debug_printf(...) +#endif
Please no such macros. First I'd like those always parsed so that they do not break: if (0) ... (or if (compile-time-fix-expression) ...). Then, debug_printf is just too generic.
This is not that easy because users of the header may not have printf(). Therefore I have just removed the debug output.