mirror of
https://github.com/azure-rtos/threadx
synced 2025-02-06 08:08:27 +08:00
Add error handling in lock initialization.
This commit is contained in:
parent
776ea213ce
commit
8fbd23dabf
@ -35,6 +35,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 12-31-2020 Cadence Design Systems Initial Version 6.1.3 */
|
/* 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) {
|
if (lcnt >= XT_NUM_CLIB_LOCKS) {
|
||||||
/* Fatal error */
|
/* Fatal error */
|
||||||
|
*mtx = NULL;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lock = &(xclib_locks[lcnt]);
|
lock = &(xclib_locks[lcnt]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user