Merge remote-tracking branch 'Aleric/master' into Cupcake
This commit is contained in:
@@ -51,6 +51,11 @@ void AIThreadID::set_current_thread_id(void)
|
||||
}
|
||||
|
||||
#ifndef LL_DARWIN
|
||||
void AIThreadID::clear(void)
|
||||
{
|
||||
mID = undefinedID;
|
||||
}
|
||||
|
||||
void AIThreadID::reset(void)
|
||||
{
|
||||
mID = lCurrentThread;
|
||||
|
||||
@@ -63,6 +63,7 @@ public:
|
||||
static void set_main_thread_id(void); // Called once to set sMainThreadID.
|
||||
static void set_current_thread_id(void); // Called once for every thread to set lCurrentThread.
|
||||
#ifndef LL_DARWIN
|
||||
LL_COMMON_API void clear(void);
|
||||
LL_COMMON_API void reset(void);
|
||||
LL_COMMON_API bool equals_current_thread(void) const;
|
||||
LL_COMMON_API static bool in_main_thread(void);
|
||||
@@ -74,6 +75,7 @@ public:
|
||||
static apr_os_thread_t getCurrentThread_inline(void) { return lCurrentThread; }
|
||||
#else
|
||||
// Both variants are inline on OS X.
|
||||
void clear(void) { mID = undefinedID; }
|
||||
void reset(void) { mID = apr_os_thread_current(); }
|
||||
void reset_inline(void) { mID = apr_os_thread_current(); }
|
||||
bool equals_current_thread(void) const { return apr_os_thread_equal(mID, apr_os_thread_current()); }
|
||||
|
||||
@@ -479,9 +479,6 @@ public:
|
||||
// Only for use by AITHREADSAFESIMPLE, see below.
|
||||
AIThreadSafeSimple(T* object) { llassert(object == AIThreadSafeBits<T>::ptr()); }
|
||||
|
||||
// If MUTEX is a LLCondition then this can be used to wake up the waiting thread.
|
||||
void signal() { mMutex.signal(); }
|
||||
|
||||
#if LL_DEBUG
|
||||
// Can only be locked when there still exists an AIAccess object that
|
||||
// references this object and will access it upon destruction.
|
||||
@@ -622,6 +619,8 @@ struct AIAccessConst
|
||||
|
||||
// If MUTEX is an LLCondition, then this can be used to wait for a signal.
|
||||
void wait() { this->mWrapper.mMutex.wait(); }
|
||||
// If MUTEX is a LLCondition then this can be used to wake up the waiting thread.
|
||||
void signal() { this->mWrapper.mMutex.signal(); }
|
||||
|
||||
protected:
|
||||
AIThreadSafeSimple<T, MUTEX>& mWrapper; //!< Reference to the object that we provide access to.
|
||||
|
||||
@@ -90,6 +90,16 @@ const S32 HTTP_VERSION_NOT_SUPPORTED = 505;
|
||||
// These status codes should not be sent over the wire
|
||||
// and indicate something went wrong internally.
|
||||
// If you get these they are not normal.
|
||||
const S32 HTTP_INTERNAL_ERROR = 499;
|
||||
// Note that these are only related to curl, not to webkit.
|
||||
const S32 HTTP_INTERNAL_ERROR_LOW_SPEED = 494; // The transfer (receiving data) stalled or was too slow.
|
||||
const S32 HTTP_INTERNAL_ERROR_CURL_LOCKUP = 495; // Curl never returned at all for 10 minutes!?!
|
||||
const S32 HTTP_INTERNAL_ERROR_CURL_BADSOCKET = 496; // Curl was aborted because the socket went bad!?!
|
||||
const S32 HTTP_INTERNAL_ERROR_CURL_TIMEOUT = 497; // Curl returned a timeout error.
|
||||
const S32 HTTP_INTERNAL_ERROR_CURL_OTHER = 498; // Any other curl error.
|
||||
const S32 HTTP_INTERNAL_ERROR_OTHER = 499; // Every other internal error.
|
||||
|
||||
// Return true if status is an internal error (not received from a server but generated internally).
|
||||
bool inline is_internal_http_error(S32 status) { return status >= HTTP_INTERNAL_ERROR_LOW_SPEED && status <= HTTP_INTERNAL_ERROR_OTHER; }
|
||||
bool inline is_internal_http_error_that_warrants_a_retry(S32 status) { return status >= HTTP_INTERNAL_ERROR_LOW_SPEED && status <= HTTP_INTERNAL_ERROR_CURL_OTHER; }
|
||||
|
||||
#endif
|
||||
|
||||
@@ -470,6 +470,7 @@ public:
|
||||
|
||||
void unref()
|
||||
{
|
||||
llassert(mRef > 0);
|
||||
if (!--mRef) delete this;
|
||||
}
|
||||
S32 getNumRefs() const
|
||||
|
||||
Reference in New Issue
Block a user