1
0
mirror of https://github.com/azure-rtos/threadx synced 2025-01-30 08:02:57 +08:00

Add error handling in lock initialization.

This commit is contained in:
Xiuwen Cai 2023-12-08 03:11:53 +00:00
parent 776ea213ce
commit 8fbd23dabf

View File

@ -35,6 +35,10 @@
/* DATE NAME DESCRIPTION */
/* */
/* 12-31-2020 Cadence Design Systems Initial Version 6.1.3 */
/* xx-xx-xxxx Xiuwen Cai Modified comment(s), and */
/* added error handling in */
/* lock initialization, */
/* resulting in version 6.x */
/* */
/**************************************************************************/
@ -155,6 +159,8 @@ _Mtxinit (_Rmtx * mtx)
if (lcnt >= XT_NUM_CLIB_LOCKS) {
/* Fatal error */
*mtx = NULL;
return;
}
lock = &(xclib_locks[lcnt]);