vfs: add doc links

This commit is contained in:
Jiacheng Guo 2021-03-08 16:29:22 +08:00
parent 7c64d1530a
commit 40035edcac
3 changed files with 13 additions and 0 deletions

View File

@ -235,3 +235,14 @@ Such a design has the following consequences:
- It is possible to set ``stdin``, ``stdout``, and ``stderr`` for any given task without affecting other tasks, e.g., by doing ``stdin = fopen("/dev/uart/1", "r")``.
- Closing default ``stdin``, ``stdout``, or ``stderr`` using ``fclose`` will close the ``FILE`` stream object, which will affect all other tasks.
- To change the default ``stdin``, ``stdout``, ``stderr`` streams for new tasks, modify ``_GLOBAL_REENT->_stdin`` (``_stdout``, ``_stderr``) before creating the task.
Event fds
-------------------------------------------
``eventfd()`` call is a powerful tool to notify a ``select()`` based loop of custom events. The ``eventfd()`` implementation in ESP-IDF is generally the same as described in ``man(2) eventfd`` except for:
- ``esp_vfs_eventfd_register()`` has to be called before calling ``eventfd()``
- Option ``EFD_CLOEXEC``, ``EFD_NONBLOCK`` and ``EFD_SEMAPHORE`` is not supported in flags.
- Option ``EFD_SUPPORT_ISR`` has been added in flags. This flag is required to read and the write the eventfd in an interrupt handler.
Note that creating an eventfd with ``EFD_SUPPORT_ISR`` will cause interrupts to be temporarily disabled when reading, writing the file and during the beginning and the ending of the ``select()`` when this file is set.

View File

@ -157,6 +157,7 @@ INPUT = \
$(IDF_PATH)/components/openthread/include/openthread-core-esp32x-config.h \
$(IDF_PATH)/components/vfs/include/esp_vfs.h \
$(IDF_PATH)/components/vfs/include/esp_vfs_dev.h \
$(IDF_PATH)/components/vfs/include/esp_vfs_eventfd.h \
$(IDF_PATH)/components/vfs/include/esp_vfs_semihost.h \
$(IDF_PATH)/components/fatfs/vfs/esp_vfs_fat.h \
$(IDF_PATH)/components/fatfs/diskio/diskio_impl.h \

View File

@ -7,3 +7,4 @@ API Reference
.. include-build-file:: inc/esp_vfs_dev.inc
.. include-build-file:: inc/esp_vfs_eventfd.inc