Page 1 of 1

NIL 21.11.4 - CH_PORT_SUPPORTS_RECURSIVE_LOCKS?

Posted: Wed Jan 07, 2026 4:58 pm
by drizzi
Hello,
maybe I have found a bug in NIL. In ch.h CH_PORT_SUPPORTS_RECURSIVE_LOCKS is defined TRUE only #if defined(port_get_lock_status) && defined(port_is_locked), but both port_get_lock_status and port_get_lock_status are always NOT defined, as there is no #include "chcore.h" (differently from RT, where the same is done in chport.h, and that includes chcore.h).

Ciao,
Davide

Re: NIL 21.11.4 - CH_PORT_SUPPORTS_RECURSIVE_LOCKS?

Posted: Mon Jan 26, 2026 9:37 am
by Giovanni
Hi,

Which port are you referring to? some ports do not define those macros intentionally.

Giovanni

Re: NIL 21.11.4 - CH_PORT_SUPPORTS_RECURSIVE_LOCKS?

Posted: Wed Jan 28, 2026 9:52 am
by drizzi
Hi,
the port is ARMv7-M. Both port_get_lock_status and port_is_locked are defined in chcore.h. But, since that file is not included in os/nil/include/ch.h, CH_PORT_SUPPORTS_RECURSIVE_LOCKS is always defined as FALSE.

Re: NIL 21.11.4 - CH_PORT_SUPPORTS_RECURSIVE_LOCKS?

Posted: Thu Feb 05, 2026 10:59 am
by Giovanni
Hi,m

Fixed in 21.11.x and 20.3.x. Trunk was not affected.

Giovanni