pw_sync_freertos: Update InterruptSpinLock docs
Small update for InterruptSpinLock clarifying that InterruptSpinLock
cannot be used in interrupts with priority above
configMAX_SYSCALL_INTERRUPT_PRIORITY.
Change-Id: I57349afc5e6fe918ae4f62ccbbd708b0a03536e8
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/108091
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Commit-Queue: Ewout van Bekkum <ewout@google.com>
diff --git a/pw_sync_freertos/docs.rst b/pw_sync_freertos/docs.rst
index 1d8d0fd..1dfe8b0 100644
--- a/pw_sync_freertos/docs.rst
+++ b/pw_sync_freertos/docs.rst
@@ -30,6 +30,14 @@
``taskEXIT_CRITICAL_FROM_ISR`` from interrupt contexts and
``taskENTER_CRITICAL`` and ``taskEXIT_CRITICAL`` from other contexts.
+.. warning::
+ ``taskENTER_CRITICAL_FROM_ISR`` only disables interrupts with priority at or
+ below ``configMAX_SYSCALL_INTERRUPT_PRIORITY``. Therefore, it is unsafe to
+ use InterruptSpinLock from higher-priority interrupts, even if they are not
+ non-maskable interrupts. This is consistent with the rest of the FreeRTOS
+ APIs, see the `FreeRTOS kernel interrupt priority documentation
+ <https://www.freertos.org/a00110.html#kernel_priority>`_ for more details.
+
--------------------
Signaling Primitives
--------------------