Adding --disable-notification-reordering option

Adding a configure flag to disable GENA notification reordering as even
with an imillisleep(1), this mechanism consumes too much CPU on embedded
devices when there is a burst of notifications.
This commit is contained in:
Fabrice Fontaine 2010-10-01 19:00:02 +02:00 committed by Marcelo Roberto Jimenez
parent ab54cb3dc5
commit c73d870f46
3 changed files with 16 additions and 0 deletions

View File

@ -2,6 +2,14 @@
Version 1.6.7 Version 1.6.7
******************************************************************************* *******************************************************************************
2010-10-01 Fabrice Fontaine <fabrice.fontaine(at)orange-ftgroup.com>
Adding --disable-notification-reordering option
Adding a configure flag to disable GENA notification reordering as even
with an imillisleep(1), this mechanism consumes too much CPU on embedded
devices when there is a burst of notifications.
2010-09-30 Fabrice Fontaine <fabrice.fontaine(at)orange-ftgroup.com> 2010-09-30 Fabrice Fontaine <fabrice.fontaine(at)orange-ftgroup.com>
Bug fix when there is no service in embedded devices Bug fix when there is no service in embedded devices

View File

@ -261,6 +261,11 @@ if test "x$enable_ipv6" = xyes ; then
AC_DEFINE(UPNP_ENABLE_IPV6, 1, [see upnpconfig.h]) AC_DEFINE(UPNP_ENABLE_IPV6, 1, [see upnpconfig.h])
fi fi
RT_BOOL_ARG_ENABLE([notification_reordering], [yes], [GENA notification reordering in gena_device.c])
if test "x$enable_notification_reordering" = xyes ; then
AC_DEFINE(UPNP_ENABLE_NOTIFICATION_REORDERING, 1, [see upnpconfig.h])
fi
RT_BOOL_ARG_ENABLE([samples], [yes], [compilation of upnp/sample/ code]) RT_BOOL_ARG_ENABLE([samples], [yes], [compilation of upnp/sample/ code])

View File

@ -365,6 +365,8 @@ static void genaNotifyThread(
HandleUnlock(); HandleUnlock();
return; return;
} }
#ifdef UPNP_ENABLE_NOTIFICATION_REORDERING
//If the event is out of order push it back to the job queue //If the event is out of order push it back to the job queue
if( in->eventKey != sub->ToSendEventKey ) { if( in->eventKey != sub->ToSendEventKey ) {
@ -383,6 +385,7 @@ static void genaNotifyThread(
HandleUnlock(); HandleUnlock();
return; return;
} }
#endif
HandleUnlock(); HandleUnlock();