cleanup: include/: move misc/errno_private.h to sys/errno_private.h
move misc/errno_private.h to sys/errno_private.h and create a shim for backward-compatibility. No functional changes to the headers. A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES. Related to #16539 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
ee9dd1a54a
commit
896b8d3c50
|
@ -1,36 +1,15 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Intel Corporation.
|
||||
* Copyright (c) 2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_MISC_ERRNO_PRIVATE_H_
|
||||
#define ZEPHYR_INCLUDE_MISC_ERRNO_PRIVATE_H_
|
||||
|
||||
#include <toolchain.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#ifndef CONFIG_COMPAT_INCLUDES
|
||||
#warning "This header file has moved, include <sys/errno_private.h> instead."
|
||||
#endif
|
||||
|
||||
/* NOTE: located here to avoid include dependency loops between errno.h
|
||||
* and kernel.h
|
||||
*/
|
||||
|
||||
/**
|
||||
* return a pointer to a memory location containing errno
|
||||
*
|
||||
* errno is thread-specific, and can't just be a global. This pointer
|
||||
* is guaranteed to be read/writable from user mode.
|
||||
*
|
||||
* @return Memory location of errno data for current thread
|
||||
*/
|
||||
__syscall int *z_errno(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <syscalls/errno_private.h>
|
||||
#include <sys/errno_private.h>
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_MISC_ERRNO_PRIVATE_H_ */
|
||||
|
|
36
include/sys/errno_private.h
Normal file
36
include/sys/errno_private.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Intel Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_SYS_ERRNO_PRIVATE_H_
|
||||
#define ZEPHYR_INCLUDE_SYS_ERRNO_PRIVATE_H_
|
||||
|
||||
#include <toolchain.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* NOTE: located here to avoid include dependency loops between errno.h
|
||||
* and kernel.h
|
||||
*/
|
||||
|
||||
/**
|
||||
* return a pointer to a memory location containing errno
|
||||
*
|
||||
* errno is thread-specific, and can't just be a global. This pointer
|
||||
* is guaranteed to be read/writable from user mode.
|
||||
*
|
||||
* @return Memory location of errno data for current thread
|
||||
*/
|
||||
__syscall int *z_errno(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <syscalls/errno_private.h>
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_SYS_ERRNO_PRIVATE_H_ */
|
|
@ -17,7 +17,7 @@
|
|||
#ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_ERRNO_H_
|
||||
#define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_ERRNO_H_
|
||||
|
||||
#include <misc/errno_private.h>
|
||||
#include <sys/errno_private.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <linker/linker-defs.h>
|
||||
#include <misc/util.h>
|
||||
#include <kernel_internal.h>
|
||||
#include <misc/errno_private.h>
|
||||
#include <sys/errno_private.h>
|
||||
#include <misc/libc-hooks.h>
|
||||
#include <syscall_handler.h>
|
||||
#include <app_memory/app_memdomain.h>
|
||||
|
|
Loading…
Reference in a new issue