Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 13 Mar 2002 23:13:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 13 Mar 2002 23:13:30 -0500 Received: from [202.135.142.196] ([202.135.142.196]:48135 "EHLO wagner.rustcorp.com.au") by vger.kernel.org with ESMTP id ; Wed, 13 Mar 2002 23:13:17 -0500 From: Rusty Russell To: frankeh@watson.ibm.com Subject: Re: futex and timeouts Cc: matthew@hairy.beasts.org, linux-kernel@vger.kernel.org, lse-tech@lists.sourceforge.net In-Reply-To: Your message of "Wed, 13 Mar 2002 13:26:53 CDT." <20020313182552.945523FE06@smtp.linux.ibm.com> Date: Thu, 14 Mar 2002 15:15:52 +1100 Message-Id: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org In message <20020313182552.945523FE06@smtp.linux.ibm.com> you write: > > Ulrich, it seems to me that absolute timeouts are the easiest to do. > > (a) expand by additional parameter (0) means no timeout desired > (b) differentiate the schedule call in futex_down.. > > Question is whether the granularity of jiffies (10ms) is sufficiently small > for timeouts..... 1) You must not export jiffies to userspace. 2) They are not a time, they are a counter, and they do wrap. 3) This does not handle the settimeofday case: you need to check in userspace for that anyway. So, since you need to check if you're trying to sleep for longer than (say) 49 days, AND you need to check if you are after the given abstime in userspace anyway (settimeofday backwards), you might as well convert to relative in userspace. Sorry, Rusty. -- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/