896b8d3c50
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>
37 lines
738 B
C
37 lines
738 B
C
/*
|
|
* 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_ */
|