Skip to main content

FUTEX_OP

Function FUTEX_OP 

Source
pub const fn FUTEX_OP(op: i32, oparg: i32, cmp: i32, cmparg: i32) -> i32
Expand description

FUTEX_WAKE_OP will perform atomically.

int oldval = *(int *)UADDR2;
*(int *)UADDR2 = oldval OP OPARG;
if (oldval CMP CMPARG)
wake UADDR2;