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

Implementation of mongo::ThreadLocalValue incorrectly assumes no support for __thread on Apple

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Internal Code
    • None
    • Fully Compatible

    Description

      We assume that for Apple platforms that the __thread keyword doesn't work.

      https://github.com/mongodb/mongo/blob/master/src/mongo/util/concurrency/threadlocal.h#L120

      However, this isn't a platform thing, it is a compiler thing. Clang on Apple, for instance, does support __thread.

      The check for __thread support should be moved into a Configure time check and a config.h style header, setting something like MONGO_HAVE___THREAD.

      Attachments

        Activity

          People

            Unassigned Unassigned
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: