In Linux, futexs have the following signature
long futex(uint32_t *uaddr, int futex_op, uint32_t val, const struct timespec *timeout)
, so I can say syscall(SYS_futex, &m_address, FUTEX_WAIT_PRIVATE, 1, nullptr);
which will pause the current thread if the value at m_address is 1.
What I want to know is how do I do this in windows.
The signature for BOOL WaitOnAddress(volatile VOID *Address, PVOID CompareAddress, SIZE_T AddressSize, DWORD dwMilliseconds)
. There's no option for a value. Do I have to make a variable with constant value and pass it to CompareAddress or am I missing something?