[asterisk-commits] mmichelson: trunk r157820 - in /trunk: ./ build_tools/ include/asterisk/ res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Nov 19 13:37:32 CST 2008


Author: mmichelson
Date: Wed Nov 19 13:37:32 2008
New Revision: 157820

URL: http://svn.digium.com/view/asterisk?view=rev&rev=157820
Log:
Merge the changes from the res_timing_timerfd branch.

This provides a new timing interface. In order to use it,
you must be running a Linux with a kernel version of
2.6.25 or newer and glibc 2.8 or newer.

This timing interface is a good alternative if a timing
source is necessary (e.g. for IAX trunking) but DAHDI is
otherwise unnecessary for the system.

For now, this commit contains the actual work done in the
res_timing_timerfd branch. There are no notices in the README
or CHANGES files yet, but they will be added in my next commit.

The timing API of Asterisk also needs to have a bit of work done
with regards to choosing which timing interface to use. This commit
makes the choice a build-time decision, by only allowing one of
the timer interfaces to be chosen in menuselect. It would be preferable
if the choice could be made at run-time, however. The preferred timing
interface could be loaded and tested, and if it does not work, choice
number two may be used instead. That sort of thing. That is beyond
the scope of work in this branch though.


Added:
    trunk/res/res_timing_timerfd.c
      - copied unchanged from r157817, team/mmichelson/res_timing_timerfd/res/res_timing_timerfd.c
Modified:
    trunk/build_tools/menuselect-deps.in
    trunk/configure
    trunk/configure.ac
    trunk/include/asterisk/autoconfig.h.in
    trunk/makeopts.in
    trunk/res/res_timing_dahdi.c
    trunk/res/res_timing_pthread.c

Modified: trunk/build_tools/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/menuselect-deps.in?view=diff&rev=157820&r1=157819&r2=157820
==============================================================================
--- trunk/build_tools/menuselect-deps.in (original)
+++ trunk/build_tools/menuselect-deps.in Wed Nov 19 13:37:32 2008
@@ -52,3 +52,4 @@
 VPB=@PBX_VPB@
 WINARCH=@PBX_WINARCH@
 ZLIB=@PBX_ZLIB@
+TIMERFD=@PBX_TIMERFD@

Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?view=diff&rev=157820&r1=157819&r2=157820
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Wed Nov 19 13:37:32 2008
@@ -283,6 +283,7 @@
 AST_EXT_LIB_SETUP([VPB], [Voicetronix API], [vpb])
 AST_EXT_LIB_SETUP([X11], [X11 support], [x11])
 AST_EXT_LIB_SETUP([ZLIB], [zlib], [z])
+AST_EXT_LIB_SETUP([TIMERFD], [timerfd], [timerfd])
 
 # check for basic system features and functionality before
 # checking for package libraries
@@ -651,6 +652,7 @@
 AST_EXT_LIB_CHECK([CEIL], [m], [ceil])
 
 AST_C_COMPILE_CHECK([GETIFADDRS], [struct ifaddrs *p; getifaddrs(&p)], [ifaddrs.h], , [getifaddrs() support])
+AST_C_COMPILE_CHECK([TIMERFD], [timerfd_create(0,0); timerfd_settime(0,0,NULL,NULL);], [sys/timerfd.h], , [timerfd support])
 
 GSM_INTERNAL="yes"
 AC_SUBST(GSM_INTERNAL)

Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=157820&r1=157819&r2=157820
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Wed Nov 19 13:37:32 2008
@@ -993,6 +993,12 @@
 
 /* Define to 1 if you have the <termios.h> header file. */
 #undef HAVE_TERMIOS_H
+
+/* Define if your system has the TIMERFD headers. */
+#undef HAVE_TIMERFD
+
+/* Define TIMERFD headers version */
+#undef HAVE_TIMERFD_VERSION
 
 /* Define to 1 if your system defines timersub. */
 #undef HAVE_TIMERSUB
@@ -1203,9 +1209,6 @@
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
 #endif
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif
 
 /* Define like PROTOTYPES; this can be used by system headers. */
 #undef __PROTOTYPES

Modified: trunk/makeopts.in
URL: http://svn.digium.com/view/asterisk/trunk/makeopts.in?view=diff&rev=157820&r1=157819&r2=157820
==============================================================================
--- trunk/makeopts.in (original)
+++ trunk/makeopts.in Wed Nov 19 13:37:32 2008
@@ -252,3 +252,4 @@
 
 # if poll is not present, let the makefile know.
 POLL_AVAILABLE=@HAS_POLL@
+TIMERFD_INCLUDE=@TIMERFD_INCLUDE@

Modified: trunk/res/res_timing_dahdi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_timing_dahdi.c?view=diff&rev=157820&r1=157819&r2=157820
==============================================================================
--- trunk/res/res_timing_dahdi.c (original)
+++ trunk/res/res_timing_dahdi.c Wed Nov 19 13:37:32 2008
@@ -25,6 +25,8 @@
 
 /*** MODULEINFO
 	<depend>dahdi</depend>
+	<conflict>res_timing_timerfd</conflict>
+	<conflict>res_timing_pthread</conflict>
  ***/
 
 #include "asterisk.h"

Modified: trunk/res/res_timing_pthread.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_timing_pthread.c?view=diff&rev=157820&r1=157819&r2=157820
==============================================================================
--- trunk/res/res_timing_pthread.c (original)
+++ trunk/res/res_timing_pthread.c Wed Nov 19 13:37:32 2008
@@ -23,6 +23,11 @@
  * \brief pthread timing interface 
  */
 
+/*** MODULEINFO
+	<conflict>res_timing_timerfd</conflict>
+	<conflict>res_timing_dahdi</conflict>
+ ***/
+
 #include "asterisk.h"
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$");




More information about the asterisk-commits mailing list