Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-4801

SpinLock does not compile for non-x86

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.0.3
    • Concurrency
    • None
    • Target: arm-linux-gnueabi
      gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
    • Storage Execution

    Description

      Recent (unreleased) changes to add PAUSE instructions to spinlocks break compilation on non-x86 systems:

      g++ -o build/linux2/usev8/mongo/util/concurrency/spin_lock.o -c -Wnon-virtual-dtor -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror -pipe -fno-builtin-memcmp -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -D_FILE_OFFSET_BITS=64 -Ibuild/linux2/usev8 -Isrc -Ibuild/linux2/usev8/mongo -Isrc/mongo -Ibuild/linux2/usev8/third_party/pcre-7.4 -Isrc/third_party/pcre-7.4 -I/root/v8/include src/mongo/util/concurrency/spin_lock.cpp

      {standard input}: Assembler messages:{standard input}

      :124: Error: bad instruction `pause'

      The attached patch makes the use of PAUSE conditional on x86, and reverts to the previous code on non-x86.

      Attachments

        Activity

          People

            backlog-server-execution Backlog - Storage Execution Team
            scurrilous Trevor Robinson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: