0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd:🆑 Isolate pthread enable hooking during init/finit.

This commit is contained in:
Jason Volk 2022-03-21 14:51:51 -07:00
parent 317577d6eb
commit 1a29e591ef

View file

@ -226,8 +226,6 @@ ircd::cl::init::init()
return;
}
const ctx::posix::enable_pthread enable_pthread;
// Link the libraries.
if(!init_libs())
return;
@ -261,7 +259,6 @@ noexcept
log, "Shutting down OpenCL...",
};
const ctx::posix::enable_pthread enable_pthread;
fini_ctxs();
fini_libs();
}
@ -269,6 +266,8 @@ noexcept
bool
ircd::cl::init::init_libs()
{
const ctx::posix::enable_pthread enable_pthread;
const std::string &path
{
cl::path
@ -302,6 +301,8 @@ ircd::cl::init::init_libs()
void
ircd::cl::init::fini_libs()
{
const ctx::posix::enable_pthread enable_pthread;
if(likely(linkage))
dlclose(linkage);
}