mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
Implement FN (lambda shortener)
Useful for some higher order functions. Allows to make short lambdas even shorter.
This commit is contained in:
parent
5c6f5a1610
commit
4b787b22c8
12 changed files with 80 additions and 72 deletions
|
@ -99,13 +99,13 @@ inline int futex(volatile void* uaddr, int futex_op, uint val, const timespec* t
|
|||
|
||||
if (!timeout)
|
||||
{
|
||||
rec.cv.wait(lock, [&] { return !rec.mask; });
|
||||
rec.cv.wait(lock, FN(!rec.mask));
|
||||
}
|
||||
else if (futex_op == FUTEX_WAIT)
|
||||
{
|
||||
const auto nsec = std::chrono::nanoseconds(timeout->tv_nsec + timeout->tv_sec * 1000000000ull);
|
||||
|
||||
if (!rec.cv.wait_for(lock, nsec, [&] { return !rec.mask; }))
|
||||
if (!rec.cv.wait_for(lock, nsec, FN(!rec.mask)))
|
||||
{
|
||||
res = -1;
|
||||
errno = ETIMEDOUT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue