void vTaskEndScheduler( void );
NOTE: This has only been implemented for the x86 Real Mode PC port.
Stops the RTOS kernel tick. All created tasks will be automatically deleted and multitasking (either preemptive or cooperative) will stop. Execution then resumes from the point where vTaskStartScheduler() was called, as if vTaskStartScheduler() had just returned.
See the demo application file main. c in the demo/PC directory for an example that uses vTaskEndScheduler ().
vTaskEndScheduler () requires an exit function to be defined within the portable layer (see vPortEndScheduler () in port. c for the PC port). This performs hardware specific operations such as stopping the RTOS kernel tick.
vTaskEndScheduler () will cause all of the resources allocated by the RTOS kernel to be freed - but will not free resources allocated by application tasks.
void vTaskCode( void * pvParameters )
for( ;; )
// Task code goes here.
// At some point we want to end the real time kernel processing
// so call ...
void vAFunction( void )
// Create at least one task before starting the RTOS kernel.
xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
// Start the real time kernel with preemption.
// Will only get here when the vTaskCode () task has called
// vTaskEndScheduler (). When we get here we are back to single task
Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd..
See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.