~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/my_pthread.h

  • Committer: lbieber
  • Date: 2010-08-10 18:52:46 UTC
  • mfrom: (1698.1.2 staging)
  • Revision ID: lbieber@orisndriz03-20100810185246-7nawc4svsxr4llh5
Merge Joe -remove the increment wrapper calls in my_pthread.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
        (pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L)))
179
179
#endif
180
180
 
181
 
/*
182
 
  statistics_xxx functions are for non critical statistic,
183
 
  maintained in global variables.
184
 
  - race conditions can occur, making the result slightly inaccurate.
185
 
  - the lock given is not honored.
186
 
*/
187
 
#define statistic_decrement(V,L) (V)--
188
 
#define statistic_increment(V,L) (V)++
189
 
#define statistic_add(V,C,L)     (V)+=(C)
190
 
#define statistic_sub(V,C,L)     (V)-=(C)
191
 
 
192
 
/*
193
 
  No locking needed, the counter is owned by the thread
194
 
*/
195
 
#define status_var_increment(V) (V)++
196
 
#define status_var_decrement(V) (V)--
197
 
#define status_var_add(V,C)     (V)+=(C)
198
 
#define status_var_sub(V,C)     (V)-=(C)
199
 
 
200
181
} /* namespace internal */
201
182
} /* namespace drizzled */
202
183