From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Wiesner Date: Tue, 10 May 2011 10:59:25 +0000 Subject: Re: libudev queue finished seqnums Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org 2011/5/9 Kay Sievers : > On Sun, May 8, 2011 at 20:32, Sebastian Wiesner > wrote: >> I've got a question about libudev, concerning the function >> "udev_queue_get_seqnum_is_finished()". =A0According to the >> documentation, it returns a flag, indicating whether the given >> sequence number has already been processed. =A0In my experiments >> however, I found this function to always return 1, even for sequence >> numbers which haven't ocurred yet. =A0The attached test program gives >> the following output on my system: >> >> $ ./udev_queue_sequence_numbers >> current seqnum: 1662 >> is previous seqnum finished? yes >> is current seqnum finished? yes >> is next seqnum finished? yes >> >> In my understanding, the last line should have said "no", because the >> number immediately folllowing the current sequence number has >> obviously not yet occurred. >> >> Am I missing something? > > I guess, you need to read the function name as > _seqnum_is_not_active(). It will return true for all event numbers > currently not queued, including numbers larger than the currently > handled one. Ok, that'd make sense. Thanks for your help