summaryrefslogtreecommitdiff
path: root/src/video_out/libdha/cpu_flush.c
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-01-14 01:56:59 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-01-14 01:56:59 +0000
commit8cbefe95bd4c6e1e715af0f9667c0c2d3d1f9eff (patch)
tree29791509737b2f36e45d1686d73d6272b7a67f59 /src/video_out/libdha/cpu_flush.c
parent74641d0374d17b28fb4636f890bd62e43c9a603c (diff)
downloadxine-lib-8cbefe95bd4c6e1e715af0f9667c0c2d3d1f9eff.tar.gz
xine-lib-8cbefe95bd4c6e1e715af0f9667c0c2d3d1f9eff.tar.bz2
ops, missing files
CVS patchset: 3910 CVS date: 2003/01/14 01:56:59
Diffstat (limited to 'src/video_out/libdha/cpu_flush.c')
-rw-r--r--src/video_out/libdha/cpu_flush.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/video_out/libdha/cpu_flush.c b/src/video_out/libdha/cpu_flush.c
new file mode 100644
index 000000000..9186f89e8
--- /dev/null
+++ b/src/video_out/libdha/cpu_flush.c
@@ -0,0 +1,23 @@
+/* CPU flush support */
+#include <stdio.h>
+#include <sys/ioctl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include "libdha.h"
+#include "kernelhelper/dhahelper.h"
+
+void cpu_flush(void *va,unsigned long length)
+{
+ int retval;
+ int libdha_fd=-1;
+ if( libdha_fd == -1) libdha_fd = open("/dev/dhahelper",O_RDWR);
+ if (libdha_fd > 0)
+ {
+ dhahelper_cpu_flush_t _l2;
+ _l2.va = va;
+ _l2.length = length;
+ retval = ioctl(libdha_fd, DHAHELPER_CPU_FLUSH, &_l2);
+ close(libdha_fd);
+ }
+}