diff options
author | Stafford Horne <shorne@gmail.com> | 2021-10-20 06:51:52 +0900 |
---|---|---|
committer | Stafford Horne <shorne@gmail.com> | 2022-01-05 06:40:06 +0900 |
commit | 1871c95f2bf06e33e8e2bc8387dca6ed46cc829a (patch) | |
tree | 5a6ad6b0a2d50ccf4be90624a9d96b85c67a8a10 /sysdeps/unix/sysv/linux/or1k/sysdep.c | |
parent | 9a47b9660bec4ee38d27b06a3904af86f4fbd95d (diff) | |
download | glibc-1871c95f2bf06e33e8e2bc8387dca6ed46cc829a.tar glibc-1871c95f2bf06e33e8e2bc8387dca6ed46cc829a.tar.gz glibc-1871c95f2bf06e33e8e2bc8387dca6ed46cc829a.tar.bz2 glibc-1871c95f2bf06e33e8e2bc8387dca6ed46cc829a.zip |
or1k: Linux Syscall Interface
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/unix/sysv/linux/or1k/sysdep.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/or1k/sysdep.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/or1k/sysdep.c b/sysdeps/unix/sysv/linux/or1k/sysdep.c new file mode 100644 index 0000000000..4e4acaf2ef --- /dev/null +++ b/sysdeps/unix/sysv/linux/or1k/sysdep.c @@ -0,0 +1,34 @@ +/* OpenRISC wrapper for setting errno. + Copyright (C) 2022 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + <https://www.gnu.org/licenses/>. */ + +#include <sysdep.h> +#include <errno.h> + +long int __syscall_error (long int err); +hidden_proto (__syscall_error) + +/* This routine is jumped to by all the syscall handlers, to stash + an error number into errno. */ +long int +__syscall_error (long int err) +{ + __set_errno (- err); + return -1; +} +hidden_def (__syscall_error) |