AW: question about posix timer expiration

Chris Johns chrisj at
Thu May 27 00:33:14 UTC 2021

On 21/5/21 9:44 pm, Gabriel.Moyano at wrote:
> Did you compile ptpd with kqueue only? I’ve tried with posix timer, which are
> implemented in rtems, but it seems that the handler with siginfo_t is not called
> correctly. I’ve managed to get it working using a workaround but I’ll continue
> with kqueue, thx!.

Yes I did build with kqueue. I added the kqueue support to ptpdv2 because libbsd
does not support signal type events. I found this out the hard why when getting
ptpdv2 to run. I had posix timers running but libbsd threads did not wake. I
chased this down to code like ...

The state set does not include signals so the kernel does not wake the thread.

I discussed this with Sebastian at the time and agreed supporting signals in
libbsd was a lot of work and open a range of possible issues so it was simpler
to add kqueue support to ptpdv2.

I also agree with Sebastian that kqueue is a better interface than select etc
and we should encourage its use. I think ptpdv2 benefits from using kqueue over
select and posix timers.


More information about the devel mailing list