atomic_add_negative() does not provide the relaxed/acquire/release variants. Provide them in preparation for a new scalable reference count algorithm.
Showing the changes to scripts (2 of 5 files). Show all
Unified · Split
| @@ -33,7 +33,7 @@ try_cmpxchg B v p:old i:new · 32 unmodified lines | ||
| 33 | 33 | sub_and_test b i v |
| 34 | 34 | dec_and_test b v |
| 35 | 35 | inc_and_test b v |
| 36 | −add_negative b i v | |
| 36 | +add_negative B i v | |
| 37 | 37 | add_unless fb v i:a i:u |
| 38 | 38 | inc_not_zero b v |
| 39 | 39 | inc_unless_negative b v |
| @@ -1,16 +1,15 @@ | ||
| 1 | 1 | cat <<EOF |
| 2 | 2 | /** |
| 3 | − * arch_${atomic}_add_negative - add and test if negative | |
| 3 | + * arch_${atomic}_add_negative${order} - Add and test if negative | |
| 4 | 4 | * @i: integer value to add |
| 5 | 5 | * @v: pointer of type ${atomic}_t |
| 6 | 6 | * |
| 7 | − * Atomically adds @i to @v and returns true | |
| 8 | − * if the result is negative, or false when | |
| 9 | − * result is greater than or equal to zero. | |
| 7 | + * Atomically adds @i to @v and returns true if the result is negative, | |
| 8 | + * or false when the result is greater than or equal to zero. | |
| 10 | 9 | */ |
| 11 | 10 | static __always_inline bool |
| 12 | −arch_${atomic}_add_negative(${int} i, ${atomic}_t *v) | |
| 11 | +arch_${atomic}_add_negative${order}(${int} i, ${atomic}_t *v) | |
| 13 | 12 | { |
| 14 | − return arch_${atomic}_add_return(i, v) < 0; | |
| 13 | + return arch_${atomic}_add_return${order}(i, v) < 0; | |
| 15 | 14 | } |
| 16 | 15 | EOF |