Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3E716200C4D for ; Wed, 5 Apr 2017 19:25:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3D02C160B94; Wed, 5 Apr 2017 17:25:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 83E49160B76 for ; Wed, 5 Apr 2017 19:25:06 +0200 (CEST) Received: (qmail 35136 invoked by uid 500); 5 Apr 2017 17:25:05 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 35120 invoked by uid 99); 5 Apr 2017 17:25:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Apr 2017 17:25:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 07A5DC0115 for ; Wed, 5 Apr 2017 17:25:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.32 X-Spam-Level: X-Spam-Status: No, score=-0.32 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id WRydxHLfICYP for ; Wed, 5 Apr 2017 17:25:03 +0000 (UTC) Received: from mail-qt0-f182.google.com (mail-qt0-f182.google.com [209.85.216.182]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 1D9775F1A0 for ; Wed, 5 Apr 2017 17:25:03 +0000 (UTC) Received: by mail-qt0-f182.google.com with SMTP id x35so16567383qtc.2 for ; Wed, 05 Apr 2017 10:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=IXsSqN+Up/POYeJVoj9T786Lyt6UCyh6Vo8K1Zdiy1A=; b=TdNKBnOknxd8RUYNO0vQox8S2c2TKtMXBYKirEAUXNHc4WsDjLnf6QRqDM6zn0RYmT uCWJOoXpRV81L/Z/Kz2nhYyPmUdN+ROqfE8EBkKfbPL26qdvexHUQKmKQy2lEkcvmlkl Y4mgQwrqkW5KaAyMZKr/qIhYqFvUDQ39FdLbAhcCU7aoYKJi+Nl47k38liEpnKMbPOM1 472L3sAu9Llz8Wa/ocB012cpH3WpOijJHITJMqDoMzJUM54DTOWfjISdCBBbh/pFHVLK VI26MYGqkQxcJctOel6UCYmSv69ATdM4C8HCYuRrbMpk0QYRkBhfpqGaowv1e99yIYp/ PvaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=IXsSqN+Up/POYeJVoj9T786Lyt6UCyh6Vo8K1Zdiy1A=; b=NXm8RgbZEsKnobbkkpxT9E0tGPeSVHIRiCYIGDaR+x3UvgpDlNWTwsUDSyFpzkDVio wfuMtGPxl7NSbPXqd7J9Hpox0raNreAwsfex1lbdJm8KCRsLFlhvKkZ9N9EUwE09+omr Uzl7MLIACPPecf4q7Q/dSwVs8w+zos0Bn7TMgplQrZRC1jD+wxrYwh/pbI7ARchWbKw7 8Uih5tqZQOG/dsvZhDFKoKIC5W6sDZb7pfABUYWH8++YgAnj7V49xEUQ12MhnLJHqKs+ /bLTrJjbypvsXoQ3LU1sfK/0DC51BOrI26VoyroDyZdo85Lgl/Qn1dNcH3dwoxDFv83/ 4d2Q== X-Gm-Message-State: AFeK/H1945I4ZLScWjWXOntUD04SHwwKY7XhSRB1ugwJKXvH+zMy2Z0zGvRLy+6cxjoYlBWn+I2oaC6NhfHsyQ== X-Received: by 10.237.60.65 with SMTP id u1mr29021397qte.176.1491413102705; Wed, 05 Apr 2017 10:25:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.212.200 with HTTP; Wed, 5 Apr 2017 10:25:02 -0700 (PDT) In-Reply-To: <84C7BDB9-B85E-4230-8B22-780DBEA8621A@jaguNET.com> References: <20170405162401.DBD523A06C9@svn01-us-west.apache.org> <84C7BDB9-B85E-4230-8B22-780DBEA8621A@jaguNET.com> From: Yann Ylavic Date: Wed, 5 Apr 2017 19:25:02 +0200 Message-ID: Subject: Re: svn commit: r1790296 - /apr/apr/trunk/locks/unix/proc_mutex.c To: Jim Jagielski Cc: apr-dev Content-Type: text/plain; charset=UTF-8 archived-at: Wed, 05 Apr 2017 17:25:07 -0000 On Wed, Apr 5, 2017 at 7:14 PM, Jim Jagielski wrote: > Your log is: > > Follow up to r1667900: semtimedop() should be passed a relative timeout rather > then absolute. > > which implies that this fix is to adjust the calling convention for > semtimedop()... but your code refers to proc_mutex_sysv_tryacquire()... > > Hope that makes it clearer. APR_DECLARE(apr_status_t) apr_proc_mutex_timedlock(apr_proc_mutex_t *mutex, apr_time_t timeout, int absolute); So the API allows the caller to specify whether the passed in timeout value is absolute or relative (to now). So depending on the underlying/native timedlock function, we have to switch from the one to the other before the syscall. semtimedop() expects a relative timeout, so if the caller gives an absolute one we make it relative (by substracting now), and if the result is negative (i.e. the given absolute time is the the past), we act return of a non-blocking trylock Why isn't it correct, should we error out or block indefinitely?