lib: migrate includes to <zephyr/...>

In order to bring consistency in-tree, migrate all lib code to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to zephyrproject-rtos#45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2022-05-06 11:23:05 +02:00 committed by Carles Cufí
parent 741e838a62
commit cbd31d720b
79 changed files with 199 additions and 199 deletions

View file

@ -6,10 +6,10 @@
*/
#include <stdio.h>
#include <sys/libc-hooks.h>
#include <syscall_handler.h>
#include <zephyr/sys/libc-hooks.h>
#include <zephyr/syscall_handler.h>
#include <string.h>
#include <sys/errno_private.h>
#include <zephyr/sys/errno_private.h>
#include <unistd.h>
#include <errno.h>

View file

@ -6,11 +6,11 @@
#ifdef CONFIG_MULTITHREADING
#include <init.h>
#include <kernel.h>
#include <sys/__assert.h>
#include <sys/mutex.h>
#include <logging/log.h>
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/sys/mutex.h>
#include <zephyr/logging/log.h>
#include <../lib/src/c/inc/internal/thread.h>
#ifndef CONFIG_USERSPACE

View file

@ -39,7 +39,7 @@
* @{
*/
#include <sys/errno_private.h>
#include <zephyr/sys/errno_private.h>
#ifdef __cplusplus
extern "C" {

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <zephyr/kernel.h>
#include <stdio.h>
static int _stdout_hook_default(int c)

View file

@ -17,7 +17,7 @@
* CONFIG_MULTITHREADING=n to ensure proper linking.
*/
#include <kernel.h>
#include <zephyr/kernel.h>
int __weak z_impl_k_mutex_init(struct k_mutex *mutex)
{

View file

@ -8,7 +8,7 @@
#ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_ASSERT_H_
#define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_ASSERT_H_
#include <sys/__assert.h>
#include <zephyr/sys/__assert.h>
#ifdef __cplusplus
extern "C" {

View file

@ -29,7 +29,7 @@
* @{
*/
#include <sys/errno_private.h>
#include <zephyr/sys/errno_private.h>
#ifdef __cplusplus
extern "C" {

View file

@ -9,7 +9,7 @@
#ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_STDIO_H_
#define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_STDIO_H_
#include <toolchain.h>
#include <zephyr/toolchain.h>
#include <stdarg.h> /* Needed to get definition of va_list */
#include <stddef.h>

View file

@ -10,7 +10,7 @@
#define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_STRING_H_
#include <stddef.h>
#include <toolchain.h>
#include <zephyr/toolchain.h>
#ifdef __cplusplus
extern "C" {

View file

@ -9,7 +9,7 @@
#define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_TIME_H_
#include <stdint.h>
#include <toolchain.h>
#include <zephyr/toolchain.h>
#include <sys/_types.h>
#include <sys/_timespec.h>

View file

@ -5,7 +5,7 @@
*/
#include <stdlib.h>
#include <zephyr.h>
#include <zephyr/zephyr.h>
void abort(void)
{

View file

@ -5,7 +5,7 @@
*/
#include <stdlib.h>
#include <zephyr.h>
#include <zephyr/zephyr.h>
void _exit(int status)
{

View file

@ -5,18 +5,18 @@
*/
#include <stdlib.h>
#include <zephyr.h>
#include <init.h>
#include <zephyr/zephyr.h>
#include <zephyr/init.h>
#include <errno.h>
#include <sys/math_extras.h>
#include <zephyr/sys/math_extras.h>
#include <string.h>
#include <app_memory/app_memdomain.h>
#include <sys/mutex.h>
#include <sys/sys_heap.h>
#include <zephyr/app_memory/app_memdomain.h>
#include <zephyr/sys/mutex.h>
#include <zephyr/sys/sys_heap.h>
#include <zephyr/types.h>
#define LOG_LEVEL CONFIG_KERNEL_LOG_LEVEL
#include <logging/log.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
#ifdef CONFIG_MINIMAL_LIBC_MALLOC

View file

@ -8,7 +8,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/util.h>
#include <zephyr/sys/util.h>
/*
* Normally parent is defined parent(k) = floor((k-1) / 2) but we can avoid a

View file

@ -5,8 +5,8 @@
*/
#include <stdlib.h>
#include <sys/libc-hooks.h>
#include <app_memory/app_memdomain.h>
#include <zephyr/sys/libc-hooks.h>
#include <zephyr/app_memory/app_memdomain.h>
#define LIBC_DATA K_APP_DMEM(z_libc_partition)

View file

@ -8,7 +8,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <sys/cbprintf.h>
#include <zephyr/sys/cbprintf.h>
#define DESC(d) ((void *)d)

View file

@ -8,7 +8,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <sys/cbprintf.h>
#include <zephyr/sys/cbprintf.h>
struct emitter {
char *ptr;

View file

@ -7,8 +7,8 @@
*/
#include <stdio.h>
#include <sys/libc-hooks.h>
#include <syscall_handler.h>
#include <zephyr/sys/libc-hooks.h>
#include <zephyr/syscall_handler.h>
#include <string.h>
static int _stdout_hook_default(int c)

View file

@ -7,7 +7,7 @@
#include <time.h>
/* clock_gettime() prototype */
#include <posix/time.h>
#include <zephyr/posix/time.h>
time_t time(time_t *tloc)
{

View file

@ -4,23 +4,23 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <arch/cpu.h>
#include <zephyr/arch/cpu.h>
#include <errno.h>
#include <stdio.h>
#include <malloc.h>
#include <sys/__assert.h>
#include <zephyr/sys/__assert.h>
#include <sys/stat.h>
#include <linker/linker-defs.h>
#include <sys/util.h>
#include <sys/errno_private.h>
#include <sys/heap_listener.h>
#include <sys/libc-hooks.h>
#include <syscall_handler.h>
#include <app_memory/app_memdomain.h>
#include <init.h>
#include <sys/sem.h>
#include <sys/mutex.h>
#include <sys/mem_manage.h>
#include <zephyr/linker/linker-defs.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/errno_private.h>
#include <zephyr/sys/heap_listener.h>
#include <zephyr/sys/libc-hooks.h>
#include <zephyr/syscall_handler.h>
#include <zephyr/app_memory/app_memdomain.h>
#include <zephyr/init.h>
#include <zephyr/sys/sem.h>
#include <zephyr/sys/mutex.h>
#include <zephyr/sys/mem_manage.h>
#include <sys/time.h>
#define LIBC_BSS K_APP_BMEM(z_libc_partition)

View file

@ -26,7 +26,7 @@
* https://github.com/OpenAMP/open-amp/wiki/OpenAMP-Life-Cycle-Management
*/
#include <zephyr.h>
#include <zephyr/zephyr.h>
#include <resource_table.h>
extern char ram_console[];

View file

@ -4,9 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/__assert.h>
#include <sys/printk.h>
#include <zephyr.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/sys/printk.h>
#include <zephyr/zephyr.h>
/**

View file

@ -24,7 +24,7 @@
#include <stdint.h>
#include <errno.h>
#include <sys/base64.h>
#include <zephyr/sys/base64.h>
static const uint8_t base64_enc_map[64] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',

View file

@ -8,9 +8,9 @@
#include <stddef.h>
#include <stdbool.h>
#include <stdio.h>
#include <sys/bitarray.h>
#include <sys/check.h>
#include <sys/sys_io.h>
#include <zephyr/sys/bitarray.h>
#include <zephyr/sys/check.h>
#include <zephyr/sys/sys_io.h>
/* Number of bits represented by one bundle */
#define bundle_bitness(ba) (sizeof(ba->bundles[0]) * 8)

View file

@ -6,7 +6,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <sys/cbprintf.h>
#include <zephyr/sys/cbprintf.h>
int cbprintf(cbprintf_cb out, void *ctx, const char *format, ...)
{

View file

@ -14,10 +14,10 @@
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <toolchain.h>
#include <zephyr/toolchain.h>
#include <sys/types.h>
#include <sys/util.h>
#include <sys/cbprintf.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/cbprintf.h>
/* newlib doesn't declare this function unless __POSIX_VISIBLE >= 200809. No
* idea how to make that happen, so lets put it right here.

View file

@ -9,9 +9,9 @@
#include <stdarg.h>
#include <stdint.h>
#include <string.h>
#include <sys/cbprintf.h>
#include <zephyr/sys/cbprintf.h>
#include <sys/types.h>
#include <sys/util.h>
#include <zephyr/sys/util.h>
#ifdef CONFIG_CBPRINTF_FULL_INTEGRAL
typedef intmax_t int_value_type;

View file

@ -8,11 +8,11 @@
#include <stdarg.h>
#include <stdint.h>
#include <string.h>
#include <linker/utils.h>
#include <sys/cbprintf.h>
#include <zephyr/linker/utils.h>
#include <zephyr/sys/cbprintf.h>
#include <sys/types.h>
#include <sys/util.h>
#include <sys/__assert.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/__assert.h>
/**

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/crc.h>
#include <zephyr/sys/crc.h>
uint16_t crc16(uint16_t poly, uint16_t seed, const uint8_t *src, size_t len)
{

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/crc.h>
#include <zephyr/sys/crc.h>
uint32_t crc32_ieee(const uint8_t *data, size_t len)
{

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/crc.h>
#include <zephyr/sys/crc.h>
/* crc table generated from polynomial 0x1EDC6F41UL (Castagnoli) */
static const uint32_t crc32c_table[16] = {

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/crc.h>
#include <zephyr/sys/crc.h>
uint8_t crc7_be(uint8_t seed, const uint8_t *src, size_t len)
{

View file

@ -6,7 +6,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/crc.h>
#include <zephyr/sys/crc.h>
static const uint8_t crc8_ccitt_small_table[16] = {
0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15,

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/util.h>
#include <zephyr/sys/util.h>
uint8_t u8_to_dec(char *buf, uint8_t buflen, uint8_t value)
{

View file

@ -15,11 +15,11 @@
#include <errno.h>
#include <fcntl.h>
#include <kernel.h>
#include <sys/fdtable.h>
#include <sys/speculation.h>
#include <syscall_handler.h>
#include <sys/atomic.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/fdtable.h>
#include <zephyr/sys/speculation.h>
#include <zephyr/syscall_handler.h>
#include <zephyr/sys/atomic.h>
struct fd_entry {
void *obj;

View file

@ -3,9 +3,9 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/sys_heap.h>
#include <sys/util.h>
#include <kernel.h>
#include <zephyr/sys/sys_heap.h>
#include <zephyr/sys/util.h>
#include <zephyr/kernel.h>
#include "heap.h"
/* White-box sys_heap validation code. Uses internal data structures.

View file

@ -3,10 +3,10 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/sys_heap.h>
#include <sys/util.h>
#include <sys/heap_listener.h>
#include <kernel.h>
#include <zephyr/sys/sys_heap.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/heap_listener.h>
#include <zephyr/kernel.h>
#include <string.h>
#include "heap.h"

View file

@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <spinlock.h>
#include <sys/heap_listener.h>
#include <zephyr/spinlock.h>
#include <zephyr/sys/heap_listener.h>
static struct k_spinlock heap_listener_lock;
static sys_slist_t heap_listener_list = SYS_SLIST_STATIC_INIT(&heap_listener_list);

View file

@ -7,7 +7,7 @@
#include <stddef.h>
#include <zephyr/types.h>
#include <errno.h>
#include <sys/util.h>
#include <zephyr/sys/util.h>
int char2hex(char c, uint8_t *x)
{

View file

@ -4,18 +4,18 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/__assert.h>
#include <zephyr/sys/__assert.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <sys/printk.h>
#include <sys/util.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <zephyr/types.h>
#include <data/json.h>
#include <zephyr/data/json.h>
struct token {
enum json_tokens type;

View file

@ -4,12 +4,12 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <sys/__assert.h>
#include <sys/check.h>
#include <sys/heap_listener.h>
#include <sys/mem_blocks.h>
#include <sys/util.h>
#include <zephyr/zephyr.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/sys/check.h>
#include <zephyr/sys/heap_listener.h>
#include <zephyr/sys/mem_blocks.h>
#include <zephyr/sys/util.h>
static void *alloc_blocks(sys_mem_blocks_t *mem_block, size_t num_blocks)
{

View file

@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/mpsc_pbuf.h>
#include <zephyr/sys/mpsc_pbuf.h>
#define MPSC_PBUF_DEBUG 0

View file

@ -1,10 +1,10 @@
/* Copyright (c) 2021 Intel Corporation
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/__assert.h>
#include <sys/util.h>
#include <sys/sys_heap.h>
#include <sys/multi_heap.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/sys_heap.h>
#include <zephyr/sys/multi_heap.h>
void sys_multi_heap_init(struct sys_multi_heap *heap, sys_multi_heap_fn_t choice_fn)
{

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <sys/mutex.h>
#include <syscall_handler.h>
#include <kernel_structs.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/mutex.h>
#include <zephyr/syscall_handler.h>
#include <zephyr/kernel_structs.h>
static struct k_mutex *get_k_mutex(struct sys_mutex *mutex)
{

View file

@ -5,8 +5,8 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <sys/notify.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/notify.h>
int sys_notify_validate(struct sys_notify *notify)
{

View file

@ -5,8 +5,8 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <sys/onoff.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/onoff.h>
#include <stdio.h>
#define SERVICE_REFS_MAX UINT16_MAX

View file

@ -3,12 +3,12 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <logging/log.h>
#include <sys/p4wq.h>
#include <wait_q.h>
#include <kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/p4wq.h>
#include <zephyr/wait_q.h>
#include <zephyr/kernel.h>
#include <ksched.h>
#include <init.h>
#include <zephyr/init.h>
LOG_MODULE_REGISTER(p4wq);

View file

@ -12,14 +12,14 @@
* init time. If no routine is installed, a nop routine is called.
*/
#include <kernel.h>
#include <sys/printk.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <stdarg.h>
#include <toolchain.h>
#include <linker/sections.h>
#include <syscall_handler.h>
#include <logging/log.h>
#include <sys/cbprintf.h>
#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
#include <zephyr/syscall_handler.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/cbprintf.h>
#include <sys/types.h>
/* Option present only when CONFIG_USERSPACE enabled. */

View file

@ -12,8 +12,8 @@
#define CHECK(n) /**/
/* #define CHECK(n) __ASSERT_NO_MSG(n) */
#include <kernel.h>
#include <sys/rb.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/rb.h>
#include <stdbool.h>
enum rb_color { RED = 0U, BLACK = 1U };

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <drivers/timer/system_timer.h>
#include <sys/reboot.h>
#include <kernel.h>
#include <sys/printk.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/sys/reboot.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
extern void sys_arch_reboot(int type);

View file

@ -6,7 +6,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/ring_buffer.h>
#include <zephyr/sys/ring_buffer.h>
#include <string.h>
uint32_t ring_buf_put_claim(struct ring_buf *buf, uint8_t **data, uint32_t size)

View file

@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/sem.h>
#include <syscall_handler.h>
#include <zephyr/sys/sem.h>
#include <zephyr/syscall_handler.h>
#ifdef CONFIG_USERSPACE
#define SYS_SEM_MINIMUM 0

View file

@ -4,12 +4,12 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <device.h>
#include <sys/sys_heap.h>
#include <sys/multi_heap.h>
#include <zephyr/zephyr.h>
#include <zephyr/device.h>
#include <zephyr/sys/sys_heap.h>
#include <zephyr/sys/multi_heap.h>
#include <multi_heap/shared_multi_heap.h>
#include <zephyr/multi_heap/shared_multi_heap.h>
static struct sys_multi_heap shared_multi_heap;
static struct sys_heap heap_pool[MAX_SHARED_MULTI_HEAP_ATTR][MAX_MULTI_HEAPS];

View file

@ -11,7 +11,7 @@
* This file provides the common thread entry function
*/
#include <kernel.h>
#include <zephyr/kernel.h>
#ifdef CONFIG_THREAD_LOCAL_STORAGE
__thread k_tid_t z_tls_current;

View file

@ -13,7 +13,7 @@
#include <zephyr/types.h>
#include <errno.h>
#include <stddef.h>
#include <sys/timeutil.h>
#include <zephyr/sys/timeutil.h>
/** Convert a civil (proleptic Gregorian) date to days relative to
* 1970-01-01.

View file

@ -5,7 +5,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <zephyr/kernel.h>
static void z_work_user_q_main(void *work_q_ptr, void *p2, void *p3)
{

View file

@ -6,7 +6,7 @@
#include <stdint.h>
#include <string.h>
#include <sys/__assert.h>
#include <zephyr/sys/__assert.h>
#define ASCII_CHAR 0x7F
#define SEQUENCE_FIRST_MASK 0xC0

View file

@ -2,8 +2,8 @@
* Copyright (c) 2021 Intel Corporation
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/util.h>
#include <sys/winstream.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/winstream.h>
/* This code may be used (e.g. for trace/logging) in very early
* environments where the standard library isn't available yet.

View file

@ -3,12 +3,12 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <zephyr/kernel.h>
#include <errno.h>
#include <posix/time.h>
#include <posix/sys/time.h>
#include <syscall_handler.h>
#include <spinlock.h>
#include <zephyr/posix/time.h>
#include <zephyr/posix/sys/time.h>
#include <zephyr/syscall_handler.h>
#include <zephyr/spinlock.h>
/*
* `k_uptime_get` returns a timestamp based on an always increasing

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <wait_q.h>
#include <posix/sys/eventfd.h>
#include <net/socket.h>
#include <zephyr/zephyr.h>
#include <zephyr/wait_q.h>
#include <zephyr/posix/sys/eventfd.h>
#include <zephyr/net/socket.h>
#include <ksched.h>
struct eventfd {

View file

@ -5,15 +5,15 @@
*/
#include <errno.h>
#include <kernel.h>
#include <zephyr/kernel.h>
#include <limits.h>
#include <posix/unistd.h>
#include <posix/dirent.h>
#include <zephyr/posix/unistd.h>
#include <zephyr/posix/dirent.h>
#include <string.h>
#include <sys/fdtable.h>
#include <zephyr/sys/fdtable.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <fs/fs.h>
#include <zephyr/fs/fs.h>
BUILD_ASSERT(PATH_MAX >= MAX_FILE_NAME, "PATH_MAX is less than MAX_FILE_NAME");

View file

@ -33,7 +33,7 @@
#include "getopt.h"
#include "getopt_common.h"
#include <logging/log.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(getopt);
#define BADCH ((int)'?')

View file

@ -11,7 +11,7 @@
extern "C" {
#endif
#include <zephyr.h>
#include <zephyr/zephyr.h>
struct getopt_state {
int opterr; /* if error message should be printed */

View file

@ -3,8 +3,8 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <shell/shell.h>
#include <zephyr/zephyr.h>
#include <zephyr/shell/shell.h>
#include "getopt.h"
/* Referring below variables is not thread safe. They reflects getopt state

View file

@ -53,7 +53,7 @@
#include "getopt.h"
#include "getopt_common.h"
#include <logging/log.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(getopt);
#define GNU_COMPATIBLE /* Be more compatible, configure's use us! */

View file

@ -3,12 +3,12 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <zephyr/kernel.h>
#include <errno.h>
#include <string.h>
#include <sys/atomic.h>
#include <posix/time.h>
#include <posix/mqueue.h>
#include <zephyr/sys/atomic.h>
#include <zephyr/posix/time.h>
#include <zephyr/posix/mqueue.h>
typedef struct mqueue_object {
sys_snode_t snode;

View file

@ -5,13 +5,13 @@
*/
#include <stdint.h>
#include <kernel.h>
#include <zephyr/kernel.h>
#include <limits.h>
#include <errno.h>
/* required for struct timespec */
#include <posix/time.h>
#include <sys/util.h>
#include <sys_clock.h>
#include <zephyr/posix/time.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys_clock.h>
/**
* @brief Suspend execution for nanosecond intervals.

View file

@ -4,13 +4,13 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <zephyr/kernel.h>
#include <stdio.h>
#include <sys/atomic.h>
#include <zephyr/sys/atomic.h>
#include <ksched.h>
#include <wait_q.h>
#include <posix/pthread.h>
#include <sys/slist.h>
#include <zephyr/wait_q.h>
#include <zephyr/posix/pthread.h>
#include <zephyr/sys/slist.h>
#define PTHREAD_INIT_FLAGS PTHREAD_CANCEL_ENABLE
#define PTHREAD_CANCELED ((void *) -1)

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <posix/pthread.h>
#include <zephyr/kernel.h>
#include <zephyr/posix/pthread.h>
#include <ksched.h>
#include <wait_q.h>
#include <zephyr/wait_q.h>
extern struct k_spinlock z_pthread_spinlock;

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <zephyr/kernel.h>
#include <ksched.h>
#include <wait_q.h>
#include <posix/time.h>
#include <zephyr/wait_q.h>
#include <zephyr/posix/time.h>
#ifdef CONFIG_POSIX_CLOCK
int64_t timespec_to_timeoutms(const struct timespec *abstime)

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <zephyr/kernel.h>
#include <ksched.h>
#include <wait_q.h>
#include <posix/pthread.h>
#include <zephyr/wait_q.h>
#include <zephyr/posix/pthread.h>
extern struct k_spinlock z_pthread_spinlock;

View file

@ -3,9 +3,9 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <posix/pthread.h>
#include <posix/pthread_key.h>
#include <zephyr/kernel.h>
#include <zephyr/posix/pthread.h>
#include <zephyr/posix/pthread_key.h>
struct k_sem pthread_key_sem;

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <zephyr/kernel.h>
#include <ksched.h>
#include <wait_q.h>
#include <posix/pthread.h>
#include <zephyr/wait_q.h>
#include <zephyr/posix/pthread.h>
struct k_spinlock z_pthread_spinlock;

View file

@ -3,10 +3,10 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <zephyr/kernel.h>
#include <errno.h>
#include <posix/time.h>
#include <posix/posix_types.h>
#include <zephyr/posix/time.h>
#include <zephyr/posix/posix_types.h>
#define INITIALIZED 1
#define NOT_INITIALIZED 0

View file

@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <posix/posix_sched.h>
#include <zephyr/kernel.h>
#include <zephyr/posix/posix_sched.h>
static bool valid_posix_policy(int policy)
{

View file

@ -5,7 +5,7 @@
*/
#include <errno.h>
#include <posix/pthread.h>
#include <zephyr/posix/pthread.h>
/**
* @brief Destroy semaphore.

View file

@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <posix/unistd.h>
#include <zephyr/kernel.h>
#include <zephyr/posix/unistd.h>
/**
* @brief Sleep for a specified number of seconds.

View file

@ -3,11 +3,11 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <zephyr/kernel.h>
#include <errno.h>
#include <string.h>
#include <sys/printk.h>
#include <posix/time.h>
#include <zephyr/sys/printk.h>
#include <zephyr/posix/time.h>
#define ACTIVE 1
#define NOT_ACTIVE 0

View file

@ -6,7 +6,7 @@
#include "smf.h"
#include <logging/log.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(smf);
/*