~mordred/drizzle/fix-bell-bugs

« back to all changes in this revision

Viewing changes to drizzled/atomics.h

Merge Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
    return operator+=(D(0)-addend);
114
114
  }
115
115
 
116
 
  atomic_impl<I,D,T>& operator++() {
117
 
    fetch_and_add(1);
118
 
    return *this;
119
 
  }
120
 
 
121
 
  atomic_impl<I,D,T>& operator--() {
122
 
    fetch_and_add(D(-1));
123
 
    return *this;
124
 
  }
125
 
 
126
 
  atomic_impl<I,D,T> operator++(int) {
127
 
    fetch_and_add(1);
128
 
    return *this;
129
 
  }
130
 
 
131
 
  atomic_impl<I,D,T> operator--(int) {
132
 
    fetch_and_add(D(-1));
133
 
    return *this;
134
 
  }
 
116
  value_type increment() {
 
117
    return fetch_and_add(1)+1;
 
118
  }
 
119
 
 
120
  value_type decrement() {
 
121
    return fetch_and_add(D(-1))-1;
 
122
  }
 
123
 
135
124
 
136
125
};
137
126