sys/auto_init/netif: Increased cc110x stack size
With the increase of the message queue size from 8 to 16 in 946b06e4f0ea2faf8b63f427dab3720e48790f76, the default stack became too small. This changes the stack size to grow with the message queue size.
This commit is contained in:
parent
972367432a
commit
88cf6cb46f
@ -21,17 +21,32 @@
|
||||
|
||||
#ifdef MODULE_CC110X
|
||||
|
||||
#include "log.h"
|
||||
#include "cc110x.h"
|
||||
#include "cc1xxx_common.h"
|
||||
#include "cc110x_params.h"
|
||||
#include "log.h"
|
||||
#include "msg.h"
|
||||
#include "net/gnrc/netif/conf.h" /* <- GNRC_NETIF_MSG_QUEUE_SIZE */
|
||||
#define ENABLE_DEBUG (0)
|
||||
#include "debug.h"
|
||||
|
||||
#ifndef CC110X_EXTRA_STACKSIZE
|
||||
/**
|
||||
* @brief Additional stack size required by the driver
|
||||
*
|
||||
* With increasing of 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))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Calculate the stack size for the MAC layer thread(s)
|
||||
*/
|
||||
#define CC110X_MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT + DEBUG_EXTRA_STACKSIZE)
|
||||
#define CC110X_MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT + \
|
||||
CC110X_EXTRA_STACKSIZE + \
|
||||
DEBUG_EXTRA_STACKSIZE)
|
||||
#ifndef CC110X_MAC_PRIO
|
||||
/**
|
||||
* @brief The priority of the MAC layer thread
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user