[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Uninitialized semaphore in TCP netconn_connect() when L
From: |
Grant Edwards |
Subject: |
Re: [lwip-users] Uninitialized semaphore in TCP netconn_connect() when LWIP_NETCONN_SEM_PER_THREAD |
Date: |
Tue, 12 Apr 2022 21:36:49 -0000 (UTC) |
User-agent: |
slrn/1.0.3 (Linux) |
On 2022-04-12, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> Where does msg->op_completed_sem get initialized?
I missed the netconn_apimsg() step. That's where it gets set:
117 static err_t
118 netconn_apimsg(tcpip_callback_fn fn, struct api_msg *apimsg)
119 {
...
127 #if LWIP_NETCONN_SEM_PER_THREAD
128 apimsg->op_completed_sem = LWIP_NETCONN_THREAD_SEM_GET();
129 #endif /* LWIP_NETCONN_SEM_PER_THREAD */
...
136 }
So the problem is that LWIP_NETCONN_THREAD_SEM_ALLOC() is never
getting called.
Are user threads that use the netconn API with
LWIP_NETCONN_SEM_PER_THREAD enabled required to call
netconn_thread_init()?
Where are things like this documented?
I've searched for netconn_thread_init in the 2.1.3 docs, and can't
find it.
--
Grant