[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Requirement that sys_thread_t is integer (or pointer)?
From: |
Grant Edwards |
Subject: |
Re: [lwip-users] Requirement that sys_thread_t is integer (or pointer)? |
Date: |
Mon, 15 Nov 2021 18:28:57 -0000 (UTC) |
User-agent: |
slrn/1.0.3 (Linux) |
On 2021-11-15, Ajay Bhargav via lwip-users <lwip-users@nongnu.org> wrote:
> You can define it as integer or pointer based on your system.
Yes, I know I can.
I want to know if it is _required_ to be an integer or pointer.
> Its definately not a structure.
It definitely is a structure in the freeRTOS port which I was told was
a good example to look at when the documentation proved to be
incomplete
Here's the current stable contrib freeRTOS port:
https://git.savannah.nongnu.org/cgit/lwip/lwip-contrib.git/tree/ports/freertos/include/arch/sys_arch.h?h=STABLE-2_1_0_RELEASE
lines 81-83:
struct _sys_thread {
void *thread_handle;
};
typedef struct _sys_thread sys_thread_t;
And here's where that's used
https://git.savannah.nongnu.org/cgit/lwip/lwip-contrib.git/tree/ports/freertos/sys_arch.c?h=STABLE-2_1_0_RELEASE
lines 463-485:
sys_thread_t
sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int
stacksize, int prio)
{
...
sys_thread_t lwip_thread;
...
lwip_thread.thread_handle = rtos_task;
return lwip_thread;
}
The types sys_sem_t and sys_mbox_t are also similar structures.
--
Grant