Skip to content

Commit

Permalink
gnrc/udp: make message queue static
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian18 committed Oct 19, 2023
1 parent c741fa5 commit 5aa3baa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sys/net/gnrc/transport_layer/udp/gnrc_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ static kernel_pid_t _pid = KERNEL_PID_UNDEF;
* @brief Allocate memory for the UDP thread's stack
*/
static char _stack[GNRC_UDP_STACK_SIZE + DEBUG_EXTRA_STACKSIZE];
static msg_t _msg_queue[GNRC_UDP_MSG_QUEUE_SIZE];

/**
* @brief Calculate the UDP checksum dependent on the network protocol
Expand Down Expand Up @@ -220,14 +221,13 @@ static void *_event_loop(void *arg)
{
(void)arg;
msg_t msg, reply;
msg_t msg_queue[GNRC_UDP_MSG_QUEUE_SIZE];
gnrc_netreg_entry_t netreg = GNRC_NETREG_ENTRY_INIT_PID(GNRC_NETREG_DEMUX_CTX_ALL,
thread_getpid());
/* preset reply message */
reply.type = GNRC_NETAPI_MSG_TYPE_ACK;
reply.content.value = (uint32_t)-ENOTSUP;
/* initialize message queue */
msg_init_queue(msg_queue, GNRC_UDP_MSG_QUEUE_SIZE);
msg_init_queue(_msg_queue, GNRC_UDP_MSG_QUEUE_SIZE);
/* register UPD at netreg */
gnrc_netreg_register(GNRC_NETTYPE_UDP, &netreg);

Expand Down

0 comments on commit 5aa3baa

Please sign in to comment.