~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/thr_lock.cc

  • Committer: Brian Aker
  • Date: 2009-08-11 03:02:59 UTC
  • mto: This revision was merged to the branch mainline in revision 1114.
  • Revision ID: brian@gaz-20090811030259-2uep5869vuos4xfn
Refactor/kill some dead lock code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
737
737
  TL_WRITE_ONLY to abort any new accesses to the lock
738
738
*/
739
739
 
740
 
void thr_abort_locks(THR_LOCK *lock, bool upgrade_lock)
 
740
void thr_abort_locks(THR_LOCK *lock)
741
741
{
742
742
  THR_LOCK_DATA *data;
743
743
  pthread_mutex_lock(&lock->mutex);
758
758
  lock->read_wait.last= &lock->read_wait.data;
759
759
  lock->write_wait.last= &lock->write_wait.data;
760
760
  lock->read_wait.data=lock->write_wait.data=0;
761
 
  if (upgrade_lock && lock->write.data)
 
761
  if (lock->write.data)
762
762
    lock->write.data->type=TL_WRITE_ONLY;
763
763
  pthread_mutex_unlock(&lock->mutex);
764
764
  return;