From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKnyd-00015H-7q for qemu-devel@nongnu.org; Fri, 22 Aug 2014 08:30:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKnyX-0001C3-6P for qemu-devel@nongnu.org; Fri, 22 Aug 2014 08:29:55 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39008 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKnyW-0001By-Vm for qemu-devel@nongnu.org; Fri, 22 Aug 2014 08:29:49 -0400 Message-ID: <53F737BC.8060000@suse.de> Date: Fri, 22 Aug 2014 14:29:48 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1408708578-53362-1-git-send-email-agraf@suse.de> <53F733B3.6090902@suse.de> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] linux-user: Simplify timerid checks on g_posix_timers range List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Riku Voipio , QEMU Developers , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= On 22.08.14 14:25, Peter Maydell wrote: > On 22 August 2014 13:12, Alexander Graf wrote: >> In Linux, the timer id is a "key" into a hash table that the kernel >> searches to find its timer. In QEMU it's an offset into an array. >> >> In both cases the syscall user receives it as a token from a create >> function and should treat it as opaque. >> >> So in the QEMU case it is unsigned, regardless of what the kernel allows >> it to be, because it's an array offset. > > It's a number between 0 and 32. That doesn't imply that it has > to be an unsigned variable, and we already have it in a > signed variable arg1... Yes, so the end result will be the same. What's the point of this bike shedding? Alex