Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error handling in lock initialization in the Xtensa port #340

Merged
merged 2 commits into from
Dec 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ports/xtensa/xcc/src/tx_clib_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 12-31-2020 Cadence Design Systems Initial Version 6.1.3 */
/* 12-31-2023 Xiuwen Cai Modified comment(s), and */
/* added error handling in */
/* lock initialization, */
/* resulting in version 6.4.0 */
/* */
/**************************************************************************/

Expand Down Expand Up @@ -155,6 +159,8 @@ _Mtxinit (_Rmtx * mtx)

if (lcnt >= XT_NUM_CLIB_LOCKS) {
/* Fatal error */
*mtx = NULL;
return;
}

lock = &(xclib_locks[lcnt]);
Expand Down
Loading