aboutsummaryrefslogtreecommitdiff
path: root/gold/descriptors.h
diff options
context:
space:
mode:
Diffstat (limited to 'gold/descriptors.h')
-rw-r--r--gold/descriptors.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gold/descriptors.h b/gold/descriptors.h
index 44c2475..8e154a6 100644
--- a/gold/descriptors.h
+++ b/gold/descriptors.h
@@ -25,11 +25,11 @@
#include <vector>
+#include "gold-threads.h"
+
namespace gold
{
-class Lock;
-
// This class manages file descriptors for gold.
class Descriptors
@@ -78,6 +78,8 @@ class Descriptors
// We need to lock before accessing any fields.
Lock* lock_;
+ // Used to initialize the lock_ field exactly once.
+ Initialize_lock initialize_lock_;
// Information for descriptors.
std::vector<Open_descriptor> open_descriptors_;
// Top of stack.