irq: add note about irq_lock/unlock access

On ARM irq_lock() simply fails silently instead of generating
an exception.

Fixes: #21735

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2020-01-07 13:04:52 -08:00 committed by Anas Nashif
commit 06df06b71e

View file

@ -197,6 +197,10 @@ irq_connect_dynamic(unsigned int irq, unsigned int priority,
* acquired. (That is, each call to irq_lock() must be balanced by * acquired. (That is, each call to irq_lock() must be balanced by
* a corresponding call to irq_unlock().) * a corresponding call to irq_unlock().)
* *
* This routine can only be invoked from supervisor mode. Some architectures
* (for example, ARM) will fail silently if invoked from user mode instead
* of generating an exception.
*
* @note * @note
* This routine can be called by ISRs or by threads. If it is called by a * This routine can be called by ISRs or by threads. If it is called by a
* thread, the interrupt lock is thread-specific; this means that interrupts * thread, the interrupt lock is thread-specific; this means that interrupts
@ -231,6 +235,10 @@ unsigned int z_smp_global_lock(void);
* each time it called irq_lock(), supplying the keys in the reverse order * each time it called irq_lock(), supplying the keys in the reverse order
* they were acquired, before interrupts are enabled. * they were acquired, before interrupts are enabled.
* *
* This routine can only be invoked from supervisor mode. Some architectures
* (for example, ARM) will fail silently if invoked from user mode instead
* of generating an exception.
*
* @note Can be called by ISRs. * @note Can be called by ISRs.
* *
* @param key Lock-out key generated by irq_lock(). * @param key Lock-out key generated by irq_lock().