~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/atomics.h

  • Committer: Monty Taylor
  • Date: 2009-08-28 03:36:57 UTC
  • mto: (1130.3.4 memory-file-moves)
  • mto: This revision was merged to the branch mainline in revision 1184.
  • Revision ID: mordred@inaugust.com-20090828033657-a00811dcgv9z2wnb
Two more cleanups.

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
struct atomic {
137
137
};
138
138
 
 
139
/* *INDENT-OFF* */
139
140
#define __DRIZZLE_DECL_ATOMIC(T)                                        \
140
141
  template<> struct atomic<T>                                           \
141
142
  : internal::atomic_impl<T,T,ATOMIC_TRAITS<T,T> > {                    \
142
143
    atomic<T>() : internal::atomic_impl<T,T,ATOMIC_TRAITS<T,T> >() {}   \
143
144
    T operator=( T rhs ) { return store_with_release(rhs); }            \
144
145
  };
 
146
/* *INDENT-ON* */
145
147
 
146
148
 
147
149
__DRIZZLE_DECL_ATOMIC(long)
158
160
/* 32-bit platforms don't have a GCC atomic operation for 64-bit types,
159
161
 * so we'll use pthread locks to handler 64-bit types on that platforms
160
162
 */
 
163
/* *INDENT-OFF* */
161
164
#  if SIZEOF_SIZE_T >= SIZEOF_LONG_LONG
162
165
__DRIZZLE_DECL_ATOMIC(long long)
163
166
__DRIZZLE_DECL_ATOMIC(unsigned long long)
172
175
__DRIZZLE_DECL_ATOMIC64(long long)
173
176
__DRIZZLE_DECL_ATOMIC64(unsigned long long)
174
177
#  endif
 
178
/* *INDENT-ON* */
175
179
 
176
180
}
177
181