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

Side by Side Diff: src/platform-linux.cc

Issue 17222004: Nuke OS::ReleaseStore, use Release_Store instead (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reverted erroneous changes Created 7 years, 6 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 | « src/platform-freebsd.cc ('k') | src/platform-macos.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 return 8; 301 return 8;
302 #elif V8_TARGET_ARCH_MIPS 302 #elif V8_TARGET_ARCH_MIPS
303 return 8; 303 return 8;
304 #endif 304 #endif
305 // With gcc 4.4 the tree vectorization optimizer can generate code 305 // With gcc 4.4 the tree vectorization optimizer can generate code
306 // that requires 16 byte alignment such as movdqa on x86. 306 // that requires 16 byte alignment such as movdqa on x86.
307 return 16; 307 return 16;
308 } 308 }
309 309
310 310
311 void OS::ReleaseStore(volatile AtomicWord* ptr, AtomicWord value) {
312 #if (defined(V8_TARGET_ARCH_ARM) && defined(__arm__)) || \
313 (defined(V8_TARGET_ARCH_MIPS) && defined(__mips__))
314 // Only use on ARM or MIPS hardware.
315 MemoryBarrier();
316 #else
317 __asm__ __volatile__("" : : : "memory");
318 // An x86 store acts as a release barrier.
319 #endif
320 *ptr = value;
321 }
322
323
324 const char* OS::LocalTimezone(double time) { 311 const char* OS::LocalTimezone(double time) {
325 if (std::isnan(time)) return ""; 312 if (std::isnan(time)) return "";
326 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); 313 time_t tv = static_cast<time_t>(floor(time/msPerSecond));
327 struct tm* t = localtime(&tv); 314 struct tm* t = localtime(&tv);
328 if (NULL == t) return ""; 315 if (NULL == t) return "";
329 return t->tm_zone; 316 return t->tm_zone;
330 } 317 }
331 318
332 319
333 double OS::LocalTimeOffset() { 320 double OS::LocalTimeOffset() {
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 limit_mutex = CreateMutex(); 987 limit_mutex = CreateMutex();
1001 } 988 }
1002 989
1003 990
1004 void OS::TearDown() { 991 void OS::TearDown() {
1005 delete limit_mutex; 992 delete limit_mutex;
1006 } 993 }
1007 994
1008 995
1009 } } // namespace v8::internal 996 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-freebsd.cc ('k') | src/platform-macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698