Index: src/base/platform/semaphore.cc |
diff --git a/src/base/platform/semaphore.cc b/src/base/platform/semaphore.cc |
index 6225b1655f881fe4fe3ff47f8c1912d9d5995181..c94bfa7953f938d2347738e3f427d786b5c9d4e8 100644 |
--- a/src/base/platform/semaphore.cc |
+++ b/src/base/platform/semaphore.cc |
@@ -78,9 +78,15 @@ 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. |
- const uintptr_t kPointerAlignmentMask = sizeof(void*) - 1; |
+#if V8_OS_AIX |
+ // On aix sem_t is of type int |
+ const uintptr_t kSemaphoreAlignmentMask = sizeof(int) - 1; |
+#else |
+ const uintptr_t kSemaphoreAlignmentMask = sizeof(void*) - 1; |
+#endif |
CHECK_EQ( |
- 0, reinterpret_cast<uintptr_t>(&native_handle_) & kPointerAlignmentMask); |
+ 0, reinterpret_cast<uintptr_t>(&native_handle_) & |
+ kSemaphoreAlignmentMask); |
DCHECK(count >= 0); |
#if V8_LIBC_GLIBC |
// sem_init in glibc prior to 2.1 does not zero out semaphores. |