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

Side by Side Diff: src/base/platform/platform-solaris.cc

Issue 1369673003: [presubmit] Enable runtime/threadsafe_fn linter checking. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « src/base/platform/platform-qnx.cc ('k') | src/base/platform/platform-win32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project 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 // Platform-specific code for Solaris 10 goes here. For the POSIX-compatible 5 // Platform-specific code for Solaris 10 goes here. For the POSIX-compatible
6 // parts, the implementation is in platform-posix.cc. 6 // parts, the implementation is in platform-posix.cc.
7 7
8 #ifdef __sparc 8 #ifdef __sparc
9 # error "V8 does not support the SPARC CPU architecture." 9 # error "V8 does not support the SPARC CPU architecture."
10 #endif 10 #endif
(...skipping 20 matching lines...) Expand all
31 #include "src/base/platform/platform.h" 31 #include "src/base/platform/platform.h"
32 32
33 33
34 namespace v8 { 34 namespace v8 {
35 namespace base { 35 namespace base {
36 36
37 37
38 const char* OS::LocalTimezone(double time, TimezoneCache* cache) { 38 const char* OS::LocalTimezone(double time, TimezoneCache* cache) {
39 if (std::isnan(time)) return ""; 39 if (std::isnan(time)) return "";
40 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond)); 40 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond));
41 struct tm* t = localtime(&tv); 41 struct tm* t = localtime(&tv); // NOLINT(runtime/threadsafe_fn)
42 if (NULL == t) return ""; 42 if (NULL == t) return "";
43 return tzname[0]; // The location of the timezone string on Solaris. 43 return tzname[0]; // The location of the timezone string on Solaris.
44 } 44 }
45 45
46 46
47 double OS::LocalTimeOffset(TimezoneCache* cache) { 47 double OS::LocalTimeOffset(TimezoneCache* cache) {
48 tzset(); 48 tzset();
49 return -static_cast<double>(timezone * msPerSecond); 49 return -static_cast<double>(timezone * msPerSecond);
50 } 50 }
51 51
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 return munmap(base, size) == 0; 202 return munmap(base, size) == 0;
203 } 203 }
204 204
205 205
206 bool VirtualMemory::HasLazyCommits() { 206 bool VirtualMemory::HasLazyCommits() {
207 // TODO(alph): implement for the platform. 207 // TODO(alph): implement for the platform.
208 return false; 208 return false;
209 } 209 }
210 210
211 } } // namespace v8::base 211 } } // namespace v8::base
OLDNEW
« no previous file with comments | « src/base/platform/platform-qnx.cc ('k') | src/base/platform/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698