1ace9bad4SMark Rutlandcat <<EOF 2ace9bad4SMark Rutland/** 3ace9bad4SMark Rutland * ${atomic}_dec_and_test - decrement and test 4ace9bad4SMark Rutland * @v: pointer of type ${atomic}_t 5ace9bad4SMark Rutland * 6ace9bad4SMark Rutland * Atomically decrements @v by 1 and 7ace9bad4SMark Rutland * returns true if the result is 0, or false for all other 8ace9bad4SMark Rutland * cases. 9ace9bad4SMark Rutland */ 10765dcd20SMarco Elverstatic __always_inline bool 11ace9bad4SMark Rutland${atomic}_dec_and_test(${atomic}_t *v) 12ace9bad4SMark Rutland{ 13ace9bad4SMark Rutland return ${atomic}_dec_return(v) == 0; 14ace9bad4SMark Rutland} 15ace9bad4SMark RutlandEOF 16