mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-10-10 08:02:57 -04:00
24 lines
472 B
C
24 lines
472 B
C
/* SPDX-License-Identifier: MIT */
|
|
#include "FreeRTOS.h"
|
|
#include "task.h"
|
|
|
|
static volatile int iTaskRan;
|
|
|
|
static void prvTask( void * pvUnused )
|
|
{
|
|
( void ) pvUnused;
|
|
vTaskDelay( 2 );
|
|
iTaskRan = 1;
|
|
vTaskEndScheduler();
|
|
}
|
|
|
|
int main( void )
|
|
{
|
|
if( xTaskCreate( prvTask, "smoke", configMINIMAL_STACK_SIZE, NULL, 1, NULL ) != pdPASS )
|
|
{
|
|
return EXIT_FAILURE;
|
|
}
|
|
|
|
vTaskStartScheduler();
|
|
return iTaskRan ? EXIT_SUCCESS : EXIT_FAILURE;
|
|
}
|