# SMP: are two vTaskSuspendAll()/xTaskResumeAll() regions on different cores mutually exclusive?

**URL:** <https://forums.freertos.org/t/smp-are-two-vtasksuspendall-xtaskresumeall-regions-on-different-cores-mutually-exclusive/25162>\
**Category:** Kernel\
**Created:** [September 23, 2026, 10:37am UTC](https://forums.freertos.org/t/smp-are-two-vtasksuspendall-xtaskresumeall-regions-on-different-cores-mutually-exclusive/25162 "2026-09-23T10:37:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![parmi](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/parmi/32/5680_2.png) [@parmi](https://forums.freertos.org/u/parmi)\
**Post date:** [September 23, 2026, 10:37am UTC](https://forums.freertos.org/t/smp-are-two-vtasksuspendall-xtaskresumeall-regions-on-different-cores-mutually-exclusive/25162/1 "2026-09-23T10:37:05Z")

</div>

Hi,

On the SMP kernel, two regions bracketed by `vTaskSuspendAll()` / `xTaskResumeAll()` and running on different cores already exclude each other. In `tasks.c` (V11.1.0+) the `configNUMBER_OF_CORES > 1` branch of `vTaskSuspendAll()` acquires the task lock and does not release it:

```c
portGET_TASK_LOCK( xCoreID );
...
portGET_ISR_LOCK( xCoreID );
++uxSchedulerSuspended;
portRELEASE_ISR_LOCK( xCoreID );

```

`xTaskResumeAll()` releases it with `portRELEASE_TASK_LOCK( xCoreID )`, so a second core entering `vTaskSuspendAll()` spins on that lock until the first core resumes.

The documentation never says this. The [API reference for `vTaskSuspendAll()`](https://www.freertos.org/Documentation/02-Kernel/04-API-references/04-RTOS-kernel-control/05-vTaskSuspendAll), generated from the comment block in `include/task.h`, says only:

> Suspends the scheduler without disabling interrupts. Context switches will not occur while the scheduler is suspended.
> 
> After calling vTaskSuspendAll () the calling task will continue to execute without risk of being swapped out until a call to xTaskResumeAll () has been made.

Nothing there distinguishes cores, and the example in the same block still says “There is no need to use critical sections as we have all the microcontroller processing time”, which holds on one core only. A reader is left with no statement either way, and the safe reading of silence is to assume the weaker behaviour.

1. Is the exclusion between suspended regions on different cores an intended and supported guarantee of the SMP kernel, or an implementation detail that may change?

2. If it is intended, could it be documented? A possible wording for the block in `include/task.h`, to follow the existing paragraphs:

Thanks.

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [September 26, 2026, 5:06pm UTC](https://forums.freertos.org/t/smp-are-two-vtasksuspendall-xtaskresumeall-regions-on-different-cores-mutually-exclusive/25162/2 "2026-09-26T17:06:31Z")

</div>

> [@parmi](#):
>
> 1. Is the exclusion between suspended regions on different cores an intended and supported guarantee of the SMP kernel, or an implementation detail that may change?

Yes, it is by design.

> [@parmi](#):
>
> 1. If it is intended, could it be documented? A possible wording for the block in `include/task.h`, to follow the existing paragraphs:

That is a good suggestion. Would you be willing to raise a PR for this doc update?
