Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename configNUMBER_OF_CORES to configNUM_CORES #1530

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/rp2_common/pico_async_context/async_context_freertos.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "semphr.h"

#if configNUM_CORES > 1 && !defined(configUSE_CORE_AFFINITY)
#if configNUMBER_OF_CORES > 1 && !defined(configUSE_CORE_AFFINITY)
#error async_context_freertos requires configUSE_CORE_AFFINITY under SMP
#endif

Expand Down Expand Up @@ -125,7 +125,7 @@ bool async_context_freertos_init(async_context_freertos_t *self, async_context_f
async_context_deinit(&self->core);
return false;
}
#if configNUM_CORES > 1
#if configNUMBER_OF_CORES > 1
UBaseType_t core_id = config->task_core_id;
if (core_id == (UBaseType_t)-1) {
core_id = portGET_CORE_ID();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ typedef struct async_context_freertos_config {
* the core ID (see \ref portGET_CORE_ID()) to pin the task to.
* This is only relevant in SMP mode.
*/
#if configUSE_CORE_AFFINITY && configNUM_CORES > 1
#if configUSE_CORE_AFFINITY && configNUMBER_OF_CORES > 1
UBaseType_t task_core_id;
#endif
} async_context_freertos_config_t;
Expand Down Expand Up @@ -90,7 +90,7 @@ bool async_context_freertos_init(async_context_freertos_t *self, async_context_f
async_context_freertos_config_t config = {
.task_priority = ASYNC_CONTEXT_DEFAULT_FREERTOS_TASK_PRIORITY,
.task_stack_size = ASYNC_CONTEXT_DEFAULT_FREERTOS_TASK_STACK_SIZE,
#if configUSE_CORE_AFFINITY && configNUM_CORES > 1
#if configUSE_CORE_AFFINITY && configNUMBER_OF_CORES > 1
.task_core_id = (UBaseType_t)-1, // none
#endif
};
Expand Down
2 changes: 1 addition & 1 deletion src/rp2_common/pico_flash/flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "task.h"
// now we have FreeRTOS header we can check core count... we can only use FreeRTOS SMP mechanism
// with two cores
#if configNUM_CORES == 2
#if configNUMBER_OF_CORES == 2
#if configUSE_CORE_AFFINITY
#define PICO_FLASH_SAFE_EXECUTE_USE_FREERTOS_SMP 1
#else
Expand Down
2 changes: 1 addition & 1 deletion src/rp2_common/pico_flash/include/pico/flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*
* There are conditions where safety would not be guaranteed:
*
* 1. FreeRTOS smp with `configNUM_CORES=1` - FreeRTOS still uses pico_multicore in this case, so \ref flash_safe_execute
* 1. FreeRTOS smp with `configNUMBER_OF_CORES=1` - FreeRTOS still uses pico_multicore in this case, so \ref flash_safe_execute
* cannot know what the other core is doing, and there is no way to force code execution between a FreeRTOS core
* and a non FreeRTOS core.
* 2. FreeRTOS non SMP with pico_multicore - Again, there is no way to force code execution between a FreeRTOS core and
Expand Down
Loading