We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d41a035 commit 578cfc0Copy full SHA for 578cfc0
components/drivers/include/drivers/core/dm.h
@@ -40,6 +40,11 @@ struct rt_dm_ida
40
};
41
42
#define RT_DM_IDA_INIT(id) { .master_id = MASTER_ID_##id }
43
+#define rt_dm_ida_init(ida, id) \
44
+do { \
45
+ (ida)->master_id = MASTER_ID_##id; \
46
+ rt_spin_lock_init(&(ida)->lock); \
47
+} while (0)
48
49
int rt_dm_ida_alloc(struct rt_dm_ida *ida);
50
rt_bool_t rt_dm_ida_take(struct rt_dm_ida *ida, int id);
0 commit comments