#include <vector>
+#include "gold-threads.h"
+
namespace gold
{
-class Lock;
-
// This class manages file descriptors for gold.
class Descriptors
bool inuse;
// Whether this is a write descriptor.
bool is_write;
+ // Whether the descriptor is on the stack.
+ bool is_on_stack;
};
bool
// 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.