summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/avr32
diff options
context:
space:
mode:
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-05-28 11:40:29 +0000
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-05-28 11:40:29 +0000
commit8e2424ffece289ff88870141674c9fc58b43f763 (patch)
tree407f7e9a7ad49f6d1271cb6f865614e90e1ec971 /libc/sysdeps/linux/avr32
parentfa4e63add8141b079daa5febd5f1a4060ea631ea (diff)
avr32: splice(), vmsplice() and tee() support
Add the necessary prototypes and definitions for splice(), vmsplice() and tee() to work. Without this, they won't even compile.
Diffstat (limited to 'libc/sysdeps/linux/avr32')
-rw-r--r--libc/sysdeps/linux/avr32/bits/fcntl.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/avr32/bits/fcntl.h b/libc/sysdeps/linux/avr32/bits/fcntl.h
index 1abff17ef..3bf4e1ac8 100644
--- a/libc/sysdeps/linux/avr32/bits/fcntl.h
+++ b/libc/sysdeps/linux/avr32/bits/fcntl.h
@@ -3,6 +3,9 @@
#endif
#include <sys/types.h>
+#ifdef __USE_GNU
+# include <bits/uio.h>
+#endif
/*
* open/fcntl - O_SYNC is only implemented on blocks devices and on files
@@ -163,3 +166,31 @@ struct flock64 {
# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
+
+#ifdef __USE_GNU
+
+/* Flags for splice() and vmsplice() */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to) */
+# define SPLICE_F_MORE 4 /* Expect more data */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift */
+
+__BEGIN_DECLS
+
+/* Splice address range into a pipe */
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+ size_t __count, unsigned int __flags);
+
+/* Splice two files together */
+extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
+ __off64_t *__offout, size_t __len,
+ unsigned int __flags);
+
+/* In-kernel implementation of tee for pipe buffers */
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+ unsigned int __flags);
+
+__END_DECLS
+#endif