~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/locking/global.cc

  • Committer: Olaf van der Spek
  • Date: 2011-04-13 12:17:56 UTC
  • mto: (2277.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2278.
  • Revision ID: olafvdspek@gmail.com-20110413121756-8zsjfrl52qb28vx1
Thread

Show diffs side-by-side

added added

removed removed

Lines of Context:
946
946
                            "Waiting to get readlock");
947
947
 
948
948
    waiting_for_read_lock++;
949
 
    boost_unique_lock_t scopedLock(LOCK_global_read_lock, boost::adopt_lock_t());
 
949
    boost::mutex::scoped_lock scopedLock(LOCK_global_read_lock, boost::adopt_lock_t());
950
950
    while (protect_against_global_read_lock && not getKilled())
951
951
      COND_global_read_lock.wait(scopedLock);
952
952
    waiting_for_read_lock--;
981
981
    return;
982
982
 
983
983
  {
984
 
    boost_unique_lock_t scopedLock(LOCK_global_read_lock);
 
984
    boost::mutex::scoped_lock scopedLock(LOCK_global_read_lock);
985
985
    tmp= --global_read_lock;
986
986
    if (isGlobalReadLock() == Session::MADE_GLOBAL_READ_LOCK_BLOCK_COMMIT)
987
987
      --global_read_lock_blocks_commit;
1035
1035
    while (must_wait(is_not_commit) && not getKilled() &&
1036
1036
           (!abort_on_refresh || open_tables.version == g_refresh_version))
1037
1037
    {
1038
 
      boost_unique_lock_t scoped(LOCK_global_read_lock, boost::adopt_lock_t());
 
1038
      boost::mutex::scoped_lock scoped(LOCK_global_read_lock, boost::adopt_lock_t());
1039
1039
      COND_global_read_lock.wait(scoped);
1040
1040
      scoped.release();
1041
1041
    }
1096
1096
                          "Waiting for all running commits to finish");
1097
1097
  while (protect_against_global_read_lock && not getKilled())
1098
1098
  {
1099
 
    boost_unique_lock_t scopedLock(LOCK_global_read_lock, boost::adopt_lock_t());
 
1099
    boost::mutex::scoped_lock scopedLock(LOCK_global_read_lock, boost::adopt_lock_t());
1100
1100
    COND_global_read_lock.wait(scopedLock);
1101
1101
    scopedLock.release();
1102
1102
  }