lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Requirement that sys_thread_t is integer (or pointer)?


From: Grant Edwards
Subject: [lwip-users] Requirement that sys_thread_t is integer (or pointer)?
Date: Mon, 15 Nov 2021 17:03:41 -0000 (UTC)
User-agent: slrn/1.0.3 (Linux)

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.





reply via email to

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