MCPcopy Create free account
hub / github.com/catboost/catboost / FutexWait

Function FutexWait

library/cpp/yt/threading/futex.cpp:31–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29} // namespace
30
31int FutexWait(int* addr, int value, TDuration timeout)
32{
33 struct timespec timeoutSpec;
34 if (timeout != TDuration::Max()) {
35 timeoutSpec.tv_sec = timeout.Seconds();
36 timeoutSpec.tv_nsec = (timeout - TDuration::Seconds(timeout.Seconds())).MicroSeconds() * 1000;
37 }
38
39 return Futex(
40 addr,
41 FUTEX_WAIT_PRIVATE,
42 value,
43 timeout != TDuration::Max() ? &timeoutSpec : nullptr,
44 nullptr,
45 0);
46}
47
48int FutexWake(int* addr, int count)
49{

Callers 2

WaitMethod · 0.85
WaitMethod · 0.85

Calls 5

FutexFunction · 0.70
MaxFunction · 0.50
SecondsFunction · 0.50
SecondsMethod · 0.45
MicroSecondsMethod · 0.45

Tested by

no test coverage detected