[SERVER-9483] Implementation of mongo::ThreadLocalValue incorrectly assumes no support for __thread on Apple Created: 26/Apr/13 Updated: 21/Nov/15 Resolved: 21/Nov/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Participants: |
| 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. |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 21/Nov/15 ] |
|
This was fixed by work done in |