Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Oct 2016 09:11:12 -0500
From:      Lewis Donzis <lew@perftech.com>
To:        Jilles Tjoelker <jilles@stack.nl>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, deischen@freebsd.org, freebsd-arch@freebsd.org
Subject:   Re: mq on kqueue broken after upgrade to FreeBSD 11
Message-ID:  <7A72D37B-6C57-41FE-893F-592235A19D9D@perftech.com>
In-Reply-To: <20161002132242.GA2628@stack.nl>
References:  <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> <20160930094544.GP38409@kib.kiev.ua> <19A6EEAA-C68E-4DAD-B98F-4D904734BD8B@perftech.com> <20160930152006.GS38409@kib.kiev.ua> <20160930184418.1047afc2@kan> <20161001092515.GW38409@kib.kiev.ua> <20161001201655.GA91457@stack.nl> <20161001210722.GC38409@kib.kiev.ua> <20161001231524.GB91457@stack.nl> <20161002114613.GE38409@kib.kiev.ua> <20161002132242.GA2628@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help


> On Oct 2, 2016, at 8:22 AM, Jilles Tjoelker <jilles@stack.nl> wrote:
> 
> On Sun, Oct 02, 2016 at 02:46:13PM +0300, Konstantin Belousov wrote:
>> On Sun, Oct 02, 2016 at 01:15:24AM +0200, Jilles Tjoelker wrote:
>>> On Sun, Oct 02, 2016 at 12:07:22AM +0300, Konstantin Belousov wrote:
>>>> On Sat, Oct 01, 2016 at 10:16:55PM +0200, Jilles Tjoelker wrote:
>>>>> The idea is good, but perhaps call the function mq_getfd_np() to clarify
>>>>> it returns a file descriptor. Also, the __ versions should not be
>>>>> exported since they are not used outside the library (they can be
>>>>> exported if and when needed).
> 
>>> Please rename timer_oshandle_np() to timer_getfd_np() as well.
>> The timer handle is not an fd, so I kept the old name.  Using
>> _getfd there is IMO more confusing than the neutral _handle for
>> mq.
> 
> Oh right, the timers are not file descriptors.

Technically, neither are mqueues.  The only thing "the int" can be used for is select(), poll(), and kevent().  You can’t (or at least shouldn’t) pass it to any of the other system calls that accept fds.

lew


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7A72D37B-6C57-41FE-893F-592235A19D9D>