Browse Source

Improve naming of thread stacksize/priority constants

As discussed in #2725, this commit renames a number of stacksize constants to
better convey their intended usage. In addition, constants for thread priority
are given a `THREAD_` prefix. Changes are:

* KERNEL_CONF_STACKSIZE_PRINTF renamed to THREAD_EXTRA_STACKSIZE_PRINTF
* KERNEL_CONF_STACKSIZE_DEFAULT renamed to THREAD_STACKSIZE_DEFAULT
* KERNEL_CONF_STACKSIZE_IDLE renamed to THREAD_STACKSIZE_IDLE
* KERNEL_CONF_STACKSIZE_MAIN renamed to THREAD_STACKSIZE_MAIN
* Move thread stacksizes from kernel.h to thread.h, since the prefix changed
* PRIORITY_MIN renamed to THREAD_PRIORITY_MIN
* PRIORITY_IDLE renamed to THREAD_PRIORITY_IDLE
* PRIORITY_MAIN renamed to THREAD_PRIORITY_MAIN
* Move thread priorities from kernel.h to thread.h since the prefix has changed
* MINIMUM_STACK_SIZE renamed to THREAD_STACKSIZE_MINIMUM for consistency
dev/timer
Lucas Jenss 8 years ago
parent
commit
426170b064
  1. 63
      boards/iot-lab_M3/auto_init_ng_netif/netif_board.c
  2. 11
      boards/qemu-i386/include/cpu-conf.h
  3. 4
      boards/samr21-xpro/auto_init_ng_netif/netif_board.c
  4. 2
      core/include/debug.h
  5. 50
      core/include/kernel.h
  6. 57
      core/include/thread.h
  7. 12
      core/kernel_init.c
  8. 4
      core/msg.c
  9. 8
      cpu/atmega2560/include/cpu-conf.h
  10. 8
      cpu/cc2538/include/cpu-conf.h
  11. 8
      cpu/k60/include/cpu-conf.h
  12. 8
      cpu/kw2x/include/cpu-conf.h
  13. 8
      cpu/lpc1768/include/cpu-conf.h
  14. 10
      cpu/lpc2387/include/cpu-conf.h
  15. 10
      cpu/mc1322x/include/cpu-conf.h
  16. 10
      cpu/msp430-common/include/cpu-conf.h
  17. 22
      cpu/native/include/cpu-conf.h
  18. 8
      cpu/nrf51822/include/cpu-conf.h
  19. 8
      cpu/sam3x8e/include/cpu-conf.h
  20. 8
      cpu/samd21/include/cpu-conf.h
  21. 8
      cpu/stm32f0/include/cpu-conf.h
  22. 8
      cpu/stm32f1/include/cpu-conf.h
  23. 8
      cpu/stm32f3/include/cpu-conf.h
  24. 8
      cpu/stm32f4/include/cpu-conf.h
  25. 8
      cpu/stm32l1/include/cpu-conf.h
  26. 2
      cpu/x86/x86_hwtimer.c
  27. 20
      doc/doxygen/src/mainpage.txt
  28. 4
      drivers/cc110x_legacy_csma/cc1100_phy.c
  29. 8
      examples/ccn-lite-client/main.c
  30. 4
      examples/ccn-lite-relay/main.c
  31. 4
      examples/default/main.c
  32. 4
      examples/ipc_pingpong/main.c
  33. 2
      examples/riot_and_cpp/main.cpp
  34. 2
      examples/rpl_udp/rpl.c
  35. 2
      examples/rpl_udp/rpl_udp.h
  36. 4
      examples/rpl_udp/udp.c
  37. 6
      pkg/openwsn/0003-Fix-old-style-definitions.patch
  38. 10
      pkg/openwsn/0005-fixes-to-RIOT-adaption.patch
  39. 4
      sys/auto_init/netif/auto_init_kw2xrf.c
  40. 4
      sys/auto_init/netif/auto_init_ng_at86rf2xx.c
  41. 4
      sys/auto_init/netif/auto_init_xbee.c
  42. 4
      sys/cpp11-compat/include/riot/thread.hpp
  43. 4
      sys/include/net/ng_ipv6.h
  44. 4
      sys/include/net/ng_pktdump.h
  45. 4
      sys/include/net/ng_sixlowpan.h
  46. 4
      sys/include/net/ng_udp.h
  47. 2
      sys/include/transceiver.h
  48. 4
      sys/net/ccn_lite/ccnl-riot-compat.c
  49. 2
      sys/net/include/rpl.h
  50. 4
      sys/net/link_layer/ping/ping.c
  51. 6
      sys/net/network_layer/sixlowpan/border/border.c
  52. 2
      sys/net/network_layer/sixlowpan/border/flowcontrol.c
  53. 2
      sys/net/network_layer/sixlowpan/border/flowcontrol.h
  54. 3
      sys/net/network_layer/sixlowpan/ip.h
  55. 10
      sys/net/network_layer/sixlowpan/lowpan.c
  56. 4
      sys/net/network_layer/sixlowpan/mac.c
  57. 8
      sys/net/routing/aodvv2/aodv.c
  58. 18
      sys/net/routing/etx_beaconing.c
  59. 4
      sys/net/routing/nhdp/nhdp.c
  60. 4
      sys/net/routing/nhdp/nhdp.h
  61. 2
      sys/net/routing/rpl/rpl.c
  62. 4
      sys/net/transport_layer/tcp/tcp.c
  63. 2
      sys/net/transport_layer/tcp/tcp.h
  64. 2
      sys/net/transport_layer/tcp/tcp_timer.h
  65. 2
      sys/net/transport_layer/udp/udp.c
  66. 2
      sys/net/transport_layer/udp/udp.h
  67. 12
      sys/posix/pthread/pthread.c
  68. 4
      sys/transceiver/transceiver.c
  69. 4
      sys/uart0/uart0.c
  70. 91
      tests/driver_at86rf2xx/auto_init_ng_netif/netif_app.c
  71. 86
      tests/driver_kw2xrf/auto_init_ng_netif/netif_app.c
  72. 4
      tests/driver_nrf24l01p_lowlevel/main.c
  73. 4
      tests/driver_pir/main.c
  74. 77
      tests/driver_xbee/auto_init_ng_netif/netif_app.c
  75. 4
      tests/irq/main.c
  76. 8
      tests/msg_send_receive/main.c
  77. 4
      tests/mutex_unlock_and_sleep/main.c
  78. 4
      tests/nativenet/main.c
  79. 4
      tests/periph_uart_int/main.c
  80. 6
      tests/pipe/main.c
  81. 8
      tests/posix_semaphore/main.c
  82. 4
      tests/pthread_condition_variable/main.c
  83. 10
      tests/pthread_rwlock/main.c
  84. 4
      tests/sched_testing/main.c
  85. 4
      tests/thread_basic/main.c
  86. 4
      tests/thread_cooperation/main.c
  87. 10
      tests/thread_exit/main.c
  88. 12
      tests/thread_msg/main.c
  89. 4
      tests/thread_msg_block_w_queue/main.c
  90. 4
      tests/thread_msg_block_wo_queue/main.c
  91. 12
      tests/thread_msg_seq/main.c
  92. 4
      tests/unittests/tests-core/tests-core-ringbuffer.c
  93. 4
      tests/unittests/tests-ubjson/tests-ubjson.c
  94. 8
      tests/vtimer_msg/main.c
  95. 4
      tests/vtimer_msg_diff/main.c

63
boards/iot-lab_M3/auto_init_ng_netif/netif_board.c

@ -0,0 +1,63 @@
/*
* Copyright (C) 2015 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_iot-lab_M3
* @{
*
* @file
* @brief Network device initialization code
*
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*
* @}
*/
#include <stdio.h>
#include "board.h"
#include "auto_init.h"
#include "ng_at86rf2xx.h"
#include "net/ng_nomac.h"
#include "net/ng_netbase.h"
#define ENABLE_DEBUG (0)
#include "debug.h"
/**
* @brief Define stack parameters for the MAC layer thread
* @{
*/
#define MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
#define MAC_PRIO (THREAD_PRIORITY_MAIN - 3)
/** @} */
/**
* @brief Device descriptor for the Atmel radio
*/
static ng_at86rf2xx_t radio;
/**
* @brief Stack for the MAC layer thread
*/
static char nomac_stack[MAC_STACKSIZE];
void auto_init_ng_netif(void)
{
/* initialize the radio */
DEBUG("Initializing AT86RF231 radio\n");
ng_at86rf2xx_init(&radio, AT86RF231_SPI, AT86RF231_SPI_CLK,
AT86RF231_CS, AT86RF231_INT,
AT86RF231_SLEEP, AT86RF231_RESET);
/* starting NOMAC */
DEBUG("Starting the MAC layer\n");
ng_nomac_init(nomac_stack, sizeof(nomac_stack), MAC_PRIO, "at86rf233",
(ng_netdev_t *)(&radio));
DEBUG("Auto init of on-board radio complete\n");
}

11
boards/qemu-i386/include/cpu-conf.h

@ -25,12 +25,11 @@ extern "C" {
/* FIXME: This file is just a filler. The numbers are entirely random ... */
#define KERNEL_CONF_STACKSIZE_DEFAULT (8192)
#define KERNEL_CONF_STACKSIZE_IDLE (8192)
#define KERNEL_CONF_STACKSIZE_PRINTF (8192)
#define KERNEL_CONF_STACKSIZE_PRINTF_FLOAT (8192)
#define MINIMUM_STACK_SIZE (8192)
#define THREAD_STACKSIZE_DEFAULT (8192)
#define THREAD_STACKSIZE_IDLE (8192)
#define THREAD_EXTRA_STACKSIZE_PRINTF (8192)
#define THREAD_EXTRA_STACKSIZE_PRINTF_FLOAT (8192)
#define THREAD_STACKSIZE_MINIMUM (8192)
#define UART0_BUFSIZE (16)

4
boards/samr21-xpro/auto_init_ng_netif/netif_board.c

@ -33,8 +33,8 @@
* @brief Define stack parameters for the MAC layer thread
* @{
*/
#define MAC_STACKSIZE (KERNEL_CONF_STACKSIZE_DEFAULT)
#define MAC_PRIO (PRIORITY_MAIN - 3)
#define MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
#define MAC_PRIO (THREAD_PRIORITY_MAIN - 3)
/** @} */
/**

2
core/include/debug.h

@ -57,7 +57,7 @@ extern "C" {
#include "cpu-conf.h"
#define DEBUG_PRINT(...) \
do { \
if ((sched_active_thread == NULL) || (sched_active_thread->stack_size > KERNEL_CONF_STACKSIZE_PRINTF)) { \
if ((sched_active_thread == NULL) || (sched_active_thread->stack_size > THREAD_EXTRA_STACKSIZE_PRINTF)) { \
printf(__VA_ARGS__); \
} \
else { \

50
core/include/kernel.h

@ -37,57 +37,7 @@
extern "C" {
#endif
/**
* @def KERNEL_CONF_STACKSIZE_DEFAULT
* @brief A reasonable default stack size that will suffice most smaller tasks
*/
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#error KERNEL_CONF_STACKSIZE_DEFAULT must be defined per CPU
#endif
/**
* @def KERNEL_CONF_STACKSIZE_IDLE
* @brief Size of the idle task's stack in bytes
*/
#ifndef KERNEL_CONF_STACKSIZE_IDLE
#error KERNEL_CONF_STACKSIZE_IDLE must be defined per CPU
#endif
/**
* @def KERNEL_CONF_STACKSIZE_PRINTF
* @ingroup conf
* @brief Size of the task's printf stack in bytes
*/
#ifndef KERNEL_CONF_STACKSIZE_PRINTF
#error KERNEL_CONF_STACKSIZE_PRINTF must be defined per CPU
#endif
/**
* @def KERNEL_CONF_STACKSIZE_MAIN
* @brief Size of the main task's stack in bytes
*/
#ifndef KERNEL_CONF_STACKSIZE_MAIN
#define KERNEL_CONF_STACKSIZE_MAIN (KERNEL_CONF_STACKSIZE_DEFAULT + KERNEL_CONF_STACKSIZE_PRINTF)
#endif
/* ------------------------------------------------------------------------- */
/**
* @def PRIORITY_MIN
* @brief Least priority a thread can have
*/
#define PRIORITY_MIN (SCHED_PRIO_LEVELS-1)
/**
* @def PRIORITY_IDLE
* @brief Priority of the idle thread
*/
#define PRIORITY_IDLE PRIORITY_MIN
/**
* @def PRIORITY_MAIN
* @brief Priority of the main thread
*/
#define PRIORITY_MAIN (PRIORITY_MIN - (SCHED_PRIO_LEVELS/2))
/**
* @def LPM_PREVENT_SLEEP_UART

57
core/include/thread.h

@ -35,13 +35,64 @@
*/
#define STATUS_NOT_FOUND (-1)
/**
* @def THREAD_STACKSIZE_DEFAULT
* @brief A reasonable default stack size that will suffice most smaller tasks
*/
#ifndef THREAD_STACKSIZE_DEFAULT
#error THREAD_STACKSIZE_DEFAULT must be defined per CPU
#endif
/**
* @def THREAD_STACKSIZE_IDLE
* @brief Size of the idle task's stack in bytes
*/
#ifndef THREAD_STACKSIZE_IDLE
#error THREAD_STACKSIZE_IDLE must be defined per CPU
#endif
/**
* @def THREAD_EXTRA_STACKSIZE_PRINTF
* @ingroup conf
* @brief Size of the task's printf stack in bytes
*/
#ifndef THREAD_EXTRA_STACKSIZE_PRINTF
#error THREAD_EXTRA_STACKSIZE_PRINTF must be defined per CPU
#endif
/**
* @def THREAD_STACKSIZE_MAIN
* @brief Size of the main task's stack in bytes
*/
#ifndef THREAD_STACKSIZE_MAIN
#define THREAD_STACKSIZE_MAIN (THREAD_STACKSIZE_DEFAULT + THREAD_EXTRA_STACKSIZE_PRINTF)
#endif
/**
* @brief Minimum stack size
*/
#ifndef MINIMUM_STACK_SIZE
#define MINIMUM_STACK_SIZE (sizeof(tcb_t))
#ifndef THREAD_STACKSIZE_MINIMUM
#define THREAD_STACKSIZE_MINIMUM (sizeof(tcb_t))
#endif
/**
* @def THREAD_PRIORITY_MIN
* @brief Least priority a thread can have
*/
#define THREAD_PRIORITY_MIN (SCHED_PRIO_LEVELS-1)
/**
* @def THREAD_PRIORITY_IDLE
* @brief Priority of the idle thread
*/
#define THREAD_PRIORITY_IDLE (THREAD_PRIORITY_MIN)
/**
* @def THREAD_PRIORITY_MAIN
* @brief Priority of the main thread
*/
#define THREAD_PRIORITY_MAIN (THREAD_PRIORITY_MIN - (SCHED_PRIO_LEVELS/2))
/**
* @brief Creates a new thread
*
@ -56,7 +107,7 @@
* A low value for *priority* number means the thread having a high priority
* with 0 being the highest possible priority.
*
* The lowest possible priority is *PRIORITY_IDLE - 1*. The value is depending
* The lowest possible priority is *THREAD_PRIORITY_IDLE - 1*. The value is depending
* on the platforms architecture, e.g. 30 in 32-bit systems, 14 in 16-bit systems.
*
*

12
core/kernel_init.c

@ -76,8 +76,8 @@ static void *idle_thread(void *arg)
const char *main_name = "main";
const char *idle_name = "idle";
static char main_stack[KERNEL_CONF_STACKSIZE_MAIN];
static char idle_stack[KERNEL_CONF_STACKSIZE_IDLE];
static char main_stack[THREAD_STACKSIZE_MAIN];
static char idle_stack[THREAD_STACKSIZE_IDLE];
void kernel_init(void)
{
@ -86,12 +86,12 @@ void kernel_init(void)
hwtimer_init();
if (thread_create(idle_stack, sizeof(idle_stack), PRIORITY_IDLE, CREATE_WOUT_YIELD | CREATE_STACKTEST, idle_thread, NULL, idle_name) < 0) {
LOG_ERROR("kernel_init(): error creating idle task.\n");
if (thread_create(idle_stack, sizeof(idle_stack), THREAD_PRIORITY_IDLE, CREATE_WOUT_YIELD | CREATE_STACKTEST, idle_thread, NULL, idle_name) < 0) {
printf("kernel_init(): error creating idle task.\n");
}
if (thread_create(main_stack, sizeof(main_stack), PRIORITY_MAIN, CREATE_WOUT_YIELD | CREATE_STACKTEST, main_trampoline, NULL, main_name) < 0) {
LOG_ERROR("kernel_init(): error creating main task.\n");
if (thread_create(main_stack, sizeof(main_stack), THREAD_PRIORITY_MAIN, CREATE_WOUT_YIELD | CREATE_STACKTEST, main_trampoline, NULL, main_name) < 0) {
printf("kernel_init(): error creating main task.\n");
}
LOG_INFO("kernel_init(): jumping into first task...\n");

4
core/msg.c

@ -351,7 +351,7 @@ static int _msg_receive(msg_t *m, int block)
*m = *sender_msg;
/* remove sender from queue */
uint16_t sender_prio = PRIORITY_IDLE;
uint16_t sender_prio = THREAD_PRIORITY_IDLE;
if (sender->status != STATUS_REPLY_BLOCKED) {
sender->wait_data = NULL;
sched_set_status(sender, STATUS_PENDING);
@ -359,7 +359,7 @@ static int _msg_receive(msg_t *m, int block)
}
restoreIRQ(state);
if (sender_prio < PRIORITY_IDLE) {
if (sender_prio < THREAD_PRIORITY_IDLE) {
sched_switch(sender_prio);
}
return 1;

8
cpu/atmega2560/include/cpu-conf.h

@ -31,13 +31,13 @@ extern "C" {
* size tested sucessfully even with pretty small stacks.k
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF (128)
#define THREAD_EXTRA_STACKSIZE_PRINTF (128)
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT (256)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (256)
#endif
#define KERNEL_CONF_STACKSIZE_IDLE (128)
#define THREAD_STACKSIZE_IDLE (128)
/** @} */
/**

8
cpu/cc2538/include/cpu-conf.h

@ -36,13 +36,13 @@ extern "C" {
* @name Kernel configuration
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF 1024
#define THREAD_EXTRA_STACKSIZE_PRINTF 1024
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT 1024
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT 1024
#endif
#define KERNEL_CONF_STACKSIZE_IDLE 512
#define THREAD_STACKSIZE_IDLE 512
/** @} */
/**

8
cpu/k60/include/cpu-conf.h

@ -82,13 +82,13 @@ extern "C"
* TODO: Tune this
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF (1024)
#define THREAD_EXTRA_STACKSIZE_PRINTF (1024)
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT (1024)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (1024)
#endif
#define KERNEL_CONF_STACKSIZE_IDLE (256)
#define THREAD_STACKSIZE_IDLE (256)
/** @} */
/**

8
cpu/kw2x/include/cpu-conf.h

@ -47,13 +47,13 @@ extern "C"
*
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF (1024)
#define THREAD_EXTRA_STACKSIZE_PRINTF (1024)
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT (1024)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (1024)
#endif
#define KERNEL_CONF_STACKSIZE_IDLE (256)
#define THREAD_STACKSIZE_IDLE (256)
/** @} */
/**

8
cpu/lpc1768/include/cpu-conf.h

@ -36,13 +36,13 @@ extern "C" {
* TODO: measure and adjust for the Cortex-M3
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF (1024)
#define THREAD_EXTRA_STACKSIZE_PRINTF (1024)
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT (1024)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (1024)
#endif
#define KERNEL_CONF_STACKSIZE_IDLE (256)
#define THREAD_STACKSIZE_IDLE (256)
/** @} */
/**

10
cpu/lpc2387/include/cpu-conf.h

@ -43,14 +43,14 @@ extern "C" {
* @name Kernel configuration
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF_FLOAT (4096)
#define KERNEL_CONF_STACKSIZE_PRINTF (2048)
#define THREAD_EXTRA_STACKSIZE_PRINTF_FLOAT (4096)
#define THREAD_EXTRA_STACKSIZE_PRINTF (2048)
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT (512)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (512)
#endif
#define KERNEL_CONF_STACKSIZE_IDLE (160)
#define THREAD_STACKSIZE_IDLE (160)
/** @} */
/**

10
cpu/mc1322x/include/cpu-conf.h

@ -40,14 +40,14 @@ extern "C" {
* @name Kernel configuration
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF_FLOAT (4096)
#define KERNEL_CONF_STACKSIZE_PRINTF (2048)
#define THREAD_EXTRA_STACKSIZE_PRINTF_FLOAT (4096)
#define THREAD_EXTRA_STACKSIZE_PRINTF (2048)
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT (512)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (512)
#endif
#define KERNEL_CONF_STACKSIZE_IDLE (160)
#define THREAD_STACKSIZE_IDLE (160)
/** @} */
/**

10
cpu/msp430-common/include/cpu-conf.h

@ -17,14 +17,14 @@ extern "C" {
* @name Kernel configuration
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF (256)
#define KERNEL_CONF_STACKSIZE_PRINTF_FLOAT (KERNEL_CONF_STACKSIZE_PRINTF)
#define THREAD_EXTRA_STACKSIZE_PRINTF (256)
#define THREAD_EXTRA_STACKSIZE_PRINTF_FLOAT (THREAD_EXTRA_STACKSIZE_PRINTF)
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT (256)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (256)
#endif
#define KERNEL_CONF_STACKSIZE_IDLE (96)
#define THREAD_STACKSIZE_IDLE (96)
#define MSP430_ISR_STACK_SIZE (256)
#define RX_BUF_SIZE (3)

22
cpu/native/include/cpu-conf.h

@ -22,28 +22,28 @@ extern "C" {
/* TODO: tighten stack sizes */
#ifdef __MACH__ /* OSX */
#define KERNEL_CONF_STACKSIZE_DEFAULT (163840)
#define KERNEL_CONF_STACKSIZE_IDLE (163840)
#define KERNEL_CONF_STACKSIZE_PRINTF (163840)
#define KERNEL_CONF_STACKSIZE_PRINTF_FLOAT (163840)
#define THREAD_STACKSIZE_DEFAULT (163840)
#define THREAD_STACKSIZE_IDLE (163840)
#define THREAD_EXTRA_STACKSIZE_PRINTF (163840)
#define THREAD_EXTRA_STACKSIZE_PRINTF_FLOAT (163840)
/* for core/include/thread.h */
#define MINIMUM_STACK_SIZE (163840)
#define THREAD_STACKSIZE_MINIMUM (163840)
/* undefine the TRANSCEIVER_STACK_SIZE (2048 or 512) defined in transceiver.h */
#ifdef TRANSCEIVER_STACK_SIZE
#undef TRANSCEIVER_STACK_SIZE
#endif
#define TRANSCEIVER_STACK_SIZE (163840)
/* native internal */
#define MINIMUM_STACK_SIZE (163840)
#define THREAD_STACKSIZE_MINIMUM (163840)
#define NATIVE_ISR_STACKSIZE (163840)
#else /* Linux etc. */
#define KERNEL_CONF_STACKSIZE_DEFAULT (8192)
#define KERNEL_CONF_STACKSIZE_IDLE (8192)
#define KERNEL_CONF_STACKSIZE_PRINTF (8192)
#define KERNEL_CONF_STACKSIZE_PRINTF_FLOAT (8192)
#define THREAD_STACKSIZE_DEFAULT (8192)
#define THREAD_STACKSIZE_IDLE (8192)
#define THREAD_EXTRA_STACKSIZE_PRINTF (8192)
#define THREAD_EXTRA_STACKSIZE_PRINTF_FLOAT (8192)
/* for core/include/thread.h */
#define MINIMUM_STACK_SIZE (8192)
#define THREAD_STACKSIZE_MINIMUM (8192)
/* undefine the TRANSCEIVER_STACK_SIZE (2048 or 512) defined in transceiver.h */
#ifdef TRANSCEIVER_STACK_SIZE
#undef TRANSCEIVER_STACK_SIZE

8
cpu/nrf51822/include/cpu-conf.h

@ -30,13 +30,13 @@ extern "C" {
* @name Kernel configuration
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF (512)
#define THREAD_EXTRA_STACKSIZE_PRINTF (512)
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT (1024)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (1024)
#endif
#define KERNEL_CONF_STACKSIZE_IDLE (256)
#define THREAD_STACKSIZE_IDLE (256)
/** @} */
/**

8
cpu/sam3x8e/include/cpu-conf.h

@ -30,13 +30,13 @@ extern "C" {
* TODO: measure and adjust for the cortex-m3
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF (2500)
#define THREAD_EXTRA_STACKSIZE_PRINTF (2500)
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT (2500)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (2500)
#endif
#define KERNEL_CONF_STACKSIZE_IDLE (512)
#define THREAD_STACKSIZE_IDLE (512)
/** @} */
/**

8
cpu/samd21/include/cpu-conf.h

@ -30,13 +30,13 @@ extern "C" {
* TODO: measure and adjust for the cortex-m0
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF (512)
#define THREAD_EXTRA_STACKSIZE_PRINTF (512)
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT (1024)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (1024)
#endif
#define KERNEL_CONF_STACKSIZE_IDLE (256)
#define THREAD_STACKSIZE_IDLE (256)
/** @} */
/**

8
cpu/stm32f0/include/cpu-conf.h

@ -41,13 +41,13 @@ extern "C" {
* TODO: measure and adjust for the Cortex-M0
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF (512)
#define THREAD_EXTRA_STACKSIZE_PRINTF (512)
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT (512)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (512)
#endif
#define KERNEL_CONF_STACKSIZE_IDLE (192)
#define THREAD_STACKSIZE_IDLE (192)
/** @} */
/**

8
cpu/stm32f1/include/cpu-conf.h

@ -35,13 +35,13 @@ extern "C" {
* TODO: measure and adjust for the cortex-m3
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF (1024)
#define THREAD_EXTRA_STACKSIZE_PRINTF (1024)
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT (1024)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (1024)
#endif
#define KERNEL_CONF_STACKSIZE_IDLE (256)
#define THREAD_STACKSIZE_IDLE (256)
/** @} */
/**

8
cpu/stm32f3/include/cpu-conf.h

@ -34,13 +34,13 @@
* TODO: measure and adjust for the Cortex-M4f
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF (1024)
#define THREAD_EXTRA_STACKSIZE_PRINTF (1024)
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT (1024)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (1024)
#endif
#define KERNEL_CONF_STACKSIZE_IDLE (256)
#define THREAD_STACKSIZE_IDLE (256)
/** @} */
/**

8
cpu/stm32f4/include/cpu-conf.h

@ -33,13 +33,13 @@
* TODO: measure and adjust for the Cortex-M4f
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF (2500)
#define THREAD_EXTRA_STACKSIZE_PRINTF (2500)
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT (2500)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (2500)
#endif
#define KERNEL_CONF_STACKSIZE_IDLE (512)
#define THREAD_STACKSIZE_IDLE (512)
/** @} */
/**

8
cpu/stm32l1/include/cpu-conf.h

@ -32,13 +32,13 @@ extern "C" {
*
* @{
*/
#define KERNEL_CONF_STACKSIZE_PRINTF (1024)
#define THREAD_EXTRA_STACKSIZE_PRINTF (1024)
#ifndef KERNEL_CONF_STACKSIZE_DEFAULT
#define KERNEL_CONF_STACKSIZE_DEFAULT (1024)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (1024)
#endif
#define KERNEL_CONF_STACKSIZE_IDLE (256)
#define THREAD_STACKSIZE_IDLE (256)
/** @} */
/**

2
cpu/x86/x86_hwtimer.c

@ -166,7 +166,7 @@ void x86_init_hwtimer(void)
static void (*hwtimer_callback)(int timer);
static char hwtimer_stack[KERNEL_CONF_STACKSIZE_DEFAULT];
static char hwtimer_stack[THREAD_STACKSIZE_DEFAULT];
static kernel_pid_t hwtimer_pid = KERNEL_PID_UNDEF;
struct alarm_time {

20
doc/doxygen/src/mainpage.txt

@ -138,24 +138,24 @@
* `cpu-conf.` (which should be provided by the implementation for all
* supported MCUs). The constants for these stack sizes are
*
* * `KERNEL_CONF_STACKSIZE_IDLE`
* * `KERNEL_CONF_STACKSIZE_DEFAULT`
* * `KERNEL_CONF_STACKSIZE_PRINTF`
* * `KERNEL_CONF_STACKSIZE_MAIN`
* * `THREAD_STACKSIZE_IDLE`
* * `THREAD_STACKSIZE_DEFAULT`
* * `THREAD_EXTRA_STACKSIZE_PRINTF`
* * `THREAD_STACKSIZE_MAIN`
*
* and can be used by including `kernel.h`. ARM based platforms additionally
* define `KERNEL_CONF_STACKSIZE_PRINTF_FLOAT`, because newlibs printf
* define `THREAD_EXTRA_STACKSIZE_PRINTF_FLOAT`, because newlibs printf
* implementation uses more memory for printing floating point numbers.
*
* `KERNEL_CONF_STACKSIZE_IDLE` is the stack size for the idle thread and
* probably the smallest sensible stack size. `KERNEL_CONF_STACKSIZE_DEFAULT`
* `THREAD_STACKSIZE_IDLE` is the stack size for the idle thread and
* probably the smallest sensible stack size. `THREAD_STACKSIZE_DEFAULT`
* is a default size for any typical thread, _not_ using printf.
* `KERNEL_CONF_STACKSIZE_PRINTF` defines additional stack space needed if the
* `THREAD_EXTRA_STACKSIZE_PRINTF` defines additional stack space needed if the
* thread needs to call printf (which requires additional memory when using
* newlib). `KERNEL_CONF_STACKSIZE_MAIN` is the stack size for the main thread
* newlib). `THREAD_STACKSIZE_MAIN` is the stack size for the main thread
* and probably a good size for your application. (Note, that on most
* non-newlib dependent platforms this will probably equal
* `KERNEL_CONF_STACKSIZE_DEFAULT`.
* `THREAD_STACKSIZE_DEFAULT`.
*
* ####The IPC
*

4
drivers/cc110x_legacy_csma/cc1100_phy.c

@ -42,7 +42,7 @@
#include "msg.h"
#include "debug.h"
#define PRIORITY_CC1100 PRIORITY_MAIN-1
#define PRIORITY_CC1100 THREAD_PRIORITY_MAIN-1
#define MSG_POLL 12346
@ -83,7 +83,7 @@ static timex_t cc1100_watch_dog_period;
static kernel_pid_t cc1100_event_handler_pid;
static void *cc1100_event_handler_function(void *);
static char event_handler_stack[KERNEL_CONF_STACKSIZE_MAIN];
static char event_handler_stack[THREAD_STACKSIZE_MAIN];
/*---------------------------------------------------------------------------*/
/* Sequence number buffer management data structures */

8
examples/ccn-lite-client/main.c

@ -44,10 +44,10 @@
static const char DEFAULT_INTEREST[] = "/ccnx/0.7.1/doc/technical/CanonicalOrder.txt";
char relay_stack[KERNEL_CONF_STACKSIZE_MAIN];
char relay_stack[THREAD_STACKSIZE_MAIN];
#if RIOT_CCN_APPSERVER
char appserver_stack[KERNEL_CONF_STACKSIZE_MAIN];
char appserver_stack[THREAD_STACKSIZE_MAIN];
#endif
static volatile kernel_pid_t _relay_pid = KERNEL_PID_UNDEF, _appserver_pid = KERNEL_PID_UNDEF;
@ -72,7 +72,7 @@ static int riot_ccn_appserver(int argc, char **argv)
_appserver_pid = thread_create(
appserver_stack, sizeof(appserver_stack),
PRIORITY_MAIN - 1, CREATE_STACKTEST,
THREAD_PRIORITY_MAIN - 1, CREATE_STACKTEST,
ccnl_riot_appserver_start, (void *) &_relay_pid, "appserver");
DEBUG("ccn-lite appserver on thread_id %" PRIkernel_pid "...\n", _appserver_pid);
@ -186,7 +186,7 @@ static int riot_ccn_relay_start(void)
_relay_pid = thread_create(
relay_stack, sizeof(relay_stack),
PRIORITY_MAIN - 2, CREATE_STACKTEST,
THREAD_PRIORITY_MAIN - 2, CREATE_STACKTEST,
ccnl_riot_relay_start, NULL, "relay");
DEBUG("ccn-lite relay on thread_id %" PRIkernel_pid "...\n", _relay_pid);

4
examples/ccn-lite-relay/main.c

@ -33,7 +33,7 @@
static kernel_pid_t _relay_pid = KERNEL_PID_UNDEF;
char t2_stack[KERNEL_CONF_STACKSIZE_MAIN];
char t2_stack[THREAD_STACKSIZE_MAIN];
void set_address_handler(uint16_t a)
{
@ -75,7 +75,7 @@ int main(void)
_relay_pid = thread_getpid();
thread_create(t2_stack, sizeof(t2_stack), PRIORITY_MAIN + 1,
thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN + 1,
CREATE_STACKTEST, second_thread, NULL, "helper thread");
printf("starting ccn-lite relay...\n");

4
examples/default/main.c

@ -49,7 +49,7 @@
#define SND_BUFFER_SIZE (100)
#define RCV_BUFFER_SIZE (64)
#define RADIO_STACK_SIZE (KERNEL_CONF_STACKSIZE_MAIN)
#define RADIO_STACK_SIZE (THREAD_STACKSIZE_MAIN)
#ifdef MODULE_TRANSCEIVER
@ -121,7 +121,7 @@ void init_transceiver(void)
kernel_pid_t radio_pid = thread_create(
radio_stack_buffer,
sizeof(radio_stack_buffer),
PRIORITY_MAIN - 2,
THREAD_PRIORITY_MAIN - 2,
CREATE_STACKTEST,
radio,
NULL,

4
examples/ipc_pingpong/main.c

@ -41,7 +41,7 @@ void *second_thread(void *arg)
return NULL;
}
char second_thread_stack[KERNEL_CONF_STACKSIZE_MAIN];
char second_thread_stack[THREAD_STACKSIZE_MAIN];
int main(void)
{
@ -51,7 +51,7 @@ int main(void)
msg_t m;
kernel_pid_t pid = thread_create(second_thread_stack, sizeof(second_thread_stack),
PRIORITY_MAIN - 1, CREATE_STACKTEST,
THREAD_PRIORITY_MAIN - 1, CREATE_STACKTEST,
second_thread, NULL, "pong");
m.content.value = 1;

2
examples/riot_and_cpp/main.cpp

@ -37,7 +37,7 @@ extern "C" {
using namespace std;
/* thread's stack */
char threadA_stack [KERNEL_CONF_STACKSIZE_MAIN];
char threadA_stack [THREAD_STACKSIZE_MAIN];
/* thread's function */
void *threadA_func(void *arg);

2
examples/rpl_udp/rpl.c

@ -144,7 +144,7 @@ int rpl_udp_init(int argc, char **argv)
DEBUGF("Start monitor\n");
kernel_pid_t monitor_pid = thread_create(monitor_stack_buffer,
sizeof(monitor_stack_buffer),
PRIORITY_MAIN - 2,
THREAD_PRIORITY_MAIN - 2,
CREATE_STACKTEST,
rpl_udp_monitor,
NULL,

2
examples/rpl_udp/rpl_udp.h

@ -17,7 +17,7 @@ extern "C" {
#define RADIO_CHANNEL (10)
#define MONITOR_STACK_SIZE (KERNEL_CONF_STACKSIZE_MAIN)
#define MONITOR_STACK_SIZE (THREAD_STACKSIZE_MAIN)
#define RCV_BUFFER_SIZE (32)
/* RPL shell command handlers */

4
examples/rpl_udp/udp.c

@ -35,7 +35,7 @@
#define UDP_BUFFER_SIZE (128)
#define SERVER_PORT (0xFF01)
static char udp_server_stack_buffer[KERNEL_CONF_STACKSIZE_MAIN];
static char udp_server_stack_buffer[THREAD_STACKSIZE_MAIN];
char addr_str[IPV6_MAX_ADDR_STR_LEN];
static void *init_udp_server(void *);
@ -48,7 +48,7 @@ int udp_server(int argc, char **argv)
kernel_pid_t udp_server_thread_pid = thread_create(udp_server_stack_buffer,
sizeof(udp_server_stack_buffer),
PRIORITY_MAIN, CREATE_STACKTEST,
THREAD_PRIORITY_MAIN, CREATE_STACKTEST,
init_udp_server,
NULL,
"init_udp_server");

6
pkg/openwsn/0003-Fix-old-style-definitions.patch

@ -1578,7 +1578,7 @@ index 31021d4..3f4b36e 100644
+#define ENABLE_DEBUG (0)
+#include "debug.h"
+
+static char openwsn_stack[KERNEL_CONF_STACKSIZE_MAIN];
+static char openwsn_stack[THREAD_STACKSIZE_MAIN];
+int openwsn_pid = -1;
+
+void openwsn_init(void);
@ -1586,7 +1586,7 @@ index 31021d4..3f4b36e 100644
+
+void openwsn_start_thread(void) {
+ DEBUG("%s\n",__PRETTY_FUNCTION__);
+ openwsn_pid = thread_create(openwsn_stack, KERNEL_CONF_STACKSIZE_MAIN,
+ openwsn_pid = thread_create(openwsn_stack, THREAD_STACKSIZE_MAIN,
+ PRIORITY_OPENWSN-2, CREATE_STACKTEST,
+ openwsn_start, NULL, "openwsn thread");
+}
@ -1618,7 +1618,7 @@ index 138cb12..5a9f1fa 100644
+
+//=========================== define ==========================================
+
+#define PRIORITY_OPENWSN PRIORITY_MAIN-1
+#define PRIORITY_OPENWSN THREAD_PRIORITY_MAIN-1
+
#endif
diff --git a/projects/common/03oos_openwsn/Makefile b/projects/common/03oos_openwsn/Makefile

10
pkg/openwsn/0005-fixes-to-RIOT-adaption.patch

@ -2728,9 +2728,9 @@ index 3f4b36e..70f1750 100644
#define ENABLE_DEBUG (0)
#include "debug.h"
-static char openwsn_stack[KERNEL_CONF_STACKSIZE_MAIN];
-static char openwsn_stack[THREAD_STACKSIZE_MAIN];
-int openwsn_pid = -1;
+static char openwsn_stack[KERNEL_CONF_STACKSIZE_MAIN*2];
+static char openwsn_stack[THREAD_STACKSIZE_MAIN*2];
+kernel_pid_t openwsn_pid = -1;
+uint8_t owsn_mop;
@ -2740,7 +2740,7 @@ index 3f4b36e..70f1750 100644
-void openwsn_start_thread(void) {
+void openwsn_start_thread(int argc, char **argv) {
DEBUG("%s\n",__PRETTY_FUNCTION__);
- openwsn_pid = thread_create(openwsn_stack, KERNEL_CONF_STACKSIZE_MAIN,
- openwsn_pid = thread_create(openwsn_stack, THREAD_STACKSIZE_MAIN,
- PRIORITY_OPENWSN-2, CREATE_STACKTEST,
- openwsn_start, NULL, "openwsn thread");
+ if (argc < 2) {
@ -2754,14 +2754,14 @@ index 3f4b36e..70f1750 100644
+ if (command == 'r') {
+ printf("Starting OpenWSN as root ... ");
+ owsn_mop = 1;
+ openwsn_pid = thread_create(openwsn_stack, KERNEL_CONF_STACKSIZE_MAIN,
+ openwsn_pid = thread_create(openwsn_stack, THREAD_STACKSIZE_MAIN,
+ PRIORITY_OPENWSN, CREATE_STACKTEST,
+ openwsn_start, (void*)&owsn_mop, "openwsn thread");
+ }
+ else {
+ printf("Starting OpenWSN as node ... ");
+ owsn_mop = 0;
+ openwsn_pid = thread_create(openwsn_stack, KERNEL_CONF_STACKSIZE_MAIN,
+ openwsn_pid = thread_create(openwsn_stack, THREAD_STACKSIZE_MAIN,
+ PRIORITY_OPENWSN, CREATE_STACKTEST,
+ openwsn_start, (void*)&owsn_mop, "openwsn thread");
+ }

4
sys/auto_init/netif/auto_init_kw2xrf.c

@ -35,8 +35,8 @@
* @brief Define stack parameters for the MAC layer thread
* @{
*/
#define KW2XRF_MAC_STACKSIZE (KERNEL_CONF_STACKSIZE_DEFAULT)
#define KW2XRF_MAC_PRIO (PRIORITY_MAIN - 3)
#define KW2XRF_MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
#define KW2XRF_MAC_PRIO (THREAD_PRIORITY_MAIN - 3)
#define KW2XRF_NUM (sizeof(kw2xrf_params)/sizeof(kw2xrf_params[0]))

4
sys/auto_init/netif/auto_init_ng_at86rf2xx.c

@ -33,8 +33,8 @@
* @brief Define stack parameters for the MAC layer thread
* @{
*/
#define AT86RF2XX_MAC_STACKSIZE (KERNEL_CONF_STACKSIZE_DEFAULT)
#define AT86RF2XX_MAC_PRIO (PRIORITY_MAIN - 3)
#define AT86RF2XX_MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
#define AT86RF2XX_MAC_PRIO (THREAD_PRIORITY_MAIN - 3)
#define AT86RF2XX_NUM (sizeof(at86rf2xx_params)/sizeof(at86rf2xx_params[0]))

4
sys/auto_init/netif/auto_init_xbee.c

@ -37,8 +37,8 @@ static xbee_t xbee_devs[XBEE_NUM];
* @brief Define stack parameters for the MAC layer thread
* @{
*/
#define XBEE_MAC_STACKSIZE (KERNEL_CONF_STACKSIZE_DEFAULT)
#define XBEE_MAC_PRIO (PRIORITY_MAIN - 3)
#define XBEE_MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
#define XBEE_MAC_PRIO (THREAD_PRIORITY_MAIN - 3)
/**
* @brief Stacks for the MAC layer threads

4
sys/cpp11-compat/include/riot/thread.hpp

@ -47,7 +47,7 @@ namespace riot {
namespace {
constexpr kernel_pid_t thread_uninitialized = -1;
constexpr size_t stack_size = KERNEL_CONF_STACKSIZE_MAIN;
constexpr size_t stack_size = THREAD_STACKSIZE_MAIN;
}
struct thread_data {
@ -228,7 +228,7 @@ thread::thread(F&& f, Args&&... args)
std::unique_ptr<func_and_args> p(
new func_and_args(m_data.get(), forward<F>(f), forward<Args>(args)...));
m_handle = thread_create(
m_data->stack, stack_size, PRIORITY_MAIN - 1, 0, // CREATE_WOUT_YIELD
m_data->stack, stack_size, THREAD_PRIORITY_MAIN - 1, 0, // CREATE_WOUT_YIELD
&thread_proxy<func_and_args>, p.get(), "riot_cpp_thread");
if (m_handle >= 0) {
p.release();

4
sys/include/net/ng_ipv6.h

@ -45,14 +45,14 @@ extern "C" {
* @brief Default stack size to use for the IPv6 thread
*/
#ifndef NG_IPV6_STACK_SIZE
#define NG_IPV6_STACK_SIZE (KERNEL_CONF_STACKSIZE_DEFAULT)
#define NG_IPV6_STACK_SIZE (THREAD_STACKSIZE_DEFAULT)
#endif
/**
* @brief Default priority for the IPv6 thread
*/
#ifndef NG_IPV6_PRIO
#define NG_IPV6_PRIO (PRIORITY_MAIN - 3)
#define NG_IPV6_PRIO (THREAD_PRIORITY_MAIN - 3)
#endif
/**

4
sys/include/net/ng_pktdump.h

@ -39,14 +39,14 @@ extern "C" {
* @brief Priority of the pktdump thread
*/
#ifndef NG_PKTDUMP_PRIO
#define NG_PKTDUMP_PRIO (PRIORITY_MAIN - 1)
#define NG_PKTDUMP_PRIO (THREAD_PRIORITY_MAIN - 1)
#endif
/**
* @brief Stack size used for the pktdump thread
*/
#ifndef NG_PKTDUMP_STACKSIZE
#define NG_PKTDUMP_STACKSIZE (KERNEL_CONF_STACKSIZE_MAIN)
#define NG_PKTDUMP_STACKSIZE (THREAD_STACKSIZE_MAIN)
#endif
/**

4
sys/include/net/ng_sixlowpan.h

@ -34,14 +34,14 @@ extern "C" {
* @brief Default stack size to use for the 6LoWPAN thread
*/
#ifndef NG_SIXLOWPAN_STACK_SIZE
#define NG_SIXLOWPAN_STACK_SIZE (KERNEL_CONF_STACKSIZE_DEFAULT)
#define NG_SIXLOWPAN_STACK_SIZE (THREAD_STACKSIZE_DEFAULT)
#endif
/**
* @brief Default priority for the 6LoWPAN thread
*/
#ifndef NG_SIXLOWPAN_PRIO
#define NG_SIXLOWPAN_PRIO (PRIORITY_MAIN - 4)
#define NG_SIXLOWPAN_PRIO (THREAD_PRIORITY_MAIN - 4)
#endif
/**

4
sys/include/net/ng_udp.h

@ -42,14 +42,14 @@ extern "C" {
* @brief Priority of the pktdump thread
*/
#ifndef NG_UDP_PRIO
#define NG_UDP_PRIO (PRIORITY_MAIN - 2)
#define NG_UDP_PRIO (THREAD_PRIORITY_MAIN - 2)
#endif
/**
* @brief Default stack size to use for the UDP thread
*/
#ifndef NG_UDP_STACK_SIZE
#define NG_UDP_STACK_SIZE (KERNEL_CONF_STACKSIZE_DEFAULT)
#define NG_UDP_STACK_SIZE (THREAD_STACKSIZE_DEFAULT)
#endif
/**

2
sys/include/transceiver.h

@ -95,7 +95,7 @@ extern "C" {
* @brief Stack size for transceiver thread
*/
#ifndef TRANSCEIVER_STACK_SIZE
#define TRANSCEIVER_STACK_SIZE (KERNEL_CONF_STACKSIZE_DEFAULT)
#define TRANSCEIVER_STACK_SIZE (THREAD_STACKSIZE_DEFAULT)
#endif
/**

4
sys/net/ccn_lite/ccnl-riot-compat.c

@ -40,7 +40,7 @@ radio_packet_t p;
transceiver_command_t tcmd;
msg_t mesg, rep;
char relay_helper_stack[KERNEL_CONF_STACKSIZE_MAIN];
char relay_helper_stack[THREAD_STACKSIZE_MAIN];
int riot_send_transceiver(uint8_t *buf, uint16_t size, uint16_t to)
{
@ -117,7 +117,7 @@ void *ccnl_riot_relay_helper_start(void *);
kernel_pid_t riot_start_helper_thread(void)
{
return thread_create(relay_helper_stack, sizeof(relay_helper_stack),
PRIORITY_MAIN - 2, CREATE_STACKTEST,
THREAD_PRIORITY_MAIN - 2, CREATE_STACKTEST,
ccnl_riot_relay_helper_start, NULL, "relay-helper");
}

2
sys/net/include/rpl.h

@ -42,7 +42,7 @@ extern "C" {
#define CC1100_RADIO_MODE CC1100_MODE_WOR
#define RPL_PKT_RECV_BUF_SIZE 16
#define RPL_PROCESS_STACKSIZE KERNEL_CONF_STACKSIZE_MAIN
#define RPL_PROCESS_STACKSIZE THREAD_STACKSIZE_MAIN
/* global variables */
extern kernel_pid_t rpl_process_pid;

4
sys/net/link_layer/ping/ping.c

@ -34,7 +34,7 @@
/*--------------------------------------------------------------------------------------*/
/* interal defines */
#define RCV_BUFFER_SIZE (64)
#define RADIO_STACK_SIZE (KERNEL_CONF_STACKSIZE_DEFAULT)
#define RADIO_STACK_SIZE (THREAD_STACKSIZE_DEFAULT)
#define MAX_PROB_STATS (64)
/* internal prototypes */
@ -71,7 +71,7 @@ void l2_ping_init(void)
mutex_init(&ping_sender_mutex);
kernel_pid_t l2_pkt_handler_pid = thread_create(l2_pkt_handler_stack_buffer,
RADIO_STACK_SIZE,
PRIORITY_MAIN - 2,
THREAD_PRIORITY_MAIN - 2,
CREATE_STACKTEST,
l2_pkt_handler, NULL,
"l2_pkt_handler");

6
sys/net/network_layer/sixlowpan/border/border.c

@ -41,7 +41,7 @@
#define ENABLE_DEBUG (0)
#include "debug.h"
#define READER_STACK_SIZE (KERNEL_CONF_STACKSIZE_DEFAULT)
#define READER_STACK_SIZE (THREAD_STACKSIZE_DEFAULT)
char serial_reader_stack[READER_STACK_SIZE];
kernel_pid_t serial_reader_pid = KERNEL_PID_UNDEF;
@ -130,10 +130,10 @@ int sixlowpan_lowpan_border_init(int if_id)
serial_reader_pid = thread_create(
serial_reader_stack, READER_STACK_SIZE,
PRIORITY_MAIN - 1, CREATE_STACKTEST,
THREAD_PRIORITY_MAIN - 1, CREATE_STACKTEST,
serial_reader_f, "serial_reader");
ip_process_pid = thread_create(ip_process_buf, IP_PROCESS_STACKSIZE,
PRIORITY_MAIN - 1, CREATE_STACKTEST,
THREAD_PRIORITY_MAIN - 1, CREATE_STACKTEST,
border_process_lowpan,
"border_process_lowpan");

2
sys/net/network_layer/sixlowpan/border/flowcontrol.c

@ -59,7 +59,7 @@ ipv6_addr_t init_threeway_handshake(void)
synack->type = BORDER_PACKET_CONF_TYPE;
synack->conftype = BORDER_CONF_SYNACK;
sending_slot_pid = thread_create(sending_slot_stack, SENDING_SLOT_STACK_SIZE, PRIORITY_MAIN - 1, CREATE_SLEEPING, sending_slot, "sending slot");
sending_slot_pid = thread_create(sending_slot_stack, SENDING_SLOT_STACK_SIZE, THREAD_PRIORITY_MAIN - 1, CREATE_SLEEPING, sending_slot, "sending slot");
flowcontrol_send_over_uart((border_packet_t *)synack, sizeof(border_conf_header_t));
synack_seqnum = synack->seq_num;

2
sys/net/network_layer/sixlowpan/border/flowcontrol.h

@ -43,7 +43,7 @@ extern "C" {
#define BORDER_RWS (1)
#define BORDER_SL_TIMEOUT (500) // microseconds, maybe smaller
#define SENDING_SLOT_STACK_SIZE (MINIMUM_STACK_SIZE + 256)
#define SENDING_SLOT_STACK_SIZE (THREAD_STACKSIZE_MINIMUM + 256)