Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145675017
D55352.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
551 B
Referenced Files
None
Subscribers
None
D55352.diff
View Options
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -945,6 +945,17 @@
*/
#define __BUS_ACCESSOR(varp, var, ivarp, ivar, type) \
\
+static __inline bool \
+varp ## _has_ ## var(device_t dev) \
+{ \
+ uintptr_t v = 0; \
+ int e; \
+ \
+ e = BUS_READ_IVAR(device_get_parent(dev), dev, \
+ ivarp ## _IVAR_ ## ivar, &v); \
+ return (e == 0); \
+} \
+ \
static __inline type \
varp ## _get_ ## var(device_t dev) \
{ \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 23, 11:55 PM (11 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28883360
Default Alt Text
D55352.diff (551 B)
Attached To
Mode
D55352: bus: Add a new IVAR accessor to check for the existence of an IVAR
Attached
Detach File
Event Timeline
Log In to Comment