| Index: third_party/crazy_linker/crazy_linker/src/crazy_linker_globals.cpp
|
| diff --git a/third_party/crazy_linker/crazy_linker/src/crazy_linker_globals.cpp b/third_party/crazy_linker/crazy_linker/src/crazy_linker_globals.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b6d1a581cd6f90a85219cacafc02ed3c270ab520
|
| --- /dev/null
|
| +++ b/third_party/crazy_linker/crazy_linker/src/crazy_linker_globals.cpp
|
| @@ -0,0 +1,28 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "crazy_linker_globals.h"
|
| +
|
| +#include "crazy_linker_system.h"
|
| +
|
| +namespace crazy {
|
| +
|
| +Globals::Globals() : search_paths_(), rdebug_() {
|
| + pthread_mutex_init(&lock_, NULL);
|
| + search_paths_.ResetFromEnv("LD_LIBRARY_PATH");
|
| +}
|
| +
|
| +Globals::~Globals() {
|
| + pthread_mutex_destroy(&lock_);
|
| +}
|
| +
|
| +Globals* Globals::Get() {
|
| + static Globals* s_globals;
|
| + if (!s_globals) {
|
| + s_globals = new Globals();
|
| + }
|
| + return s_globals;
|
| +}
|
| +
|
| +} // namespace crazy
|
|
|