get/set don't convert to the native endian, I guess that's why#define virtio_cread(vdev, structname, member, ptr) \A silly question, compare to using set()/get() directly, what's the value
do { \
might_sleep(); \
/* Must match the member's type, and be integer */ \
- if (!typecheck(typeof((((structname*)0)->member)), *(ptr))) \
+ if (!__virtio_typecheck(structname, member, *(ptr))) \
(*ptr) = 1; \
of the accessors macro here?
Thanks
drivers use cread/cwrite. It is also nice that there's type
safety, checking the correct integer width is used.