net: sockets: socket_service: remove k_work related code

remove k_work related code and change
the argument of the callback to `struct net_socket_service_event`.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This commit is contained in:
Fin Maaß 2024-10-18 10:44:01 +02:00 committed by Alberto Escolar
commit 03a5f417d1
13 changed files with 30 additions and 46 deletions

View file

@ -31,21 +31,15 @@ K_SEM_DEFINE(wait_data, 0, UINT_MAX);
K_SEM_DEFINE(wait_data_tcp, 0, UINT_MAX);
#define WAIT_TIME 500
static void server_handler(struct k_work *work)
static void server_handler(struct net_socket_service_event *pev)
{
struct net_socket_service_event *pev =
CONTAINER_OF(work, struct net_socket_service_event, work);
ARG_UNUSED(pev);
k_sem_give(&wait_data);
}
static void tcp_server_handler(struct k_work *work)
static void tcp_server_handler(struct net_socket_service_event *pev)
{
struct net_socket_service_event *pev =
CONTAINER_OF(work, struct net_socket_service_event, work);
ARG_UNUSED(pev);
k_sem_give(&wait_data_tcp);