lwip-users
[Top][All Lists]
Advanced

[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: Ajay Bhargav
Subject: Re: [lwip-users] Requirement that sys_thread_t is integer (or pointer)?
Date: Mon, 15 Nov 2021 22:43:04 +0530

You can define it as integer or pointer based on your system. Its definately not a structure.

Regards,
Ajay Bhargav

On Mon, Nov 15, 2021, 10:36 PM Grant Edwards <grant.b.edwards@gmail.com> wrote:
Is it required that sys_thread_t be a pointer or integer type?

The documentation doesn't state that. The example implementation at
https://lwip.fandom.com/wiki/Porting_for_an_OS#Threads shows it as a
struct, and in the freeRTOS port it's a struct.

But the test code assumes it's a pointer or integer type:

   430  static void
   431  sockets_stresstest_conn_client(void *arg)
   432  {
   ...
   456    if (LWIP_RAND() & 1) {
   457      sys_thread_t t;
   ...
   463      t = sys_thread_new("sockets_stresstest_conn_client_r", sockets_stresstest_conn_client_r, data, 0, 0);
   464      LWIP_ASSERT("thread != NULL", t != 0);
   ...
   466    }

The _expression_ 't != 0' at line 464 is legal only if sys_thread_t is a
pointer or integer type.



_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

reply via email to

[Prev in Thread] Current Thread [Next in Thread]