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

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

Issue 2931143002: Basic compilation on Fuchsia (Closed)
Patch Set: Created 3 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
« no previous file with comments | « include/v8config.h ('k') | src/libsampler/sampler.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 POSIX goes here. This is not a platform on its 5 // Platform-specific code for POSIX goes here. This is not a platform on its
6 // own, but contains the parts which are the same across the POSIX platforms 6 // own, but contains the parts which are the same across the POSIX platforms
7 // Linux, MacOS, FreeBSD, OpenBSD, NetBSD and QNX. 7 // Linux, MacOS, FreeBSD, OpenBSD, NetBSD and QNX.
8 8
9 #include <errno.h> 9 #include <errno.h>
10 #include <limits.h> 10 #include <limits.h>
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 355
356 int OS::GetCurrentThreadId() { 356 int OS::GetCurrentThreadId() {
357 #if V8_OS_MACOSX || (V8_OS_ANDROID && defined(__APPLE__)) 357 #if V8_OS_MACOSX || (V8_OS_ANDROID && defined(__APPLE__))
358 return static_cast<int>(pthread_mach_thread_np(pthread_self())); 358 return static_cast<int>(pthread_mach_thread_np(pthread_self()));
359 #elif V8_OS_LINUX 359 #elif V8_OS_LINUX
360 return static_cast<int>(syscall(__NR_gettid)); 360 return static_cast<int>(syscall(__NR_gettid));
361 #elif V8_OS_ANDROID 361 #elif V8_OS_ANDROID
362 return static_cast<int>(gettid()); 362 return static_cast<int>(gettid());
363 #elif V8_OS_AIX 363 #elif V8_OS_AIX
364 return static_cast<int>(thread_self()); 364 return static_cast<int>(thread_self());
365 #elif V8_OS_FUCHSIA
366 return static_cast<int>(pthread_self());
365 #elif V8_OS_SOLARIS 367 #elif V8_OS_SOLARIS
366 return static_cast<int>(pthread_self()); 368 return static_cast<int>(pthread_self());
367 #else 369 #else
368 return static_cast<int>(reinterpret_cast<intptr_t>(pthread_self())); 370 return static_cast<int>(reinterpret_cast<intptr_t>(pthread_self()));
369 #endif 371 #endif
370 } 372 }
371 373
372 374
373 // ---------------------------------------------------------------------------- 375 // ----------------------------------------------------------------------------
374 // POSIX date/time support. 376 // POSIX date/time support.
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 case OS::MemoryPermission::kReadWrite: 791 case OS::MemoryPermission::kReadWrite:
790 return PROT_READ | PROT_WRITE; 792 return PROT_READ | PROT_WRITE;
791 case OS::MemoryPermission::kReadWriteExecute: 793 case OS::MemoryPermission::kReadWriteExecute:
792 return PROT_READ | PROT_WRITE | PROT_EXEC; 794 return PROT_READ | PROT_WRITE | PROT_EXEC;
793 } 795 }
794 UNREACHABLE(); 796 UNREACHABLE();
795 } 797 }
796 798
797 } // namespace base 799 } // namespace base
798 } // namespace v8 800 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8config.h ('k') | src/libsampler/sampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698