diff options
author | Patrick Georgi <pgeorgi@google.com> | 2018-05-16 11:31:34 +0200 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-17 19:34:48 -0700 |
commit | ae6d7a30c333308a5aebdfc0b7dc012a2a50324a (patch) | |
tree | 8b28cbb9bec8a1da7ec9a7447b2a000f0ae066dd /core/cortex-m0/task.c | |
parent | b3311c23b1fdc38daeb5e169d6e48fa62cac251e (diff) | |
download | chrome-ec-ae6d7a30c333308a5aebdfc0b7dc012a2a50324a.tar.gz |
make local functions static inline
They're only used within the same file and should always be inlined.
It also helps gcc 8.1's lto linking which seems to not inline it (since
inline is just a hint) but then drops the function (presumably because
it's small, marked inline, and comes with no prototype).
BUG=b:65441143
BRANCH=none
TEST=builds with gcc 8.1
Change-Id: I881a5b9f13192dd11748d8a3060788f95a84dec0
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1061075
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Diffstat (limited to 'core/cortex-m0/task.c')
-rw-r--r-- | core/cortex-m0/task.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/cortex-m0/task.c b/core/cortex-m0/task.c index 27465080a6..a137bf7cee 100644 --- a/core/cortex-m0/task.c +++ b/core/cortex-m0/task.c @@ -165,7 +165,7 @@ inline int in_interrupt_context(void) return ret; } -inline int get_interrupt_context(void) +static inline int get_interrupt_context(void) { int ret; asm("mrs %0, ipsr\n" : "=r"(ret)); /* read exception number */ |