0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

ircd::mods: Use forward_list for mod::loading state.

This commit is contained in:
Jason Volk 2018-10-23 10:46:45 -07:00
parent 325c2a34b3
commit 5fa42b5afd
2 changed files with 5 additions and 5 deletions

View file

@ -714,12 +714,12 @@ try
const unwind reset{[this, &theirs]
{
assert(loading.top() == this);
loading.pop();
assert(loading.front() == this);
loading.pop_front();
std::set_terminate(theirs);
}};
loading.push(this);
loading.emplace_front(this);
std::set_terminate(ours);
return boost::dll::shared_library{path, mode};
}()}
@ -766,7 +766,7 @@ try
if(!loading.empty())
{
const auto &m(mod::loading.top());
const auto &m(mod::loading.front());
m->children.emplace_back(this);
log::debug
{

View file

@ -40,7 +40,7 @@ namespace ircd::mods
struct ircd::mods::mod
:std::enable_shared_from_this<mod>
{
static std::stack<mod *> loading; // State of current dlopen() recursion.
static std::forward_list<mod *> loading; // State of current dlopen() recursion.
static std::map<string_view, mod *, std::less<>> loaded;
filesystem::path path;