gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-129-g77a2424
Date: Thu, 24 Feb 2011 17:44:47 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  77a24241b614dcb2a405094e7f86fe8a628949de (commit)
      from  7e1879854a887a992e58b7272b1728d4b6653dbe (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=77a24241b614dcb2a405094e7f86fe8a628949de


commit 77a24241b614dcb2a405094e7f86fe8a628949de
Author: Sandro Santilli <address@hidden>
Date:   Thu Feb 24 17:47:52 2011 +0100

    Provide lock(mutex) and unlock(mutex) free functions to provide an 
implementation for boost versions 1.34.1. Note that implementation for 1.34.1 
and lower uses headers which are not meant to be public. Could be not there. 
Also, I'm not sure about consequences of those calls at runtime. Re-fixes bug 
#32579 w/out breaking lenny builds.

diff --git a/libbase/curl_adapter.cpp b/libbase/curl_adapter.cpp
index b1ca645..1b2e082 100644
--- a/libbase/curl_adapter.cpp
+++ b/libbase/curl_adapter.cpp
@@ -34,9 +34,6 @@
 #include "GnashSleep.h"
 
 #include <iostream> // std::cerr
-#include <boost/thread/mutex.hpp>
-#include <boost/version.hpp>
-#include <boost/assign/list_of.hpp>
 
 #ifndef USE_CURL
 
@@ -90,6 +87,15 @@ extern "C" {
 #include <cstdio> // cached data uses a *FILE
 #include <cstdlib> // std::getenv
 
+#include <boost/version.hpp>
+#include <boost/assign/list_of.hpp>
+#include <boost/thread/mutex.hpp>
+
+#if BOOST_VERSION < 103500
+# include <boost/thread/detail/lock.hpp>
+#endif
+
+
 //#define GNASH_CURL_VERBOSE 1
 
 // define this if you want seeks back to be reported
@@ -100,6 +106,29 @@ namespace gnash {
 
 namespace {
 
+inline
+void lock(boost::mutex& mut)
+{
+#if BOOST_VERSION < 103500
+    // see https://savannah.gnu.org/bugs/index.php?32579#comment7
+    boost::detail::thread::lock_ops<boost::mutex>::lock(mut);
+#else
+    mut.lock();
+#endif
+}
+
+inline
+void unlock(boost::mutex& mut)
+{
+#if BOOST_VERSION < 103500
+    // see https://savannah.gnu.org/bugs/index.php?32579#comment7
+    boost::detail::thread::lock_ops<boost::mutex>::unlock(mut);
+#else
+    mut.unlock();
+#endif
+}
+
+
 /***********************************************************************
  *
  *  CurlSession definition and implementation
@@ -299,17 +328,17 @@ CurlSession::lockSharedHandle(CURL* handle, 
curl_lock_data data,
     switch (data) {
     case CURL_LOCK_DATA_DNS:
        //log_debug("Locking DNS cache mutex");
-       _dnscacheMutex.lock();
+       lock(_dnscacheMutex);
        //log_debug("DNS cache mutex locked");
        break;
     case CURL_LOCK_DATA_COOKIE:
        //log_debug("Locking cookies mutex");
-       _cookieMutex.lock(); 
+       lock(_cookieMutex); 
        //log_debug("Cookies mutex locked");
             break;
     case CURL_LOCK_DATA_SHARE:
        //log_debug("Locking share mutex");
-       _shareMutex.lock(); 
+       lock(_shareMutex); 
        //log_debug("Share mutex locked");
        break;
     case CURL_LOCK_DATA_SSL_SESSION:
@@ -338,15 +367,15 @@ CurlSession::unlockSharedHandle(CURL* handle, 
curl_lock_data data)
     switch (data) {
     case CURL_LOCK_DATA_DNS:
        //log_debug("Unlocking DNS cache mutex");
-       _dnscacheMutex.unlock();
+       unlock(_dnscacheMutex);
        break;
     case CURL_LOCK_DATA_COOKIE:
        //log_debug("Unlocking cookies mutex");
-       _cookieMutex.unlock();
+       unlock(_cookieMutex);
        break;
     case CURL_LOCK_DATA_SHARE:
        //log_debug("Unlocking share mutex");
-       _shareMutex.unlock();
+       unlock(_shareMutex);
        break;
     case CURL_LOCK_DATA_SSL_SESSION:
        log_error("unlockSharedHandle: SSL session locking "

-----------------------------------------------------------------------

Summary of changes:
 libbase/curl_adapter.cpp |   47 +++++++++++++++++++++++++++++++++++++--------
 1 files changed, 38 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]