mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 09:16:20 +00:00
let unit test sys_arch check that a mutex is not taken recursively
This commit is contained in:
parent
92997756d1
commit
7b477b32b8
@ -156,7 +156,8 @@ void sys_mutex_lock(sys_mutex_t *mutex)
|
|||||||
{
|
{
|
||||||
/* nothing to do, no multithreading supported */
|
/* nothing to do, no multithreading supported */
|
||||||
LWIP_ASSERT("mutex != NULL", mutex != NULL);
|
LWIP_ASSERT("mutex != NULL", mutex != NULL);
|
||||||
LWIP_ASSERT("*mutex >= 1", *mutex >= 1);
|
/* check that the mutext is valid and unlocked (no nested locking) */
|
||||||
|
LWIP_ASSERT("*mutex >= 1", *mutex == 1);
|
||||||
/* we count up just to check the correct pairing of lock/unlock */
|
/* we count up just to check the correct pairing of lock/unlock */
|
||||||
(*mutex)++;
|
(*mutex)++;
|
||||||
LWIP_ASSERT("*mutex >= 1", *mutex >= 1);
|
LWIP_ASSERT("*mutex >= 1", *mutex >= 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user