OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "crazy_linker_globals.h" |
| 6 |
| 7 #include "crazy_linker_system.h" |
| 8 |
| 9 namespace crazy { |
| 10 |
| 11 Globals::Globals() : search_paths_(), rdebug_() { |
| 12 pthread_mutex_init(&lock_, NULL); |
| 13 search_paths_.ResetFromEnv("LD_LIBRARY_PATH"); |
| 14 } |
| 15 |
| 16 Globals::~Globals() { |
| 17 pthread_mutex_destroy(&lock_); |
| 18 } |
| 19 |
| 20 Globals* Globals::Get() { |
| 21 static Globals* s_globals; |
| 22 if (!s_globals) { |
| 23 s_globals = new Globals(); |
| 24 } |
| 25 return s_globals; |
| 26 } |
| 27 |
| 28 } // namespace crazy |
OLD | NEW |