~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/thr_mutex.c

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
int safe_mutex_init(safe_mutex_t *mp,
56
56
                    const pthread_mutexattr_t *attr __attribute__((unused)),
57
57
                    const char *file,
58
 
                    uint line)
 
58
                    uint32_t line)
59
59
{
60
60
  memset(mp, 0, sizeof(*mp));
61
61
  pthread_mutex_init(&mp->global,MY_MUTEX_INIT_ERRCHK);
92
92
}
93
93
 
94
94
 
95
 
int safe_mutex_lock(safe_mutex_t *mp, bool try_lock, const char *file, uint line)
 
95
int safe_mutex_lock(safe_mutex_t *mp, bool try_lock, const char *file, uint32_t line)
96
96
{
97
97
  int error;
98
98
  if (!mp->file)
171
171
}
172
172
 
173
173
 
174
 
int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line)
 
174
int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint32_t line)
175
175
{
176
176
  int error;
177
177
  pthread_mutex_lock(&mp->global);
204
204
 
205
205
 
206
206
int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp, const char *file,
207
 
                   uint line)
 
207
                   uint32_t line)
208
208
{
209
209
  int error;
210
210
  pthread_mutex_lock(&mp->global);
256
256
 
257
257
int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
258
258
                        struct timespec *abstime,
259
 
                        const char *file, uint line)
 
259
                        const char *file, uint32_t line)
260
260
{
261
261
  int error;
262
262
  pthread_mutex_lock(&mp->global);
292
292
}
293
293
 
294
294
 
295
 
int safe_mutex_destroy(safe_mutex_t *mp, const char *file, uint line)
 
295
int safe_mutex_destroy(safe_mutex_t *mp, const char *file, uint32_t line)
296
296
{
297
297
  int error=0;
298
298
  if (!mp->file)
433
433
int my_pthread_fastmutex_lock(my_pthread_fastmutex_t *mp)
434
434
{
435
435
  int   res;
436
 
  uint  i;
437
 
  uint  maxdelay= MY_PTHREAD_FASTMUTEX_DELAY;
 
436
  uint32_t  i;
 
437
  uint32_t  maxdelay= MY_PTHREAD_FASTMUTEX_DELAY;
438
438
 
439
439
  for (i= 0; i < mp->spins; i++)
440
440
  {