diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-15 06:15:04 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-15 06:15:04 +0000 |
commit | 0c6f3b0c5f6409496fcecab0819b062f36d9b113 (patch) | |
tree | aa589efa568cd3792d1890ba37a8644491ec51f0 /base/atomicops_internals_x86_macosx.h | |
parent | 71cb4cd0c41e892aac8e29fd52cd0f935573aa36 (diff) | |
download | chromium_src-0c6f3b0c5f6409496fcecab0819b062f36d9b113.zip chromium_src-0c6f3b0c5f6409496fcecab0819b062f36d9b113.tar.gz chromium_src-0c6f3b0c5f6409496fcecab0819b062f36d9b113.tar.bz2 |
OpenBSD: make it possible to build libbase.a.
This still needs a little hack. I had to run gyp_chromium this way:
CHROMIUM_GYP_FILE="base/base.gyp" build/gyp_chromium -DOS=openbsd \
-Duse_gnome_keyring=0 -Duse_system_libevent=1
And then run "gmake base".
BUG=none
Review URL: http://codereview.chromium.org/6840023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81709 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/atomicops_internals_x86_macosx.h')
-rw-r--r-- | base/atomicops_internals_x86_macosx.h | 85 |
1 files changed, 1 insertions, 84 deletions
diff --git a/base/atomicops_internals_x86_macosx.h b/base/atomicops_internals_x86_macosx.h index 29e58e3..4b7cec8 100644 --- a/base/atomicops_internals_x86_macosx.h +++ b/base/atomicops_internals_x86_macosx.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -192,89 +192,6 @@ inline Atomic64 Release_Load(volatile const Atomic64 *ptr) { #endif // defined(__LP64__) -// MacOS uses long for intptr_t, AtomicWord and Atomic32 are always different -// on the Mac, even when they are the same size. We need to explicitly cast -// from AtomicWord to Atomic32 to implement the AtomicWord interface. -// When in 64-bit mode, AtomicWord is the same as Atomic64, so we need not -// add duplicate definitions. -#ifndef __LP64__ -#define AtomicWordCastType Atomic32 - -inline AtomicWord NoBarrier_CompareAndSwap(volatile AtomicWord* ptr, - AtomicWord old_value, - AtomicWord new_value) { - return NoBarrier_CompareAndSwap( - reinterpret_cast<volatile AtomicWordCastType*>(ptr), - old_value, new_value); -} - -inline AtomicWord NoBarrier_AtomicExchange(volatile AtomicWord* ptr, - AtomicWord new_value) { - return NoBarrier_AtomicExchange( - reinterpret_cast<volatile AtomicWordCastType*>(ptr), new_value); -} - -inline AtomicWord NoBarrier_AtomicIncrement(volatile AtomicWord* ptr, - AtomicWord increment) { - return NoBarrier_AtomicIncrement( - reinterpret_cast<volatile AtomicWordCastType*>(ptr), increment); -} - -inline AtomicWord Barrier_AtomicIncrement(volatile AtomicWord* ptr, - AtomicWord increment) { - return Barrier_AtomicIncrement( - reinterpret_cast<volatile AtomicWordCastType*>(ptr), increment); -} - -inline AtomicWord Acquire_CompareAndSwap(volatile AtomicWord* ptr, - AtomicWord old_value, - AtomicWord new_value) { - return base::subtle::Acquire_CompareAndSwap( - reinterpret_cast<volatile AtomicWordCastType*>(ptr), - old_value, new_value); -} - -inline AtomicWord Release_CompareAndSwap(volatile AtomicWord* ptr, - AtomicWord old_value, - AtomicWord new_value) { - return base::subtle::Release_CompareAndSwap( - reinterpret_cast<volatile AtomicWordCastType*>(ptr), - old_value, new_value); -} - -inline void NoBarrier_Store(volatile AtomicWord *ptr, AtomicWord value) { - NoBarrier_Store( - reinterpret_cast<volatile AtomicWordCastType*>(ptr), value); -} - -inline void Acquire_Store(volatile AtomicWord* ptr, AtomicWord value) { - return base::subtle::Acquire_Store( - reinterpret_cast<volatile AtomicWordCastType*>(ptr), value); -} - -inline void Release_Store(volatile AtomicWord* ptr, AtomicWord value) { - return base::subtle::Release_Store( - reinterpret_cast<volatile AtomicWordCastType*>(ptr), value); -} - -inline AtomicWord NoBarrier_Load(volatile const AtomicWord *ptr) { - return NoBarrier_Load( - reinterpret_cast<volatile const AtomicWordCastType*>(ptr)); -} - -inline AtomicWord Acquire_Load(volatile const AtomicWord* ptr) { - return base::subtle::Acquire_Load( - reinterpret_cast<volatile const AtomicWordCastType*>(ptr)); -} - -inline AtomicWord Release_Load(volatile const AtomicWord* ptr) { - return base::subtle::Release_Load( - reinterpret_cast<volatile const AtomicWordCastType*>(ptr)); -} - -#undef AtomicWordCastType -#endif - } // namespace base::subtle } // namespace base |