mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
gnrc_netif: expose message queue size configurable
This commit is contained in:
parent
a5385c15cc
commit
13030d5a35
@ -46,6 +46,17 @@ extern "C" {
|
|||||||
#define GNRC_NETIF_PRIO (THREAD_PRIORITY_MAIN - 5)
|
#define GNRC_NETIF_PRIO (THREAD_PRIORITY_MAIN - 5)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Message queue size for network interface threads
|
||||||
|
*
|
||||||
|
* @attention This has influence on the used stack memory of the thread, so
|
||||||
|
* the thread's stack size might need to be adapted if this is
|
||||||
|
* changed.
|
||||||
|
*/
|
||||||
|
#ifndef GNRC_NETIF_MSG_QUEUE_SIZE
|
||||||
|
#define GNRC_NETIF_MSG_QUEUE_SIZE (8U)
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Number of multicast addresses needed for @ref net_gnrc_rpl "RPL".
|
* @brief Number of multicast addresses needed for @ref net_gnrc_rpl "RPL".
|
||||||
*
|
*
|
||||||
|
@ -38,8 +38,6 @@
|
|||||||
#define ENABLE_DEBUG (0)
|
#define ENABLE_DEBUG (0)
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
#define _NETIF_NETAPI_MSG_QUEUE_SIZE (8)
|
|
||||||
|
|
||||||
static gnrc_netif_t _netifs[GNRC_NETIF_NUMOF];
|
static gnrc_netif_t _netifs[GNRC_NETIF_NUMOF];
|
||||||
|
|
||||||
static void _update_l2addr_from_dev(gnrc_netif_t *netif);
|
static void _update_l2addr_from_dev(gnrc_netif_t *netif);
|
||||||
@ -1170,7 +1168,7 @@ static void *_gnrc_netif_thread(void *args)
|
|||||||
netdev_t *dev;
|
netdev_t *dev;
|
||||||
int res;
|
int res;
|
||||||
msg_t reply = { .type = GNRC_NETAPI_MSG_TYPE_ACK };
|
msg_t reply = { .type = GNRC_NETAPI_MSG_TYPE_ACK };
|
||||||
msg_t msg, msg_queue[_NETIF_NETAPI_MSG_QUEUE_SIZE];
|
msg_t msg, msg_queue[GNRC_NETIF_MSG_QUEUE_SIZE];
|
||||||
|
|
||||||
DEBUG("gnrc_netif: starting thread %i\n", sched_active_pid);
|
DEBUG("gnrc_netif: starting thread %i\n", sched_active_pid);
|
||||||
netif = args;
|
netif = args;
|
||||||
@ -1178,7 +1176,7 @@ static void *_gnrc_netif_thread(void *args)
|
|||||||
dev = netif->dev;
|
dev = netif->dev;
|
||||||
netif->pid = sched_active_pid;
|
netif->pid = sched_active_pid;
|
||||||
/* setup the link-layer's message queue */
|
/* setup the link-layer's message queue */
|
||||||
msg_init_queue(msg_queue, _NETIF_NETAPI_MSG_QUEUE_SIZE);
|
msg_init_queue(msg_queue, GNRC_NETIF_MSG_QUEUE_SIZE);
|
||||||
/* register the event callback with the device driver */
|
/* register the event callback with the device driver */
|
||||||
dev->event_callback = _event_cb;
|
dev->event_callback = _event_cb;
|
||||||
dev->context = netif;
|
dev->context = netif;
|
||||||
|
Loading…
Reference in New Issue
Block a user