Skip to content

Commit 39f3c86

Browse files
authored
Add error handling in lock initialization in the Xtensa port (#340)
* Add error handling in lock initialization. * Update release data and version.
1 parent 9f3e35d commit 39f3c86

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ports/xtensa/xcc/src/tx_clib_lock.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
/* DATE NAME DESCRIPTION */
3636
/* */
3737
/* 12-31-2020 Cadence Design Systems Initial Version 6.1.3 */
38+
/* 12-31-2023 Xiuwen Cai Modified comment(s), and */
39+
/* added error handling in */
40+
/* lock initialization, */
41+
/* resulting in version 6.4.0 */
3842
/* */
3943
/**************************************************************************/
4044

@@ -155,6 +159,8 @@ _Mtxinit (_Rmtx * mtx)
155159

156160
if (lcnt >= XT_NUM_CLIB_LOCKS) {
157161
/* Fatal error */
162+
*mtx = NULL;
163+
return;
158164
}
159165

160166
lock = &(xclib_locks[lcnt]);

0 commit comments

Comments
 (0)