Skip to content

Conversation

@anchao
Copy link
Contributor

@anchao anchao commented May 17, 2022

Summary

arch: inline up_interrupt_context()

inline the up_interrupt_context() to avoid unnecessary stack pushes

Signed-off-by: chao.an anchao@xiaomi.com

Impact

N/A

Testing

ci check

@davids5
Copy link
Contributor

davids5 commented May 17, 2022

What are the code size and C89 implication?

@anchao
Copy link
Contributor Author

anchao commented May 17, 2022

What are the code size and C89 implication?

@davids5 ,

There is a slight increase in code size, but overall the impact is not very serious
lm3s6965-ek:qemu-flat(cortex-m):

Before:

$ size nuttx
   text	   data	    bss	    dec	    hex	filename
 222304	    324	  14848	 237476	  39fa4	nuttx

After:

$ size nuttx
   text	   data	    bss	    dec	    hex	filename
 222320	    324	  14848	 237492	  39fb4	nuttx

sabre-6quad:smp(Cortex-a9,smp):

Before:

$ size nuttx
   text	   data	    bss	    dec	    hex	filename
 127840	    196	  33500	 161536	  27700	nuttx

After:

$ size nuttx
   text	   data	    bss	    dec	    hex	filename
 128096	    196	  33500	 161792	  27800	nuttx

about C89 compatible, It seems that the current code base can no longer be built with c89 normally(without this PR), too many inline keywords, the inline keyword was added in C99, I think we can use the -std=gnu89 flag instead of -std=c89

@anchao anchao force-pushed the 22051701 branch 2 times, most recently from 6b5cedf to 74a40e9 Compare May 17, 2022 16:42
@anchao anchao force-pushed the 22051701 branch 2 times, most recently from c9c3594 to f55a998 Compare May 17, 2022 19:29
@anchao anchao force-pushed the 22051701 branch 2 times, most recently from 6255461 to 01ec857 Compare May 18, 2022 06:33
@anchao anchao force-pushed the 22051701 branch 3 times, most recently from bbed952 to bc836ce Compare May 19, 2022 13:18
@anchao anchao force-pushed the 22051701 branch 2 times, most recently from 7505ce5 to f418566 Compare May 24, 2022 14:23
@anchao anchao force-pushed the 22051701 branch 2 times, most recently from c35a0a5 to fbbda02 Compare May 25, 2022 02:37
@anchao anchao force-pushed the 22051701 branch 2 times, most recently from ef66100 to 82d48cc Compare May 25, 2022 16:55
inline the up_interrupt_context() to avoid unnecessary stack pushes

Signed-off-by: chao.an <anchao@xiaomi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants