FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [November 2012 Threads] sys_thread_new vs. xTaskCreatePosted 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. xTaskCreatePosted 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|