I am trying to run the stack statistics example in Runtime memory statistics - API references and tutorials | Mbed OS 6 Documentation
However, the line
int cnt = osThreadGetCount();
induces the error “Use of undeclared identifier”. This happens for all Mbed OS from 6.5 to 6.13. What’s the problem? The heap statistics example works fine.