Browse Source

core: moved `#include`s outside the `extern "C"` guards

dev/timer
BytesGalore 8 years ago
parent
commit
74161f0f2d
  1. 4
      core/include/arch/thread_arch.h
  2. 4
      core/include/atomic.h
  3. 7
      core/include/byteorder.h
  4. 4
      core/include/clist.h
  5. 4
      core/include/config.h
  6. 4
      core/include/crash.h
  7. 6
      core/include/debug.h
  8. 8
      core/include/hwtimer.h
  9. 6
      core/include/irq.h
  10. 8
      core/include/kernel.h
  11. 4
      core/include/kernel_internal.h
  12. 8
      core/include/kernel_macros.h
  13. 9
      core/include/kernel_types.h
  14. 4
      core/include/lpm.h
  15. 8
      core/include/msg.h
  16. 4
      core/include/mutex.h
  17. 6
      core/include/priority_queue.h
  18. 8
      core/include/sched.h
  19. 8
      core/include/tcb.h
  20. 8
      core/include/thread.h

4
core/include/arch/thread_arch.h

@ -19,12 +19,12 @@
#ifndef __THREAD_ARCH_H
#define __THREAD_ARCH_H
#include "attributes.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "attributes.h"
/**
* @name Define the mapping between the architecture independent interfaces
* and the kernel internal interfaces

4
core/include/atomic.h

@ -19,12 +19,12 @@
#ifndef _ATOMIC_H
#define _ATOMIC_H
#include "arch/atomic_arch.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "arch/atomic_arch.h"
/**
* @brief Sets a new and returns the old value of a variable atomically
*

7
core/include/byteorder.h

@ -21,6 +21,9 @@
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ******************************* INTERFACE ******************************* */
@ -310,5 +313,9 @@ uint64_t byteorder_ntohll(network_uint64_t v)
return _byteorder_swap(v.u64, ll);
}
#ifdef __cplusplus
}
#endif
#endif /* BYTEORDER_H_ */
/** @} */

4
core/include/clist.h

@ -19,12 +19,12 @@
#ifndef __CLIST_H
#define __CLIST_H
#include "kernel_macros.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "kernel_macros.h"
/**
* @def clist_get_container(NODE, TYPE, MEMBER)
* @brief Returns the container of the circular list

4
core/include/config.h

@ -19,12 +19,12 @@
#ifndef CONFIG_H
#define CONFIG_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#define CONFIG_KEY (0x1701) /**< key to identify configuration */
#define CONFIG_NAME_LEN (10) /**< length of name for configuration in bytes */

4
core/include/crash.h

@ -22,12 +22,12 @@
#ifndef __CRASH_H
#define __CRASH_H
#include "kernel.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "kernel.h"
/**
* @brief Handle an unrecoverable error by halting or rebooting the system
*

6
core/include/debug.h

@ -21,13 +21,13 @@
#ifndef __DEBUG_H
#define __DEBUG_H
#include <stdio.h>
#include "sched.h"
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include "sched.h"
/**
* @name Print debug information if the calling thread stack is large enough
*

8
core/include/hwtimer.h

@ -33,14 +33,14 @@
#ifndef __HWTIMER_H
#define __HWTIMER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include "hwtimer_cpu.h"
#include "board.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Number of kernel timer ticks per second
* @def HWTIMER_SPEED

6
core/include/irq.h

@ -21,13 +21,13 @@
#ifndef IRQ_H_
#define IRQ_H_
#include <stdbool.h>
#include "arch/irq_arch.h"
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include "arch/irq_arch.h"
/**
* @brief This function sets the IRQ disable bit in the status register
*

8
core/include/kernel.h

@ -22,10 +22,6 @@
#ifndef KERNEL_H_
#define KERNEL_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <stdint.h>
@ -37,6 +33,10 @@
#include "sched.h"
#include "cpu-conf.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @def KERNEL_CONF_STACKSIZE_DEFAULT
* @brief A reasonable default stack size that will suffice most smaller tasks

4
core/include/kernel_internal.h

@ -19,12 +19,12 @@
#ifndef KERNEL_INTERNAL_H_
#define KERNEL_INTERNAL_H_
#include "attributes.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "attributes.h"
/**
* @brief Initializes scheduler and creates main and idle task
*/

8
core/include/kernel_macros.h

@ -18,6 +18,10 @@
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @def container_of(PTR, TYPE, MEMBER)
* @brief Returns the container of a pointer to a member.
@ -50,6 +54,10 @@
((TYPE *) ((char *) (PTR) - offsetof(TYPE, MEMBER)))
#endif
#ifdef __cplusplus
}
#endif
/**
* @}
*/

9
core/include/kernel_types.h

@ -6,7 +6,6 @@
* directory for more details.
*/
/**
* @addtogroup core_util
* @{
@ -22,10 +21,6 @@
#ifndef KERNEL_TYPES_H
#define KERNEL_TYPES_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <inttypes.h>
#include <limits.h>
@ -47,6 +42,10 @@
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
* @def MAXTHREADS
* @brief The maximum number of threads to be scheduled

4
core/include/lpm.h

@ -23,12 +23,12 @@
#ifndef LPM_H_
#define LPM_H_
#include "arch/lpm_arch.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "arch/lpm_arch.h"
/**
* @brief Initialization of power management (including clock setup)
*

8
core/include/msg.h

@ -32,14 +32,14 @@
#ifndef __MSG_H_
#define __MSG_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <stdbool.h>
#include "kernel_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Describes a message object which can be sent between threads.
*

4
core/include/mutex.h

@ -21,12 +21,12 @@
#ifndef __MUTEX_H_
#define __MUTEX_H_
#include "priority_queue.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "priority_queue.h"
/**
* @brief Mutex structure. Must never be modified by the user.
*/

6
core/include/priority_queue.h

@ -19,13 +19,13 @@
#ifndef __QUEUE_H
#define __QUEUE_H
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <stdint.h>
/**
* data type for priority queue nodes
*/

8
core/include/sched.h

@ -80,16 +80,16 @@
#ifndef _SCHEDULER_H
#define _SCHEDULER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include "bitarithm.h"
#include "tcb.h"
#include "attributes.h"
#include "kernel_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @def SCHED_PRIO_LEVELS
* @brief The number of thread priority levels

8
core/include/tcb.h

@ -20,16 +20,16 @@
#ifndef TCB_H_
#define TCB_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include "priority_queue.h"
#include "clist.h"
#include "cib.h"
#include "msg.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Thread status list
* @{

8
core/include/thread.h

@ -21,14 +21,14 @@
#ifndef __THREAD_H
#define __THREAD_H
#ifdef __cplusplus
extern "C" {
#endif
#include "kernel.h"
#include "tcb.h"
#include "arch/thread_arch.h"
#ifdef __cplusplus
extern "C" {
#endif
#define STATUS_NOT_FOUND (-1)
/**

Loading…
Cancel
Save