nuttx
nuttx copied to clipboard
inline restore_critical_section and add parameters to restore_critical_section
Summary
In the SMP, when a context switch occurs, restore_critical_section is executed. In order to reduce the time taken for context switching, we inline the restore_critical_section function and we directly pass the required parameters to restore_critical_section instead of acquiring them repeatedly. Given that restore_critical_section is small in size and is called from only one location, inlining it does not increase the size of the image.
Impact
none
Testing
ostest
Please include a commit log explaining why to implement it as inline macro instead of just changing the function to inline
ok
@hujun260 please fix the conflict