// fileread.cc -- read files for gold
-// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012
-// Free Software Foundation, Inc.
+// Copyright (C) 2006-2020 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
File_read::lock(const Task* task)
{
gold_assert(this->released_);
+ gold_debug(DEBUG_FILES, "Locking file \"%s\"", this->name_.c_str());
this->token_.add_writer(task);
this->released_ = false;
}
void
File_read::unlock(const Task* task)
{
+ gold_debug(DEBUG_FILES, "Unlocking file \"%s\"", this->name_.c_str());
this->release();
this->token_.remove_writer(task);
}