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

Side by Side Diff: src/base/platform/platform-win32.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-solaris.cc ('k') | tools/presubmit.py » ('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 Win32. 5 // Platform-specific code for Win32.
6 6
7 // Secure API functions are not available using MinGW with msvcrt.dll 7 // Secure API functions are not available using MinGW with msvcrt.dll
8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to 8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to
9 // disable definition of secure API functions in standard headers that 9 // disable definition of secure API functions in standard headers that
10 // would conflict with our own implementation. 10 // would conflict with our own implementation.
(...skipping 28 matching lines...) Expand all
39 39
40 inline void MemoryBarrier() { 40 inline void MemoryBarrier() {
41 int barrier = 0; 41 int barrier = 0;
42 __asm__ __volatile__("xchgl %%eax,%0 ":"=r" (barrier)); 42 __asm__ __volatile__("xchgl %%eax,%0 ":"=r" (barrier));
43 } 43 }
44 44
45 #endif // __MINGW64_VERSION_MAJOR 45 #endif // __MINGW64_VERSION_MAJOR
46 46
47 47
48 int localtime_s(tm* out_tm, const time_t* time) { 48 int localtime_s(tm* out_tm, const time_t* time) {
49 tm* posix_local_time_struct = localtime(time); 49 tm* posix_local_time_struct = localtime(time); // NOLINT
50 if (posix_local_time_struct == NULL) return 1; 50 if (posix_local_time_struct == NULL) return 1;
51 *out_tm = *posix_local_time_struct; 51 *out_tm = *posix_local_time_struct;
52 return 0; 52 return 0;
53 } 53 }
54 54
55 55
56 int fopen_s(FILE** pFile, const char* filename, const char* mode) { 56 int fopen_s(FILE** pFile, const char* filename, const char* mode) {
57 *pFile = fopen(filename, mode); 57 *pFile = fopen(filename, mode);
58 return *pFile != NULL ? 0 : 1; 58 return *pFile != NULL ? 0 : 1;
59 } 59 }
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 1379
1380 1380
1381 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { 1381 void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
1382 BOOL result = TlsSetValue(static_cast<DWORD>(key), value); 1382 BOOL result = TlsSetValue(static_cast<DWORD>(key), value);
1383 USE(result); 1383 USE(result);
1384 DCHECK(result); 1384 DCHECK(result);
1385 } 1385 }
1386 1386
1387 } // namespace base 1387 } // namespace base
1388 } // namespace v8 1388 } // namespace v8
OLDNEW
« no previous file with comments | « src/base/platform/platform-solaris.cc ('k') | tools/presubmit.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698