function registry_update

Updates the registry based on the latest files listed in the database.

This function should be used when system_rebuild_module_data() does not need to be called, because it is already known that the list of files in the {system} table matches those in the file system.

Return value

TRUE if the registry was rebuilt, FALSE if another thread was rebuilding in parallel and the current thread just waited for completion.

See also


Related topics

3 calls to registry_update()
module_disable in drupal/includes/
Disables a given set of modules.
module_enable in drupal/includes/
Enables or installs a given list of modules.
registry_rebuild in drupal/includes/
Rescans all enabled modules and rebuilds the registry.


drupal/includes/, line 3526
Functions that need to be loaded on every Drupal request.


function registry_update() {

  // install_system_module() calls module_enable() which calls into this
  // function during initial system installation, so the lock system is neither
  // loaded nor does its storage exist yet.
  $in_installer = drupal_installation_attempted();
  if (!$in_installer && !lock_acquire(__FUNCTION__)) {

    // Another request got the lock, wait for it to finish.
    return FALSE;
  require_once DRUPAL_ROOT . '/includes/';
  if (!$in_installer) {
  return TRUE;