Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: base/third_party/dmg_fp/dtoa_wrapper.cc

Issue 6410105: run iwyu on base! Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/task_queue.cc ('k') | base/third_party/dmg_fp/g_fmt.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // The purpose of this file is to supply the macro definintions necessary 5 // The purpose of this file is to supply the macro definintions necessary
6 // to make third_party/dmg_fp/dtoa.cc threadsafe. 6 // to make third_party/dmg_fp/dtoa.cc threadsafe.
7 #include <time.h>
8
9 #include "base/basictypes.h"
10 #include "base/logging.h"
7 #include "base/synchronization/lock.h" 11 #include "base/synchronization/lock.h"
8 #include "base/logging.h"
9 12
10 // We need two locks because they're sometimes grabbed at the same time. 13 // We need two locks because they're sometimes grabbed at the same time.
11 // A single lock would lead to an attempted recursive grab. 14 // A single lock would lead to an attempted recursive grab.
12 static base::Lock dtoa_locks[2]; 15 static base::Lock dtoa_locks[2];
13 16
14 /* 17 /*
15 * This define and the code below is to trigger thread-safe behavior 18 * This define and the code below is to trigger thread-safe behavior
16 * in dtoa.cc, per this comment from the file: 19 * in dtoa.cc, per this comment from the file:
17 * 20 *
18 * #define MULTIPLE_THREADS if the system offers preemptively scheduled 21 * #define MULTIPLE_THREADS if the system offers preemptively scheduled
(...skipping 12 matching lines...) Expand all
31 DCHECK(n < arraysize(dtoa_locks)); 34 DCHECK(n < arraysize(dtoa_locks));
32 dtoa_locks[n].Acquire(); 35 dtoa_locks[n].Acquire();
33 } 36 }
34 37
35 inline static void FREE_DTOA_LOCK(size_t n) { 38 inline static void FREE_DTOA_LOCK(size_t n) {
36 DCHECK(n < arraysize(dtoa_locks)); 39 DCHECK(n < arraysize(dtoa_locks));
37 dtoa_locks[n].Release(); 40 dtoa_locks[n].Release();
38 } 41 }
39 42
40 #include "base/third_party/dmg_fp/dtoa.cc" 43 #include "base/third_party/dmg_fp/dtoa.cc"
OLDNEW
« no previous file with comments | « base/task_queue.cc ('k') | base/third_party/dmg_fp/g_fmt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698