Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT


sys_thread_new vs. xTaskCreate

Posted by Manu on November 21, 2012
Hello everybody,

I am new to FreeRtos and i have managed to create several tasks and do some task handling,. Then i started to get an lwIP example running with freertos. During my tentetive steps with freeRtos i created tasks wth xTaskCreate() and this worked well for me, also this is the way documented in the freeRTOSReferenceManual. But in the lwIP example, the tasks are created by using sys_thread_new.

Can somebody explain the differences between the two functions? Are there advantages/disadvantages using the one or another?

RE: sys_thread_new vs. xTaskCreate

Posted by Manu on November 21, 2012
reading the documentation could help a lot.... :-)

If threads are supported by the underlying operating system and if
such functionality is needed in lwIP, the following function will have
to be implemented as well:

- sys_thread_t sys_thread_new(char *name, void (* thread)(void *arg), void *arg, int stacksize, int prio)

Starts a new thread named "name" with priority "prio" that will begin its
execution in the function "thread()". The "arg" argument will be passed as an
argument to the thread() function. The stack size to used for this thread is
the "stacksize" parameter. The id of the new thread is returned. Both the id
and the priority are system dependent.

[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS