From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 17 14:25:40 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E16EE1065676 for ; Thu, 17 Jul 2008 14:25:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 89F7C8FC1C for ; Thu, 17 Jul 2008 14:25:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m6HEOvFa032292; Thu, 17 Jul 2008 10:25:34 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 17 Jul 2008 10:05:52 -0400 User-Agent: KMail/1.9.7 References: <78c6bd860807121611w4f6ab44brbebfffea9929682a@mail.gmail.com> In-Reply-To: <78c6bd860807121611w4f6ab44brbebfffea9929682a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200807171005.53148.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Thu, 17 Jul 2008 10:25:34 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/7736/Thu Jul 17 09:11:09 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Michael B Allen Subject: Re: Pls sanity check my semtimedop(2) implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2008 14:25:41 -0000 On Saturday 12 July 2008 07:11:26 pm Michael B Allen wrote: > Hi, > > Below is a semtimedop(2) implementation that I'm using for FreeBSD. I > was hoping someone could look it over and tell me if they think the > implementation is sound. > > The code seems to work ok but when stressing the FreeBSD build of my app > I have managed to provoke errors related to concurrency (usually when a > SIGALRM goes off). The Linux build works flawlessesly so I'm wondering > about this one critical function that is different. > > Do you think it would make any difference if I used > ITIMER_VIRTUAL / SIGVTALRM instead of ITIMER_REAL / SIGALRM? > > Or perhaps I should be using a different implementation entirely? What specific races are you seeing? The timer is firing too early, too late? -- John Baldwin