URL
https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 3 |
Line 478... |
Line 478... |
}
|
}
|
closedir(dir);
|
closedir(dir);
|
}
|
}
|
|
|
void _unload_plugins(AttributeType *list) {
|
void _unload_plugins(AttributeType *list) {
|
|
const char *plugin_name;
|
for (unsigned i = 0; i < list->size(); i++) {
|
for (unsigned i = 0; i < list->size(); i++) {
|
if (!(*list)[i].is_list()) {
|
if (!(*list)[i].is_list()) {
|
RISCV_error("Can't free plugin[%d] library", i);
|
RISCV_error("Can't free plugin[%d] library", i);
|
continue;
|
continue;
|
}
|
}
|
|
plugin_name = (*list)[i][0u].to_string();
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
HMODULE hlib = reinterpret_cast<HMODULE>((*list)[i][1].to_uint64());
|
HMODULE hlib = reinterpret_cast<HMODULE>((*list)[i][1].to_uint64());
|
FreeLibrary(hlib);
|
FreeLibrary(hlib);
|
#else
|
#else
|
void *hlib = reinterpret_cast<void *>((*list)[i][1].to_uint64());
|
void *hlib = reinterpret_cast<void *>((*list)[i][1].to_uint64());
|
|
if (strstr(plugin_name, "gui_plugin") == 0) {
|
|
/** It's a workaround to avoid SIGSEGV on application exiting.
|
|
* It's a specific of dynamically linked QT-libraries. They
|
|
* create and use global variable freeing on application
|
|
* closing.
|
|
*/
|
dlclose(hlib);
|
dlclose(hlib);
|
|
}
|
#endif
|
#endif
|
}
|
}
|
}
|
}
|
|
|
void put_char(char s, FILE *f) {
|
void put_char(char s, FILE *f) {
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.