Skip to content

Commit 7411b31

Browse files
authored
Merge pull request #6118 from ARMmbed/g-note-global-equeue-irq
equeue: Add note about using global event queues in irq
2 parents ff41a10 + 6e4e62b commit 7411b31

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

events/mbed_shared_queues.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ namespace mbed {
4545
* for the event loop to work without an RTOS, or an RTOS system can can save
4646
* memory by reusing the main stack.
4747
*
48+
* @note
49+
* mbed_event_queue is not itself IRQ safe. To use the mbed_event_queue in
50+
* interrupt context, you must first call `mbed_event_queue()` in threaded
51+
* context and store the pointer for later use.
52+
*
4853
* @return pointer to event queue
4954
*/
5055
events::EventQueue *mbed_event_queue();
@@ -67,6 +72,12 @@ events::EventQueue *mbed_event_queue();
6772
* or less, but could occasionally be significantly higher if many events are
6873
* queued.
6974
*
75+
* @note
76+
* mbed_highprio_event_queue is not itself IRQ safe. To use the
77+
* mbed_highprio_event_queue in interrupt context, you must first call
78+
* `mbed_event_queue()` in threaded context and store the pointer for
79+
* later use.
80+
*
7081
* @return pointer to high-priority event queue
7182
*/
7283

0 commit comments

Comments
 (0)