drivers: use K_KERNEL_STACK macros
None of these threads run in user mode and we can save some memory. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
37aca482e9
commit
7d920ba39b
78 changed files with 105 additions and 105 deletions
|
@ -13,7 +13,7 @@
|
|||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(can_driver, CONFIG_CAN_LOG_LEVEL);
|
||||
|
||||
K_THREAD_STACK_DEFINE(tx_thread_stack,
|
||||
K_KERNEL_STACK_DEFINE(tx_thread_stack,
|
||||
CONFIG_CAN_LOOPBACK_TX_THREAD_STACK_SIZE);
|
||||
struct k_thread tx_thread_data;
|
||||
|
||||
|
@ -258,7 +258,7 @@ static int can_loopback_init(struct device *dev)
|
|||
}
|
||||
|
||||
tx_tid = k_thread_create(&tx_thread_data, tx_thread_stack,
|
||||
K_THREAD_STACK_SIZEOF(tx_thread_stack),
|
||||
K_KERNEL_STACK_SIZEOF(tx_thread_stack),
|
||||
tx_thread, data, NULL, NULL,
|
||||
CONFIG_CAN_LOOPBACK_TX_THREAD_PRIORITY,
|
||||
0, K_NO_WAIT);
|
||||
|
@ -299,7 +299,7 @@ static int socket_can_init_1(struct device *dev)
|
|||
socket_context->rx_tid =
|
||||
k_thread_create(&socket_context->rx_thread_data,
|
||||
rx_thread_stack,
|
||||
K_THREAD_STACK_SIZEOF(rx_thread_stack),
|
||||
K_KERNEL_STACK_SIZEOF(rx_thread_stack),
|
||||
rx_thread, socket_context, NULL, NULL,
|
||||
RX_THREAD_PRIORITY, 0, K_NO_WAIT);
|
||||
|
||||
|
|
|
@ -829,7 +829,7 @@ static int mcp2515_init(struct device *dev)
|
|||
|
||||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay)
|
||||
|
||||
static K_THREAD_STACK_DEFINE(mcp2515_int_thread_stack,
|
||||
static K_KERNEL_STACK_DEFINE(mcp2515_int_thread_stack,
|
||||
CONFIG_CAN_MCP2515_INT_THREAD_STACK_SIZE);
|
||||
|
||||
static struct mcp2515_data mcp2515_data_1 = {
|
||||
|
|
|
@ -745,7 +745,7 @@ static int socket_can_init_0(struct device *dev)
|
|||
socket_context->rx_tid =
|
||||
k_thread_create(&socket_context->rx_thread_data,
|
||||
rx_thread_stack,
|
||||
K_THREAD_STACK_SIZEOF(rx_thread_stack),
|
||||
K_KERNEL_STACK_SIZEOF(rx_thread_stack),
|
||||
rx_thread, socket_context, NULL, NULL,
|
||||
RX_THREAD_PRIORITY, 0, K_NO_WAIT);
|
||||
|
||||
|
|
|
@ -1117,7 +1117,7 @@ static int socket_can_init_1(struct device *dev)
|
|||
socket_context->rx_tid =
|
||||
k_thread_create(&socket_context->rx_thread_data,
|
||||
rx_thread_stack,
|
||||
K_THREAD_STACK_SIZEOF(rx_thread_stack),
|
||||
K_KERNEL_STACK_SIZEOF(rx_thread_stack),
|
||||
rx_thread, socket_context, NULL, NULL,
|
||||
RX_THREAD_PRIORITY, 0, K_NO_WAIT);
|
||||
|
||||
|
@ -1200,7 +1200,7 @@ static int socket_can_init_2(struct device *dev)
|
|||
socket_context->rx_tid =
|
||||
k_thread_create(&socket_context->rx_thread_data,
|
||||
rx_thread_stack,
|
||||
K_THREAD_STACK_SIZEOF(rx_thread_stack),
|
||||
K_KERNEL_STACK_SIZEOF(rx_thread_stack),
|
||||
rx_thread, socket_context, NULL, NULL,
|
||||
RX_THREAD_PRIORITY, 0, K_NO_WAIT);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
/* TODO: make msgq size configurable */
|
||||
CAN_DEFINE_MSGQ(socket_can_msgq, 5);
|
||||
K_THREAD_STACK_DEFINE(rx_thread_stack, RX_THREAD_STACK_SIZE);
|
||||
K_KERNEL_STACK_DEFINE(rx_thread_stack, RX_THREAD_STACK_SIZE);
|
||||
|
||||
struct socket_can_context {
|
||||
struct device *can_dev;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue