3 ms·
I see it decently often in embedded code for memory mapped IO registers. Other than that, I don't think I've ever seen it either. I'm not sure portability is t
by gizmo686 1y ago
I see it decently often in embedded code for memory mapped IO registers. Other than that, I don't think I've ever seen it either.
I'm not sure portability is the reason though. I've seen it in places that have no problem spamming #define __GNU_SOURCE
- nomel 1y agoThis is the only place I've seen it used, and the only placed I've used it. It's absolutely wonderful for IO.
- mort96 1y agoI would be scared of using it for IO... With a struct bit field, I don't know what bit offset a field ends up with, I don't know how it gets padded, and I don't know how large the generated load and store becomes. I'd rather do the bit operations and store myself.