shmc/l4shmnet improvements

Stefan Fritsch Stefan_Fritsch at
Thu Apr 12 11:41:10 CEST 2012

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?


> > +#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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: l4shmnet.diff
Type: text/x-diff
Size: 17451 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shmc.diff
Type: text/x-diff
Size: 31605 bytes
Desc: not available
URL: <>

More information about the l4-hackers mailing list