diff options
| author | Bernard Xiong <[email protected]> | 2018-09-01 11:00:42 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2018-09-01 11:00:42 +0800 |
| commit | ba5c1bea44025d906b5d402dbeebcc27ea3ebc44 (patch) | |
| tree | 73e41aef278597dd2098e4ad7de9b6eb19d6e4c5 /components/libc/libdl/dlmodule.c | |
| parent | f0ab00621a5b2296e17b31704c804d3fcbfd07fe (diff) | |
[dlmodule] Add cache ops in dlmodule.
Diffstat (limited to 'components/libc/libdl/dlmodule.c')
| -rw-r--r-- | components/libc/libdl/dlmodule.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/libc/libdl/dlmodule.c b/components/libc/libdl/dlmodule.c index 844ad897cf..61ffbfc772 100644 --- a/components/libc/libdl/dlmodule.c +++ b/components/libc/libdl/dlmodule.c @@ -491,6 +491,12 @@ struct rt_dlmodule* dlmodule_load(const char* filename) /* increase module reference count */ module->nref ++; + /* deal with cache */ +#ifdef RT_USING_CACHE + rt_hw_cpu_dcache_ops(RT_HW_CACHE_FLUSH, module->mem_space, module->mem_size); + rt_hw_cpu_icache_ops(RT_HW_CACHE_INVALIDATE, module->mem_space, module->mem_size); +#endif + /* set module initialization and cleanup function */ module->init_func = dlsym(module, "module_init"); module->cleanup_func = dlsym(module, "module_cleanup"); |
