[riot-notifications] [RIOT-OS/RIOT] cpu/cortexm_common: add inlined header only def for irq_% (#13999)

Kaspar Schleiser notifications at github.com
Tue May 12 12:06:09 CEST 2020


@kaspar030 requested changes on this pull request.

Some late comments.

>  
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+#ifdef LEGACY_IRQ_API

I'm a bit late, but would like to propose two changes:

1. use IRQ_API_INLINED instead of LEGACY_IRQ_API

That turns around the logic, so only adapted architectures need to be changed. Less surprising to anyone having an arch outside riot.
Also, "LEGACY_IRQ_API" works only once, until we want to improve this again. then we'd have "EVEN_MORE_LEGACY_IRQ_API" ... So, instead give the define a name that describes what it does.


2. I think in this case defining "MAYBE_INLINE" to `static inline __attribute__((always_inline))`, if IRQ_API_INLINED is active, and to an empty define if not, saves us from duplicate declarations and doxygen.

-- 
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/13999#pullrequestreview-409891514
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200512/0d9fa46b/attachment.htm>


More information about the notifications mailing list