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:
parent
317577d6eb
commit
1a29e591ef
1 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue