mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 13:01:27 +12:00
SPU LLVM: Improve runtime SPU compilation preferences (#15250)
This commit is contained in:
parent
414a354511
commit
75ef154c12
2 changed files with 59 additions and 4 deletions
|
@ -379,8 +379,8 @@ public:
|
|||
return m_head != 0;
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
void push(Args&&... args)
|
||||
template <bool Notify = true, typename... Args>
|
||||
bool push(Args&&... args)
|
||||
{
|
||||
auto oldv = m_head.load();
|
||||
auto item = new lf_queue_item<T>(load(oldv), std::forward<Args>(args)...);
|
||||
|
@ -390,9 +390,19 @@ public:
|
|||
item->m_link = load(oldv);
|
||||
}
|
||||
|
||||
if (!oldv)
|
||||
if (!oldv && Notify)
|
||||
{
|
||||
// Notify only if queue was empty
|
||||
notify(true);
|
||||
}
|
||||
|
||||
return !oldv;
|
||||
}
|
||||
|
||||
void notify(bool force = false)
|
||||
{
|
||||
if (force || operator bool())
|
||||
{
|
||||
utils::bless<atomic_t<u32>>(&m_head)[1].notify_one();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue