~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/loader.cc

Convert LOCK_global_system_variables to boost.

Show diffs side-by-side

added added

removed removed

Lines of Context:
977
977
    session->variables.dynamic_variables_ptr= tmpptr;
978
978
 
979
979
    if (global_lock)
980
 
      pthread_mutex_lock(&LOCK_global_system_variables);
 
980
      LOCK_global_system_variables.lock();
981
981
 
982
982
    //safe_mutex_assert_owner(&LOCK_global_system_variables);
983
983
 
1020
1020
    }
1021
1021
 
1022
1022
    if (global_lock)
1023
 
      pthread_mutex_unlock(&LOCK_global_system_variables);
 
1023
      LOCK_global_system_variables.unlock();
1024
1024
 
1025
1025
    session->variables.dynamic_variables_version=
1026
1026
           global_system_variables.dynamic_variables_version;
1262
1262
  if (is_readonly())
1263
1263
    return;
1264
1264
 
1265
 
  pthread_mutex_lock(&LOCK_global_system_variables);
 
1265
  LOCK_global_system_variables.lock();
1266
1266
  tgt= real_value_ptr(session, type);
1267
1267
  src= ((void **) (plugin_var + 1) + 1);
1268
1268
 
1299
1299
  if (!(plugin_var->flags & PLUGIN_VAR_SessionLOCAL) || type == OPT_GLOBAL)
1300
1300
  {
1301
1301
    plugin_var->update(session, plugin_var, tgt, src);
1302
 
    pthread_mutex_unlock(&LOCK_global_system_variables);
 
1302
    LOCK_global_system_variables.unlock();
1303
1303
  }
1304
1304
  else
1305
1305
  {
1306
 
    pthread_mutex_unlock(&LOCK_global_system_variables);
 
1306
    LOCK_global_system_variables.unlock();
1307
1307
    plugin_var->update(session, plugin_var, tgt, src);
1308
1308
  }
1309
1309
}
1322
1322
  if (is_readonly())
1323
1323
    return 1;
1324
1324
 
1325
 
  pthread_mutex_lock(&LOCK_global_system_variables);
 
1325
  LOCK_global_system_variables.lock();
1326
1326
  tgt= real_value_ptr(session, var->type);
1327
1327
 
1328
1328
  if (!(plugin_var->flags & PLUGIN_VAR_SessionLOCAL) || var->type == OPT_GLOBAL)
1329
1329
  {
1330
1330
    /* variable we are updating has global scope, so we unlock after updating */
1331
1331
    plugin_var->update(session, plugin_var, tgt, &var->save_result);
1332
 
    pthread_mutex_unlock(&LOCK_global_system_variables);
 
1332
    LOCK_global_system_variables.unlock();
1333
1333
  }
1334
1334
  else
1335
1335
  {
1336
 
    pthread_mutex_unlock(&LOCK_global_system_variables);
 
1336
    LOCK_global_system_variables.unlock();
1337
1337
    plugin_var->update(session, plugin_var, tgt, &var->save_result);
1338
1338
  }
1339
1339
 return 0;