You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This patch introduces a `nested-free` control flag to the mutex,
allowing more flexible control over mutex hold limits. The change is necessary
to handle scenarios where nested mutex acquisition is restricted, since
it will introduce possibility of data corruption in a nested access to
the critical area.
Changes:
- Added `ctrl_flags` field in `rt_mutex` structure to replace the reserved
field for holding control flags.
- Introduced `RT_MUTEX_CTRL_NESTED_FREE` command in `rt_mutex_control` to
enable the new flag.
- Refactored mutex initialization by extracting common logic into a new
`_mutex_init` function, reducing code duplication.
- Updated the `_rt_mutex_take` function to respect the `nested-free` flag,
preventing nested acquisition when the flag is set.
- Modified `rt_mutex_control` to handle the new control command and return
appropriate error codes for invalid commands.
Signed-off-by: Shell <[email protected]>
0 commit comments