Skip to content

Commit

Permalink
Add error handling in lock initialization in the Xtensa port (#340)
Browse files Browse the repository at this point in the history
* Add error handling in lock initialization.

* Update release data and version.
  • Loading branch information
xiuwencai authored Dec 28, 2023
1 parent 9f3e35d commit 39f3c86
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit 39f3c86

Please sign in to comment.