1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/core/include/kernel.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

99 lines
2.4 KiB
C

/*
* Copyright (C) 2013 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.
*/
/**
* @addtogroup core_internal
* @{
*
* @file kernel.h
* @brief Kernel compile time configuration
*
* A reboot() function is also provided
* (and used by core_panic() when needed).
*
* @author Kaspar Schleiser <kaspar@schleiser.de>
*/
#ifndef KERNEL_H_
#define KERNEL_H_
#include <stdbool.h>
#include <stdint.h>
#include "attributes.h"
#include "config.h"
#include "tcb.h"
#include "cpu.h"
#include "flags.h"
#include "sched.h"
#include "cpu-conf.h"
#ifdef __cplusplus
extern "C" {
#endif
/* ------------------------------------------------------------------------- */
/**
* @def LPM_PREVENT_SLEEP_UART
* @brief This flag tells the kernel that the deepest power saving
* mode that currently can be used must still allow UART
* communication. Bitmask to use with `lpm_prevent_sleep`
* in power management.
*/
#define LPM_PREVENT_SLEEP_UART BIT2
/**
* @def LPM_PREVENT_SLEEP_HWTIMER
* @brief This flag tells the kernel that the deepest power saving
* mode that currently can be used must still allow the hwtimer
* to run. Bitmask to use with `lpm_prevent_sleep` in power management.
*/
#define LPM_PREVENT_SLEEP_HWTIMER BIT1
/**
* @brief This bitfield is used to configure which modules are
* currently active and prevent the kernel to go to the
* deepest power modes. It is used with `LPM_PREVENT_SLEEP_HWTIMER`
* and/or `LPM_PREVENT_SLEEP_UART`.
*/
extern volatile int lpm_prevent_sleep;
/**
* @brief Variable used to store system configuration
*
* @details This contains e.g. the node ID, name, default channel and so on
*/
extern config_t sysconfig;
/* ------------------------------------------------------------------------- */
/**
* @brief Immediately reboots the system.
*
* This function is used by core_panic() when the DEVELHELP macro is not defined.
*
* @param mode The reboot mode (unused for now)
*
* @return This call never returns when successful. -1 is returned otherwise.
*/
int reboot(int mode);
/**
* @def RB_AUTOBOOT
* @brief Reboot the system in the usual fashion
*/
#define RB_AUTOBOOT 0
#ifdef __cplusplus
}
#endif
#endif /* KERNEL_H_ */
/** @} */