[riot-notifications] [RIOT-OS/RIOT] core: introduce crossfile arrays (xfa) (#7523)

Kaspar Schleiser notifications at github.com
Sat Sep 2 00:11:31 CEST 2017


kaspar030 commented on this pull request.



> +#define XFA_USE(type, name) \
+    _Pragma("GCC diagnostic push") \
+    _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
+    extern const type name [0]; \
+    extern const type name ## _end [0]; \
+    _Pragma("GCC diagnostic pop") \
+    extern unsigned __xfa_dummy
+
+/**
+ * @brief Define variable in cross-file array
+ *
+ * Variables will end up sorted by prio, then by variable name.
+ *
+ * Use instead of type in variable definition, e.g.:
+ *
+ *     XFA(driver_params, 0, driver_params_t) _onboard = { .pin=42 };

done

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/7523#discussion_r136674178
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20170901/f3ebed9f/attachment.html>


More information about the notifications mailing list