mq on kqueue broken after upgrade to FreeBSD 11

Lewis Donzis lew at perftech.com
Thu Sep 29 23:28:28 UTC 2016


I had posted this on the userland forum, but it was suggested that I re-post it to this mailing list, so here goes…

We have applications that are using kevent() with, among other things, POSIX message queues, so they can wake up when data is ready.

As such, we were using __mq_oshandle() to get a handle from an mqd_t, suitable for passing to kevent().

However, this function appears to have been removed from publication in FreeBSD 11.0, although it still exists in the source. I saw some discussion about it being a mistake to have been available previously, but plenty of other __mq_*() functions are still public.

So the question is, how is one supposed to get a kevent() on a POSIX message queue, now that the fd is no longer available?

(I realize that one could argue that it was never supported, but it does (did) work, and why else would the kernel uipc_mqueue.c have code for supporting it? And that's not to mention that __mq_oshandle() is still declared in /usr/include/mqueue.h)

Thanks,
lew



More information about the freebsd-arch mailing list