~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/thr_lock.cc

  • Committer: lbieber at stabletransit
  • Date: 2010-10-19 14:03:27 UTC
  • mfrom: (1861.1.2 build)
  • Revision ID: lbieber@drizzle-build-n02.wc1.dfw1.stabletransit.com-20101019140327-2jvt5j2wi4pzhm1z
Merge Brian - Small collection of cleanups/refactor'ing around locks
Merge Monty - fix a few things in the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
 
93
93
uint64_t max_write_lock_count= UINT64_MAX;
94
94
 
 
95
static void thr_multi_unlock(THR_LOCK_DATA **data,uint32_t count);
 
96
 
95
97
/*
96
98
** For the future (now the thread specific cond is alloced by my_pthread.c)
97
99
*/
630
632
 
631
633
  /* free all locks */
632
634
 
633
 
void thr_multi_unlock(THR_LOCK_DATA **data,uint32_t count)
 
635
static void thr_multi_unlock(THR_LOCK_DATA **data,uint32_t count)
634
636
{
635
637
  THR_LOCK_DATA **pos,**end;
636
638
 
642
644
  return;
643
645
}
644
646
 
 
647
void DrizzleLock::unlock(uint32_t count)
 
648
{
 
649
  THR_LOCK_DATA **pos,**end;
 
650
 
 
651
  for (pos= getLocks(),end= getLocks()+count; pos < end ; pos++)
 
652
  {
 
653
    if ((*pos)->type != TL_UNLOCK)
 
654
      thr_unlock(*pos);
 
655
  }
 
656
}
 
657
 
645
658
/*
646
659
  Abort all threads waiting for a lock. The lock will be upgraded to
647
660
  TL_WRITE_ONLY to abort any new accesses to the lock