Kaydet (Commit) 617c8075 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Use cacheflush() on Android

üst 6022e3ca
......@@ -46,6 +46,9 @@
#include <dlfcn.h>
#ifdef ANDROID
#include <unistd.h>
#endif
using namespace ::osl;
using namespace ::rtl;
......@@ -551,10 +554,14 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
void bridges::cpp_uno::shared::VtableFactory::flushCode(
unsigned char const *beg, unsigned char const *end)
{
#ifndef ANDROID
static void (*clear_cache)(unsigned char const*, unsigned char const*)
= (void (*)(unsigned char const*, unsigned char const*))
dlsym(RTLD_DEFAULT, "__clear_cache");
(*clear_cache)(beg, end);
#else
cacheflush((long) beg, (long) end, 0);
#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment