]> git.saurik.com Git - apple/libc.git/blobdiff - gen/cache.c
Libc-262.2.12.tar.gz
[apple/libc.git] / gen / cache.c
diff --git a/gen/cache.c b/gen/cache.c
new file mode 100644 (file)
index 0000000..2c8d286
--- /dev/null
@@ -0,0 +1,18 @@
+/* cache control */
+
+#include <stdlib.h>
+#include <stddef.h>
+#include <errno.h>
+#include <sys/types.h>
+
+static const unsigned int kCacheOptionsSyncForExecution = 0x1;
+
+int
+sys_cache_control(unsigned int options, caddr_t start, size_t len)
+{
+     if (options == kCacheOptionsSyncForExecution) {
+         sys_icache_invalidate(start, len);
+         return 0;
+     }
+     return ENOTSUP;
+}