[riot-notifications] [RIOT-OS/RIOT] cpu/atmega_common: Fix function attributes (#11453)

Marian Buschsieweke notifications at github.com
Fri Apr 26 11:09:31 CEST 2019


### Contribution description
Functions marked with `__atribute__((naked))` may only use basic inline assembly and must not use any c code. The functions `__enter_thread_mode()` and `cpu_switch_context_exit()` are using C code, so they must not be marked as naked.

[This saves 4 Bytes of .text when using GCC 8.3.0.](http://mari-bu.de/atmega_naked.html)

### Testing procedure
Code review and basic testing, e.g. does `examples/default` still run properly e.g. on an Arduino Mega2560.

### Issues/PRs references
None
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/11453

-- Commit Summary --

  * cpu/atmega_common: Fix function attributes

-- File Changes --

    M cpu/atmega_common/thread_arch.c (2)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11453.patch
https://github.com/RIOT-OS/RIOT/pull/11453.diff

-- 
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/11453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190426/9e8aebd9/attachment.html>


More information about the notifications mailing list