Use cacheflush() on Android
This commit is contained in:
@@ -46,6 +46,9 @@
|
|||||||
|
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|
||||||
|
#ifdef ANDROID
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ::osl;
|
using namespace ::osl;
|
||||||
using namespace ::rtl;
|
using namespace ::rtl;
|
||||||
@@ -551,10 +554,14 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
|
|||||||
void bridges::cpp_uno::shared::VtableFactory::flushCode(
|
void bridges::cpp_uno::shared::VtableFactory::flushCode(
|
||||||
unsigned char const *beg, unsigned char const *end)
|
unsigned char const *beg, unsigned char const *end)
|
||||||
{
|
{
|
||||||
|
#ifndef ANDROID
|
||||||
static void (*clear_cache)(unsigned char const*, unsigned char const*)
|
static void (*clear_cache)(unsigned char const*, unsigned char const*)
|
||||||
= (void (*)(unsigned char const*, unsigned char const*))
|
= (void (*)(unsigned char const*, unsigned char const*))
|
||||||
dlsym(RTLD_DEFAULT, "__clear_cache");
|
dlsym(RTLD_DEFAULT, "__clear_cache");
|
||||||
(*clear_cache)(beg, end);
|
(*clear_cache)(beg, end);
|
||||||
|
#else
|
||||||
|
cacheflush((long) beg, (long) end, 0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
Reference in New Issue
Block a user