[SERVER-19759] add a configure check for std::timed_mutex Created: 04/Aug/15  Updated: 10/Aug/15  Resolved: 10/Aug/15

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Adam Midvidy Assignee: Andrew Morrow (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-19760 Cannot compile on osx with gcc4.8/4.9/+ Closed
Related
is related to SERVER-19535 Capped collections grow unbounded und... Closed
is related to SERVER-6246 Manipulate user objects exclusively v... Closed
is related to SERVER-18478 Clean up AuthzManagerExternalState Closed
is related to SERVER-19846 Remove existing usages of timed_mutex... Closed
Participants:
Linked BF Score: 0

 Description   

in libstdc++ std::timed_mutex and std::recursive_timed_mutex are only defined on platforms that define _POSIX_TIMEOUTS.

In particular, OSX does not support _POSIX_TIMEOUTS. This means that mongod will not compile with libstdc++ on OSX.

We should add a configure check for std::timed_mutex + std::recursive_timed_mutex and then fall back to Boost if they are not supported.

libstdc++ bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65704



 Comments   
Comment by Adam Midvidy [ 04/Aug/15 ]

Note that we don't actually use timed_mutex anywhere other than dbtests/perftests.cpp. We also don't use std::recursive_timed_mutex at all.

Generated at Thu Feb 08 03:51:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.