mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
net/gnrc/netif: Move GNRC_NETIF_MSG_QUEUE_SIZE to 'CONFIG_' namespace
This commit is contained in:
parent
b28a586702
commit
724d58b074
@ -26,7 +26,7 @@
|
||||
#include "cc110x_params.h"
|
||||
#include "log.h"
|
||||
#include "msg.h"
|
||||
#include "net/gnrc/netif/conf.h" /* <- GNRC_NETIF_MSG_QUEUE_SIZE */
|
||||
#include "net/gnrc/netif/conf.h" /* <- CONFIG_GNRC_NETIF_MSG_QUEUE_SIZE */
|
||||
#define ENABLE_DEBUG (0)
|
||||
#include "debug.h"
|
||||
|
||||
@ -34,11 +34,11 @@
|
||||
/**
|
||||
* @brief Additional stack size required by the driver
|
||||
*
|
||||
* With increasing of GNRC_NETIF_MSG_QUEUE_SIZE the required stack size
|
||||
* With increasing of CONFIG_GNRC_NETIF_MSG_QUEUE_SIZE the required stack size
|
||||
* increases as well. A queue size of 8 messages works with default stack size,
|
||||
* so we increase the stack by `sizeof(msg_t)` for each additional element
|
||||
*/
|
||||
#define CC110X_EXTRA_STACKSIZE ((GNRC_NETIF_MSG_QUEUE_SIZE - 8) * sizeof(msg_t))
|
||||
#define CC110X_EXTRA_STACKSIZE ((CONFIG_GNRC_NETIF_MSG_QUEUE_SIZE - 8) * sizeof(msg_t))
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -53,8 +53,8 @@ extern "C" {
|
||||
* 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 (16U)
|
||||
#ifndef CONFIG_GNRC_NETIF_MSG_QUEUE_SIZE
|
||||
#define CONFIG_GNRC_NETIF_MSG_QUEUE_SIZE (16U)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -1342,7 +1342,7 @@ static void *_gnrc_netif_thread(void *args)
|
||||
netdev_t *dev;
|
||||
int res;
|
||||
msg_t reply = { .type = GNRC_NETAPI_MSG_TYPE_ACK };
|
||||
msg_t msg, msg_queue[GNRC_NETIF_MSG_QUEUE_SIZE];
|
||||
msg_t msg, msg_queue[CONFIG_GNRC_NETIF_MSG_QUEUE_SIZE];
|
||||
|
||||
DEBUG("gnrc_netif: starting thread %i\n", sched_active_pid);
|
||||
netif = args;
|
||||
@ -1350,7 +1350,7 @@ static void *_gnrc_netif_thread(void *args)
|
||||
dev = netif->dev;
|
||||
netif->pid = sched_active_pid;
|
||||
/* setup the link-layer's message queue */
|
||||
msg_init_queue(msg_queue, GNRC_NETIF_MSG_QUEUE_SIZE);
|
||||
msg_init_queue(msg_queue, CONFIG_GNRC_NETIF_MSG_QUEUE_SIZE);
|
||||
/* register the event callback with the device driver */
|
||||
dev->event_callback = _event_cb;
|
||||
dev->context = netif;
|
||||
|
Loading…
Reference in New Issue
Block a user