This site required JavaScript to be enabled. Click here to view a static menu.
void vTaskPrioritySet( TaskHandle_t xTask, UBaseType_t uxNewPriority ); INCLUDE_vTaskPrioritySet must be defined as 1 for this function to be available. See the RTOS Configuration documentation for more information. Set the priority of any task. A context switch will occur before the function returns if the priority being set is higher than the currently executing task.
INCLUDE_vTaskPrioritySet must be defined as 1 for this function to be available. See the RTOS Configuration documentation for more information.
Set the priority of any task.
A context switch will occur before the function returns if the priority being set is higher than the currently executing task.
void vAFunction( void ) { TaskHandle_t xHandle; // Create a task, storing the handle. xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); // ... // Use the handle to raise the priority of the created task. vTaskPrioritySet( xHandle, tskIDLE_PRIORITY + 1 ); // ... // Use a NULL handle to raise our priority to the same value. vTaskPrioritySet( NULL, tskIDLE_PRIORITY + 1 ); } [ Back to the top ] [ About FreeRTOS ] [ Sitemap ] [ Report an error on this page (with anti-spam) ] Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
// Create a task, storing the handle. xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); // ... // Use the handle to raise the priority of the created task. vTaskPrioritySet( xHandle, tskIDLE_PRIORITY + 1 ); // ... // Use a NULL handle to raise our priority to the same value. vTaskPrioritySet( NULL, tskIDLE_PRIORITY + 1 ); } [ Back to the top ] [ About FreeRTOS ] [ Sitemap ] [ Report an error on this page (with anti-spam) ] Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
// ... // Use the handle to raise the priority of the created task. vTaskPrioritySet( xHandle, tskIDLE_PRIORITY + 1 ); // ... // Use a NULL handle to raise our priority to the same value. vTaskPrioritySet( NULL, tskIDLE_PRIORITY + 1 ); } [ Back to the top ] [ About FreeRTOS ] [ Sitemap ] [ Report an error on this page (with anti-spam) ] Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
// Use the handle to raise the priority of the created task. vTaskPrioritySet( xHandle, tskIDLE_PRIORITY + 1 ); // ... // Use a NULL handle to raise our priority to the same value. vTaskPrioritySet( NULL, tskIDLE_PRIORITY + 1 ); } [ Back to the top ] [ About FreeRTOS ] [ Sitemap ] [ Report an error on this page (with anti-spam) ] Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
// ... // Use a NULL handle to raise our priority to the same value. vTaskPrioritySet( NULL, tskIDLE_PRIORITY + 1 ); } [ Back to the top ] [ About FreeRTOS ] [ Sitemap ] [ Report an error on this page (with anti-spam) ] Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
// Use a NULL handle to raise our priority to the same value. vTaskPrioritySet( NULL, tskIDLE_PRIORITY + 1 ); }
FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.
Video: Watch James Gosling & Richard Barry at re:Invent, Las Vegas 2017.
New FAQ page about the FreeRTOS kernel and Amazon FreeRTOS.