From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2462 invoked by alias); 27 Jan 2014 00:12:12 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 2453 invoked by uid 89); 27 Jan 2014 00:12:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-lb0-f171.google.com Received: from mail-lb0-f171.google.com (HELO mail-lb0-f171.google.com) (209.85.217.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 27 Jan 2014 00:12:10 +0000 Received: by mail-lb0-f171.google.com with SMTP id c11so4036962lbj.30 for ; Sun, 26 Jan 2014 16:12:06 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.152.28.137 with SMTP id b9mr16000279lah.4.1390781526544; Sun, 26 Jan 2014 16:12:06 -0800 (PST) Received: by 10.112.143.70 with HTTP; Sun, 26 Jan 2014 16:12:06 -0800 (PST) In-Reply-To: References: Date: Mon, 27 Jan 2014 00:12:00 -0000 Message-ID: Subject: Re: Why does std::chrono now() uses slow syscall? From: Jonathan Wakely To: Keith Erickson Cc: gcc-help Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00096.txt.bz2 On 26 January 2014 22:50, Keith Erickson wrote: > So how do I use the fast clock_gettime in a single threaded program on glibc > 2.12 (rhel6) without pulling in pthread? AFAIK you can't. clock_gettime is in librt.so which depends on libpthread.so Glibc 2.17 moved clock_gettime out of librt.so specifically to solve this issue, because that was the only way to get clock_gettime without depending on libpthread.so