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

Unified Diff: src/base/platform/semaphore.cc

Issue 1936003002: AIX:Proposal to use kSemaphoreAlignmentMask instead kPointerAlignmentMask (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comment, removed kSemaphoreAlignmentMask from header Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/platform/semaphore.cc
diff --git a/src/base/platform/semaphore.cc b/src/base/platform/semaphore.cc
index 6225b1655f881fe4fe3ff47f8c1912d9d5995181..8fff809463759c0cfcdea7e6ed77b487f358cd30 100644
--- a/src/base/platform/semaphore.cc
+++ b/src/base/platform/semaphore.cc
@@ -78,7 +78,12 @@ Semaphore::Semaphore(int count) {
// Unaligned native handle can later cause a failure in semaphore signal.
// Check the alignment here to catch the failure earlier.
// Context: crbug.com/605349.
+#if V8_OS_AIX
+ // On aix sem_t is of type int
+ const uintptr_t kPointerAlignmentMask = sizeof(int) - 1;
jochen (gone - plz use gerrit) 2016/05/03 11:03:09 please keep to rename of kPointerAlignmentMask to
+#else
const uintptr_t kPointerAlignmentMask = sizeof(void*) - 1;
+#endif
CHECK_EQ(
0, reinterpret_cast<uintptr_t>(&native_handle_) & kPointerAlignmentMask);
DCHECK(count >= 0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698