include/net: additional cleanup for extern "C" use

The previous patch left some include directives hidden within the body
of the extern "C" block.  Lift them out to the top of the file where
they're more visible.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2019-08-12 16:40:47 -05:00 committed by Carles Cufí
commit 754d1274a7
5 changed files with 17 additions and 16 deletions

View file

@ -14,6 +14,11 @@
#define ZEPHYR_INCLUDE_NET_NET_CORE_H_
#include <stdbool.h>
#include <string.h>
#include <logging/log.h>
#include <sys/__assert.h>
#include <kernel.h>
#ifdef __cplusplus
extern "C" {
@ -36,30 +41,22 @@ extern "C" {
/** @cond INTERNAL_HIDDEN */
/* Network subsystem logging helpers */
#include <logging/log.h>
#define NET_DBG(fmt, ...) LOG_DBG("(%p): " fmt, k_current_get(), \
##__VA_ARGS__)
#define NET_ERR(fmt, ...) LOG_ERR(fmt, ##__VA_ARGS__)
#define NET_WARN(fmt, ...) LOG_WRN(fmt, ##__VA_ARGS__)
#define NET_INFO(fmt, ...) LOG_INF(fmt, ##__VA_ARGS__)
#include <sys/__assert.h>
#define NET_ASSERT(cond) __ASSERT_NO_MSG(cond)
#define NET_ASSERT_INFO(cond, fmt, ...) __ASSERT(cond, fmt, ##__VA_ARGS__)
/** @endcond */
#include <kernel.h>
struct net_buf;
struct net_pkt;
struct net_context;
struct net_if;
#include <string.h>
/**
* @brief Net Verdict
*/
@ -187,6 +184,7 @@ struct net_stack_info {
#define NET_STACK_DEFINE_EMBEDDED(name, size) char name[size]
#if defined(CONFIG_INIT_STACKS)
/* Legacy case: retain containing extern "C" with C++ */
#include <debug/stack.h>
static inline void net_analyze_stack_get_values(const char *stack,