svn commit: trunk/uClibc/libc/sysdeps/linux/avr32/bits

hskinnemoen at uclibc.org hskinnemoen at uclibc.org
Wed May 28 11:40:30 UTC 2008


Author: hskinnemoen
Date: 2008-05-28 04:40:29 -0700 (Wed, 28 May 2008)
New Revision: 22101

Log:
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.


Modified:
   trunk/uClibc/libc/sysdeps/linux/avr32/bits/fcntl.h


Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/avr32/bits/fcntl.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/avr32/bits/fcntl.h	2008-05-28 11:21:20 UTC (rev 22100)
+++ trunk/uClibc/libc/sysdeps/linux/avr32/bits/fcntl.h	2008-05-28 11:40:29 UTC (rev 22101)
@@ -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 @@
 # 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




More information about the uClibc-cvs mailing list