如何在nuttx rtos中找到最大文件描述符?
我对Nuttx OS的了解有限,但已通过PX4堆栈 config_nfile_descriptors config_nfile_descriptors设置了一个限制。我正在使用具有STM32F76处理器的Pixhawk 4 FCU板。默认情况下,固件构建(PX4_FMU-V5)将参数设置为20。我的理解是,这是一个软限制,可用于堆栈中的每个模块以限制其I/O。到目前为止,我可以增加该限制而没有任何可见问题,但这引起了一些问题:
- 在多大程度上可以在多大程度上增加该参数的限制而不会引起任何问题?
- 超出该限制的潜在后果是什么?
- 有没有办法找到文件描述符数量的硬限制(假设这是处理器类型的特定的)?如果没有,我可以通过NSH外壳监视每个模块的文件描述符的使用情况吗?
如果这过度简化了这个问题,我将感谢任何指示的任何方向,但我最好不要深入研究Nuttx,以了解这通常是如何工作的以及这里的局限性。
I have a limited understanding of the Nuttx OS but have run into a limitation set by the config parameter CONFIG_NFILE_DESCRIPTORS using the PX4 stack. I'm using a Pixhawk 4 FCU board that has a STM32F76 processor. The firmware build (px4_fmu-v5) by default has that parameter set to 20. My understanding is that this is a soft limit that is applied to each module in the stack to limit its I/O. I can increase that limit without any visible issues so far but this raises a few concerns:
- To what extent can I increase the limit of that parameter without causing any issues?
- What are the potential consequences of exceeding that limit?
- Is there a way to find the hard limit of the number of file descriptors (assuming this is specific to the processor type)? If not, can I monitor the usage of file descriptors per module over an NSH shell?
If this is over-simplifying the issue I'd appreciate any pointers in the right direction, but I preferably would not like to delve too deep into NuttX to understand how this generally works and what the limitations are here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论