NIL 21.11.4 - CH_PORT_SUPPORTS_RECURSIVE_LOCKS? Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
drizzi
Posts: 9
Joined: Wed Apr 19, 2017 4:52 pm
Has thanked: 2 times
Been thanked: 5 times

NIL 21.11.4 - CH_PORT_SUPPORTS_RECURSIVE_LOCKS?

Post 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
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: NIL 21.11.4 - CH_PORT_SUPPORTS_RECURSIVE_LOCKS?

Post by Giovanni »

Hi,

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

Giovanni
drizzi
Posts: 9
Joined: Wed Apr 19, 2017 4:52 pm
Has thanked: 2 times
Been thanked: 5 times

Re: NIL 21.11.4 - CH_PORT_SUPPORTS_RECURSIVE_LOCKS?

Post 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.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: NIL 21.11.4 - CH_PORT_SUPPORTS_RECURSIVE_LOCKS?

Post by Giovanni »

Hi,m

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

Giovanni
Post Reply