Back to home page

OSCL-LXR

 
 

    


0001 cat <<EOF
0002 /**
0003  * arch_${atomic}_add_negative - add and test if negative
0004  * @i: integer value to add
0005  * @v: pointer of type ${atomic}_t
0006  *
0007  * Atomically adds @i to @v and returns true
0008  * if the result is negative, or false when
0009  * result is greater than or equal to zero.
0010  */
0011 static __always_inline bool
0012 arch_${atomic}_add_negative(${int} i, ${atomic}_t *v)
0013 {
0014         return arch_${atomic}_add_return(i, v) < 0;
0015 }
0016 EOF