eventfd lookalike in FreeBSD ?

From: Luigi Rizzo <rizzo_at_iet.unipi.it>
Date: Tue, 28 Jul 2015 14:19:49 +0200
Hi,
for some work we are doing on bhyve, we need some lightweight mechanism that
a kernel thread can use to wake up another user thread possibly
waiting for some event.

If the recipient of the event were a kernel thread it would simply
do a tsleep(chan...) and the sender would do a wakeup() or wakeup_one().

Do we have an equally simple option for a recipient that is a
userspace thread using something that is already in the kernel ?
Do we have some blocking syscall that ends up doing a tsleep in
a predictable way ?

I suppose I could create a kqueue() descriptor and instruct the kernel
thread side to post an event instead of doing the wakeup, but
this seems a bit more expensive on both endpoints.

cheers
luigi
Received on Tue Jul 28 2015 - 10:19:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:58 UTC