samples: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit. Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
This commit is contained in:
parent
a03f1010b8
commit
6202459d9f
22 changed files with 124 additions and 61 deletions
|
@ -285,8 +285,12 @@ static void setup_tcp_accept(struct net_context *tcp_recv6)
|
|||
}
|
||||
}
|
||||
|
||||
static void listen(void)
|
||||
static void listen(void *p1, void *p2, void *p3)
|
||||
{
|
||||
ARG_UNUSED(p1);
|
||||
ARG_UNUSED(p2);
|
||||
ARG_UNUSED(p3);
|
||||
|
||||
struct net_context *udp_recv6 = { 0 };
|
||||
struct net_context *tcp_recv6 = { 0 };
|
||||
|
||||
|
@ -313,7 +317,7 @@ int main(void)
|
|||
init_app();
|
||||
|
||||
k_thread_create(&thread_data, thread_stack, STACKSIZE,
|
||||
(k_thread_entry_t)listen,
|
||||
listen,
|
||||
NULL, NULL, NULL, K_PRIO_COOP(7), 0, K_NO_WAIT);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue