]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res/res_timing_kqueue: Update the module to conform to current timer API
authorMatthew Jordan <mjordan@digium.com>
Fri, 27 Mar 2015 14:41:05 +0000 (14:41 +0000)
committerMatthew Jordan <mjordan@digium.com>
Fri, 27 Mar 2015 14:41:05 +0000 (14:41 +0000)
commit6e6f5b3a1f77f583aa08d387cdcec41a8a7908aa
treed3a4c3c81a87ecb34b637ce45bba9e62647a4185
parentb0df413fb2756559aa261b5cf3374b8216f82054
res/res_timing_kqueue: Update the module to conform to current timer API

This patch updates the kqueue timing module to conform to current timer API.

This fixes issues with using the kqueue timing source on Asterisk 13 on
FreeBSD 10. These issues include:

- Remove support for kevent64().  The values used to support Asterisk timers
  fit within 32bits and so can be handled on all platforms via kevent().

- Provide debug logging for, but do not track, unacked events.  This matches
  the behavior of all other timer implementations.

- Implement continuous mode by triggering and leaving active, a user event.
  This ensures that the file descriptor for the timer returns immediately from
  poll(), without placing the load of a high speed timer on the kernel.

- In kqueue_timer_get_max_rate(), don't overstate the capability of the timer.
  On some platforms, UINT_MAX is greater than INTPTR_MAX, the largest integer
  type kqueue supports for timers.

- In kqueue_timer_get_event(), assume the caller woke up from poll() and just
  return the mode the timer is currently in. This matches all other timer
  implementations.

- Adjust the test code now that unacked events are not tracked.

Review: https://reviewboard.asterisk.org/r/4465/

ASTERISK-24857 #close
Reported by: scsiguy
Tested by: Ed Hynan
patches:
  rb4465.patch submitted by scsiguy (License 6692)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_timing_kqueue.c