summaryrefslogtreecommitdiff
path: root/gold/errors.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-11-22 00:05:51 +0000
committerIan Lance Taylor <iant@google.com>2007-11-22 00:05:51 +0000
commitc79126688f8211ab17a893c5e80b09811d424fc1 (patch)
tree23a727f6718dc203a4e3b9ef1575e8a10b6f0d80 /gold/errors.h
parent06d063c072d0e247751535bc5e394aa7b8be3b0f (diff)
downloadbinutils-gdb-c79126688f8211ab17a893c5e80b09811d424fc1.tar.gz
Add threading support.
Diffstat (limited to 'gold/errors.h')
-rw-r--r--gold/errors.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/gold/errors.h b/gold/errors.h
index 545c463bad3..17b72e10b36 100644
--- a/gold/errors.h
+++ b/gold/errors.h
@@ -80,6 +80,10 @@ class Errors
const Relocate_info<size, big_endian>* relinfo,
size_t relnum, off_t reloffset);
+ // Report a debugging message.
+ void
+ debug(const char* format, ...) ATTRIBUTE_PRINTF_2;
+
// Return the number of errors.
int
error_count() const
@@ -89,6 +93,12 @@ class Errors
Errors(const Errors&);
Errors& operator=(const Errors&);
+ // Initialize the lock. We don't do this in the constructor because
+ // lock initialization wants to know whether we are using threads or
+ // not.
+ void
+ initialize_lock();
+
// The number of times we report an undefined symbol.
static const int max_undefined_error_report = 5;
@@ -96,7 +106,7 @@ class Errors
const char* program_name_;
// This class can be accessed from multiple threads. This lock is
// used to control access to the data structures.
- Lock lock_;
+ Lock* lock_;
// Numbers of errors reported.
int error_count_;
// Number of warnings reported.