patch for taking notice of UPNP_USE_RWLOCK flag in threadutil
By "Carl Benson" <carl.benson@windriver.com>:
I had to do some modifications myself though, because the Android
build system insists on having a file named "util.h" taking precedence
in its include path, libupnp gets confused because of the same filename
in upnp/src/inc/util.h
(hand cherry picked from commit 8e846368e0
)
This commit is contained in:
parent
c2fbc12362
commit
4d37927c64
13
ChangeLog
13
ChangeLog
@ -217,6 +217,19 @@ Version 1.8.0
|
||||
* Rewrote Peter Hartley's patch to include a new extra header field in
|
||||
FileInfo.
|
||||
|
||||
*******************************************************************************
|
||||
Version 1.6.9
|
||||
*******************************************************************************
|
||||
|
||||
2010-11-01 Carl Benson <carl.benson(at)windriver.com>
|
||||
|
||||
Fix for Android build.
|
||||
|
||||
I had to do some modifications myself though, because the Android
|
||||
build system insists on having a file named "util.h" taking precedence
|
||||
in its include path, libupnp gets confused because of the same filename
|
||||
in upnp/src/inc/util.h
|
||||
|
||||
*******************************************************************************
|
||||
Version 1.6.8
|
||||
*******************************************************************************
|
||||
|
1
THANKS
1
THANKS
@ -13,6 +13,7 @@ exempt of errors.
|
||||
- Arno Willig
|
||||
- Bob Ciora
|
||||
- Carlo Parata
|
||||
- Carl Benson
|
||||
- Chandra (inactiveneurons)
|
||||
- Chaos
|
||||
- Charles Nepveu (cnepveu)
|
||||
|
@ -188,7 +188,10 @@ typedef pthread_rwlockattr_t ithread_rwlockattr_t;
|
||||
* Internal Use Only
|
||||
***************************************************************************/
|
||||
#if UPNP_USE_RWLOCK
|
||||
typedef pthread_rwlock_t ithread_rwlock_t;
|
||||
typedef pthread_rwlock_t ithread_rwlock_t;
|
||||
#else
|
||||
/* Read-write locks aren't available: use mutex instead. */
|
||||
typedef ithread_mutex_t ithread_rwlock_t;
|
||||
#endif /* UPNP_USE_RWLOCK */
|
||||
|
||||
|
||||
@ -337,7 +340,7 @@ static UPNP_INLINE int ithread_cleanup_thread(void) {
|
||||
#define ithread_mutexattr_setkind_np pthread_mutexattr_settype
|
||||
#else
|
||||
#define ithread_mutexattr_setkind_np pthread_mutexattr_setkind_np
|
||||
#endif
|
||||
#endif /* UPNP_USE_RWLOCK */
|
||||
|
||||
/****************************************************************************
|
||||
* Function: ithread_mutexattr_getkind_np
|
||||
@ -362,7 +365,7 @@ static UPNP_INLINE int ithread_cleanup_thread(void) {
|
||||
#define ithread_mutexattr_getkind_np pthread_mutexattr_gettype
|
||||
#else
|
||||
#define ithread_mutexattr_getkind_np pthread_mutexattr_getkind_np
|
||||
#endif
|
||||
#endif /* UPNP_USE_RWLOCK */
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
@ -536,8 +539,10 @@ static UPNP_INLINE int ithread_cleanup_thread(void) {
|
||||
*****************************************************************************/
|
||||
#if UPNP_USE_RWLOCK
|
||||
#define ithread_rwlock_init pthread_rwlock_init
|
||||
#endif /* UPNP_USE_RWLOCK */
|
||||
|
||||
#else
|
||||
/* Read-write locks aren't available: use mutex instead. */
|
||||
#define ithread_rwlock_init ithread_mutex_init
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Function: ithread_rwlock_rdlock
|
||||
@ -555,9 +560,11 @@ static UPNP_INLINE int ithread_cleanup_thread(void) {
|
||||
*****************************************************************************/
|
||||
#if UPNP_USE_RWLOCK
|
||||
#define ithread_rwlock_rdlock pthread_rwlock_rdlock
|
||||
#else
|
||||
/* Read-write locks aren't available: use mutex instead. */
|
||||
#define ithread_rwlock_rdlock ithread_mutex_lock
|
||||
#endif /* UPNP_USE_RWLOCK */
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Function: ithread_rwlock_wrlock
|
||||
*
|
||||
@ -574,6 +581,9 @@ static UPNP_INLINE int ithread_cleanup_thread(void) {
|
||||
*****************************************************************************/
|
||||
#if UPNP_USE_RWLOCK
|
||||
#define ithread_rwlock_wrlock pthread_rwlock_wrlock
|
||||
#else
|
||||
/* Read-write locks aren't available: use mutex instead. */
|
||||
#define ithread_rwlock_wrlock ithread_mutex_lock
|
||||
#endif /* UPNP_USE_RWLOCK */
|
||||
|
||||
|
||||
@ -594,6 +604,9 @@ static UPNP_INLINE int ithread_cleanup_thread(void) {
|
||||
*****************************************************************************/
|
||||
#if UPNP_USE_RWLOCK
|
||||
#define ithread_rwlock_unlock pthread_rwlock_unlock
|
||||
#else
|
||||
/* Read-write locks aren't available: use mutex instead. */
|
||||
#define ithread_rwlock_unlock ithread_mutex_unlock
|
||||
#endif /* UPNP_USE_RWLOCK */
|
||||
|
||||
|
||||
@ -615,6 +628,9 @@ static UPNP_INLINE int ithread_cleanup_thread(void) {
|
||||
*****************************************************************************/
|
||||
#if UPNP_USE_RWLOCK
|
||||
#define ithread_rwlock_destroy pthread_rwlock_destroy
|
||||
#else
|
||||
/* Read-write locks aren't available: use mutex instead. */
|
||||
#define ithread_rwlock_destroy ithread_mutex_destroy
|
||||
#endif /* UPNP_USE_RWLOCK */
|
||||
|
||||
|
||||
|
@ -122,6 +122,7 @@ ithread_mutex_t GlobalClientSubscribeMutex;
|
||||
/*! rwlock to synchronize handles (root device or control point handle). */
|
||||
ithread_rwlock_t GlobalHndRWLock;
|
||||
|
||||
|
||||
/*! Mutex to synchronize the uuid creation process. */
|
||||
ithread_mutex_t gUUIDMutex;
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
||||
#include "ThreadPool.h"
|
||||
#include "unixutil.h" /* for socklen_t, EAFNOSUPPORT */
|
||||
#include "upnpapi.h"
|
||||
#include "util.h"
|
||||
#include "upnputil.h"
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include <assert.h>
|
||||
#include "util.h"
|
||||
#include "upnputil.h"
|
||||
#include "membuffer.h"
|
||||
#include "httpparser.h"
|
||||
#include "statcodes.h"
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "util.h"
|
||||
#include "upnputil.h"
|
||||
#include "statcodes.h"
|
||||
|
||||
#ifdef WIN32
|
||||
|
@ -52,7 +52,7 @@
|
||||
#include "unixutil.h"
|
||||
#include "upnp.h"
|
||||
#include "upnpapi.h"
|
||||
#include "util.h"
|
||||
#include "upnputil.h"
|
||||
#include "VirtualDir.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "upnp.h"
|
||||
#include "util.h"
|
||||
#include "upnputil.h"
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include "LinkedList.h"
|
||||
#include "membuffer.h"
|
||||
#include "uri.h"
|
||||
#include "util.h"
|
||||
#include "upnputil.h"
|
||||
|
||||
|
||||
////// private types ////////////
|
||||
|
@ -33,7 +33,7 @@
|
||||
#define GENLIB_NET_HTTP_HTTPREADWRITE_H
|
||||
|
||||
#include "config.h"
|
||||
#include "util.h"
|
||||
#include "upnputil.h"
|
||||
#include "sock.h"
|
||||
#include "httpparser.h"
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "util.h"
|
||||
#include "upnputil.h"
|
||||
|
||||
#define MINVAL( a, b ) ( (a) < (b) ? (a) : (b) )
|
||||
#define MAXVAL( a, b ) ( (a) > (b) ? (a) : (b) )
|
||||
|
@ -32,7 +32,7 @@
|
||||
#ifndef GENLIB_NET_HTTP_PARSETOOLS_H
|
||||
#define GENLIB_NET_HTTP_PARSETOOLS_H
|
||||
|
||||
#include "util.h"
|
||||
#include "upnputil.h"
|
||||
#include "httpparser.h"
|
||||
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
* \file
|
||||
*/
|
||||
|
||||
#include "util.h"
|
||||
#include "upnputil.h"
|
||||
|
||||
#ifdef WIN32
|
||||
/* Do not #include <netinet/in.h> */
|
||||
|
@ -33,7 +33,7 @@
|
||||
#define GENLIB_UTIL_STRINTMAP_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "util.h"
|
||||
#include "upnputil.h"
|
||||
|
||||
// Util to map from a string to an integer and vice versa
|
||||
|
||||
|
@ -109,10 +109,8 @@ struct Handle_Info
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
extern ithread_rwlock_t GlobalHndRWLock;
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Get handle information.
|
||||
*
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include "util.h"
|
||||
#include "upnputil.h"
|
||||
|
||||
|
||||
#ifdef INCLUDE_CLIENT_APIS
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "UpnpInet.h"
|
||||
#include "uri.h"
|
||||
#include "urlconfig.h"
|
||||
#include "util.h"
|
||||
#include "upnputil.h"
|
||||
#include "webserver.h"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user