]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/uclibc/lib/contrib/uclibc/libc/sysdeps/linux/m68k/__syscall_error.c
Inital import
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / libc / sysdeps / linux / m68k / __syscall_error.c
1 /* Wrapper for setting errno.
2  *
3  * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
4  *
5  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
6  */
7
8 #include <errno.h>
9 #include <features.h>
10
11 /* This routine is jumped to by all the syscall handlers, to stash
12  * an error number into errno.  */
13 int __syscall_error(void) attribute_hidden;
14 int __syscall_error(void)
15 {
16         register int err_no __asm__("%d0");
17         __set_errno(-err_no);
18         return -1;
19 }