Back to home page

OSCL-LXR

 
 

    


0001 cat <<EOF
0002 /**
0003  * arch_${atomic}_inc_and_test - increment and test
0004  * @v: pointer of type ${atomic}_t
0005  *
0006  * Atomically increments @v by 1
0007  * and returns true if the result is zero, or false for all
0008  * other cases.
0009  */
0010 static __always_inline bool
0011 arch_${atomic}_inc_and_test(${atomic}_t *v)
0012 {
0013         return arch_${atomic}_inc_return(v) == 0;
0014 }
0015 EOF