]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/uclibc/lib/contrib/uclibc/ldso/ldso/c6x/dl-syscalls.h
update
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / ldso / ldso / c6x / dl-syscalls.h
1 /* Copyright (C) 2010 Texas Instruments Incorporated
2  * Contributed by Mark Salter <msalter@redhat.com>
3  *
4  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
5  */
6
7 /* We can't use the real errno in ldso, since it has not yet
8  * been dynamicly linked in yet. */
9 #include "sys/syscall.h"
10 extern int _dl_errno;
11 #undef __set_errno
12 #define __set_errno(X) {(_dl_errno) = (X);}
13 #include <sys/mman.h>
14
15 #ifdef __NR_pread64
16 #define __NR___syscall_pread __NR_pread64
17 static __always_inline _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
18                         size_t, count, off_t, offset_hi, off_t, offset_lo);
19
20 static __always_inline ssize_t
21 _dl_pread(int fd, void *buf, size_t count, off_t offset)
22 {
23   return(__syscall_pread(fd,buf,count, offset, offset >> 31));
24 }
25 #endif