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:
Paul Sokolovsky 2017-05-10 23:57:45 +03:00 committed by Anas Nashif
commit 8cc6f6ddd6
2 changed files with 3 additions and 3 deletions

View file

@ -22,7 +22,7 @@
const int _k_neg_eagain = -EAGAIN;
#ifdef CONFIG_ERRNO
int *_get_errno(void)
int *__errno(void)
{
return &_current->errno_var;
}

View file

@ -22,8 +22,8 @@ extern "C" {
#endif
extern int *_get_errno(void);
#define errno (*_get_errno())
extern int *__errno(void);
#define errno (*__errno())
/*
* POSIX Error codes