Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/libc/minimal/include/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <stdint.h>
#include <sys/_types.h>
#include <bits/restrict.h>
#include <sys/_timespec.h>

/* Minimal time.h to fulfill the requirements of certain libraries
* like mbedTLS and to support time APIs.
Expand Down Expand Up @@ -42,8 +43,6 @@ typedef _TIME_T_ time_t;
typedef _SUSECONDS_T_ suseconds_t;
#endif

#include <sys/_timespec.h>

/*
* Conversion between civil time and UNIX time. The companion
* localtime() and inverse mktime() are not provided here since they
Expand Down
3 changes: 2 additions & 1 deletion samples/subsys/logging/logger/src/sample_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
#ifndef SAMPLE_MODULE_H
#define SAMPLE_MODULE_H

#include <logging/log.h>

#ifdef __cplusplus
extern "C" {
#endif
#include <logging/log.h>

#define MODULE_NAME sample_module

Expand Down
8 changes: 4 additions & 4 deletions subsys/debug/tracing/include/tracing_ctf.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
#ifndef _TRACE_CTF_H
#define _TRACE_CTF_H

#ifdef __cplusplus
extern "C" {
#endif

#include <kernel.h>
#include <kernel_structs.h>
#include <init.h>

#ifdef __cplusplus
extern "C" {
#endif

void sys_trace_thread_switched_out(void);
void sys_trace_thread_switched_in(void);
void sys_trace_thread_priority_set(struct k_thread *thread);
Expand Down
15 changes: 10 additions & 5 deletions subsys/testsuite/ztest/include/ztest.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
#ifndef __ZTEST_H__
#define __ZTEST_H__

#ifdef __cplusplus
extern "C" {
#endif

/**
* @defgroup ztest Zephyr testing suite
*/
Expand All @@ -44,21 +40,30 @@ extern "C" {
/* FIXME: Properly integrate with Zephyr's arch specific code */
#define CONFIG_X86 1
#define CONFIG_PRINTK 1
#ifdef __cplusplus
extern "C" {
#endif
struct esf;
typedef struct esf z_arch_esf_t;
#ifdef __cplusplus
}
#endif
#endif /* KERNEL */

#include <sys/printk.h>
#define PRINT printk

#include <zephyr.h>


#include <ztest_assert.h>
#include <ztest_mock.h>
#include <ztest_test.h>
#include <tc_util.h>

#ifdef __cplusplus
extern "C" {
#endif

void test_main(void);

#ifdef __cplusplus
Expand Down
8 changes: 8 additions & 0 deletions subsys/testsuite/ztest/include/ztest_assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
#include <stdio.h>
#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

void ztest_test_fail(void);
#if CONFIG_ZTEST_ASSERT_VERBOSE == 0

Expand Down Expand Up @@ -214,4 +218,8 @@ static inline void z_zassert(int cond,
* @}
*/

#ifdef __cplusplus
}
#endif

#endif /* __ZTEST_ASSERT_H__ */
8 changes: 8 additions & 0 deletions subsys/testsuite/ztest/include/ztest_mock.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@

#include <zephyr/types.h>

#ifdef __cplusplus
extern "C" {
#endif

void z_init_mock(void);
int z_cleanup_mock(void);

Expand All @@ -101,6 +105,10 @@ void z_ztest_check_expected_value(const char *fn, const char *param,
void z_ztest_returns_value(const char *fn, uintptr_t value);
uintptr_t z_ztest_get_return_value(const char *fn);

#ifdef __cplusplus
}
#endif

#else /* !CONFIG_ZTEST_MOCKING */

#define z_init_mock()
Expand Down
8 changes: 8 additions & 0 deletions subsys/testsuite/ztest/include/ztest_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

#include <app_memory/app_memdomain.h>

#ifdef __cplusplus
extern "C" {
#endif

struct unit_test {
const char *name;
void (*test)(void);
Expand Down Expand Up @@ -171,4 +175,8 @@ extern struct k_mem_domain ztest_mem_domain;
* @}
*/

#ifdef __cplusplus
}
#endif

#endif /* __ZTEST_ASSERT_H__ */