kernel: errno: Use per-thread accessor function compatible with Newlib
Newlib names this function __errno(), so if we want Zephyr to work with Newlib seamlessly, it's better to just follow Newlib's naming convention for Zephyr's own minimal libc. Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
parent
b1dd5ea50d
commit
8cc6f6ddd6
2 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@
|
||||||
const int _k_neg_eagain = -EAGAIN;
|
const int _k_neg_eagain = -EAGAIN;
|
||||||
|
|
||||||
#ifdef CONFIG_ERRNO
|
#ifdef CONFIG_ERRNO
|
||||||
int *_get_errno(void)
|
int *__errno(void)
|
||||||
{
|
{
|
||||||
return &_current->errno_var;
|
return &_current->errno_var;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,8 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
extern int *_get_errno(void);
|
extern int *__errno(void);
|
||||||
#define errno (*_get_errno())
|
#define errno (*__errno())
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* POSIX Error codes
|
* POSIX Error codes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue