mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-11-07 12:12:30 -05:00
refactor: change methods ENTER|EXIT critical
The read and write from BaseType_t, can be do in a atomic context, and dont need a mutex contol. Change this methods for access the critical regiao only if is neccessary. For make this, create a macro in portable.h that apoint to tasENTER|EXIT_CRITIAL() function. Now, if port is guarantee that access BaseType_t in atomic context, a empty macro can be define in portmacro.h, like this: Signed-off-by: guilherme giacomo simoes <trintaeoitogc@gmail.com>
This commit is contained in:
parent
1cb8042961
commit
a118f6a351
4 changed files with 22 additions and 14 deletions
|
|
@ -85,6 +85,14 @@
|
|||
#define portARCH_NAME NULL
|
||||
#endif
|
||||
|
||||
#ifndef portBASE_TYPE_ENTER_CRITICAL
|
||||
#define portBASE_TYPE_ENTER_CRITICAL() taskENTER_CRITICAL()
|
||||
#endif
|
||||
|
||||
#ifndef portBASE_TYPE_EXIT_CRITICAL
|
||||
#define portBASE_TYPE_EXIT_CRITICAL() taskEXIT_CRITICAL()
|
||||
#endif
|
||||
|
||||
#ifndef configSTACK_DEPTH_TYPE
|
||||
#define configSTACK_DEPTH_TYPE StackType_t
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue