1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/cpu/native/include/cpu-conf.h
Lucas Jenss 426170b064 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
2015-05-21 00:14:23 +02:00

76 lines
2.0 KiB
C

/**
* Native CPU configuration
*
* Copyright (C) 2013 Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
*
* 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 arch
* @{
* @file
* @author Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
* @}
*/
#ifndef CPUCONF_H_
#define CPUCONF_H_
#ifdef __cplusplus
extern "C" {
#endif
/* TODO: tighten stack sizes */
#ifdef __MACH__ /* OSX */
#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 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 THREAD_STACKSIZE_MINIMUM (163840)
#define NATIVE_ISR_STACKSIZE (163840)
#else /* Linux etc. */
#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 THREAD_STACKSIZE_MINIMUM (8192)
/* 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 (16384)
/* native internal */
#define NATIVE_ISR_STACKSIZE (8192)
#endif /* OS */
#ifdef UART0_BUFSIZE
#undef UART0_BUFSIZE
#endif
#define UART0_BUFSIZE (128)
/* for nativenet */
#define NATIVE_ETH_PROTO 0x1234
/**
* @brief length of CPU ID for @ref cpu_id_get() in @ref periph/cpuid.h
*/
#ifndef CPUID_ID_LEN
#define CPUID_ID_LEN (4)
#endif
#ifdef __cplusplus
}
#endif
#endif /* CPUCONF_H_ */