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

Side by Side Diff: Source/wtf/ThreadingPthreads.cpp

Issue 48833002: Move all static constants in dtoa/cached-powers.* to .rodata section (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix Windows build failure Created 7 years, 1 month 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
« no previous file with comments | « no previous file | Source/wtf/ThreadingWin.cpp » ('j') | Source/wtf/dtoa/cached-powers.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) 3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com)
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 { 107 {
108 DEFINE_STATIC_LOCAL(Mutex, mutex, ()); 108 DEFINE_STATIC_LOCAL(Mutex, mutex, ());
109 return mutex; 109 return mutex;
110 } 110 }
111 111
112 void initializeThreading() 112 void initializeThreading()
113 { 113 {
114 // This should only be called once. 114 // This should only be called once.
115 ASSERT(!atomicallyInitializedStaticMutex); 115 ASSERT(!atomicallyInitializedStaticMutex);
116 116
117 WTF::double_conversion::initialize();
118 // StringImpl::empty() does not construct its static string in a threadsafe fashion, 117 // StringImpl::empty() does not construct its static string in a threadsafe fashion,
119 // so ensure it has been initialized from here. 118 // so ensure it has been initialized from here.
120 StringImpl::empty(); 119 StringImpl::empty();
121 atomicallyInitializedStaticMutex = new Mutex; 120 atomicallyInitializedStaticMutex = new Mutex;
122 threadMapMutex(); 121 threadMapMutex();
123 ThreadIdentifierData::initializeOnce(); 122 ThreadIdentifierData::initializeOnce();
124 wtfThreadData(); 123 wtfThreadData();
125 s_dtoaP5Mutex = new Mutex; 124 s_dtoaP5Mutex = new Mutex;
126 initializeDates(); 125 initializeDates();
127 } 126 }
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 382
384 void ThreadCondition::broadcast() 383 void ThreadCondition::broadcast()
385 { 384 {
386 int result = pthread_cond_broadcast(&m_condition); 385 int result = pthread_cond_broadcast(&m_condition);
387 ASSERT_UNUSED(result, !result); 386 ASSERT_UNUSED(result, !result);
388 } 387 }
389 388
390 } // namespace WTF 389 } // namespace WTF
391 390
392 #endif // USE(PTHREADS) 391 #endif // USE(PTHREADS)
OLDNEW
« no previous file with comments | « no previous file | Source/wtf/ThreadingWin.cpp » ('j') | Source/wtf/dtoa/cached-powers.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698