diff options
author | Dave Parks <davep@lindenlab.com> | 2009-12-18 13:24:29 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2009-12-18 13:24:29 -0600 |
commit | 6aa71844a8949ab3c75b6cbe1a5f8cb811aa27b8 (patch) | |
tree | e73b1d2847a33c7568688f85265913a69d1711a2 /indra/llcommon | |
parent | 5015886e1763887f534321790d56b6cee5a75dfa (diff) | |
parent | d5b53eb483ec042d83859ec957dce7699c7469aa (diff) |
Merge with viewer-2-0
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/llapp.h | 8 | ||||
-rw-r--r-- | indra/llcommon/llapr.h | 8 | ||||
-rw-r--r-- | indra/llcommon/llcommon.h | 1 | ||||
-rw-r--r-- | indra/llcommon/llerror.cpp | 3 | ||||
-rw-r--r-- | indra/llcommon/llqueuedthread.cpp | 4 | ||||
-rw-r--r-- | indra/llcommon/llthread.h | 1 |
6 files changed, 16 insertions, 9 deletions
diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h index 1a052ce62d..27a52cdd99 100644 --- a/indra/llcommon/llapp.h +++ b/indra/llcommon/llapp.h @@ -34,14 +34,18 @@ #define LL_LLAPP_H #include <map> -#include "llapr.h" #include "llrun.h" #include "llsd.h" #include "lloptioninterface.h" // Forward declarations +template <typename Type> class LLAtomic32; +typedef LLAtomic32<U32> LLAtomicU32; class LLErrorThread; class LLLiveFile; +#if LL_LINUX +typedef struct siginfo siginfo_t; +#endif typedef void (*LLAppErrorHandler)(); typedef void (*LLAppChildCallback)(int pid, bool exited, int status); @@ -202,8 +206,6 @@ public: #if !LL_WINDOWS static U32 getSigChildCount(); static void incSigChildCount(); -#else -#define getpid GetCurrentProcessId #endif static int getPid(); diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h index b08bb617c5..b05a222b33 100644 --- a/indra/llcommon/llapr.h +++ b/indra/llcommon/llapr.h @@ -38,6 +38,14 @@ #if LL_LINUX || LL_SOLARIS #include <sys/param.h> // Need PATH_MAX in APR headers... #endif +#if LL_WINDOWS + // Limit Windows API to small and manageable set. + // If you get undefined symbols, find the appropriate + // Windows header file and include that in your .cpp file. + #define WIN32_LEAN_AND_MEAN + #include <winsock2.h> + #include <windows.h> +#endif #include <boost/noncopyable.hpp> diff --git a/indra/llcommon/llcommon.h b/indra/llcommon/llcommon.h index b36471f9f8..05eef25b21 100644 --- a/indra/llcommon/llcommon.h +++ b/indra/llcommon/llcommon.h @@ -33,7 +33,6 @@ #define LL_COMMON_H // *TODO: remove these? -#include "llapr.h" #include "lltimer.h" #include "llfile.h" diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 77c0c2294a..bd334a6654 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -45,9 +45,6 @@ # include <syslog.h> # include <unistd.h> #endif // !LL_WINDOWS -#if LL_WINDOWS -# include <windows.h> -#endif // LL_WINDOWS #include <vector> #include "llapp.h" diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp index eacbbb3ee0..06ceeb2bc3 100644 --- a/indra/llcommon/llqueuedthread.cpp +++ b/indra/llcommon/llqueuedthread.cpp @@ -437,6 +437,7 @@ S32 LLQueuedThread::processNextRequest() if (req) { // process request + U32 start_priority = req->getPriority(); bool complete = req->processRequest(); if (complete) @@ -457,9 +458,8 @@ S32 LLQueuedThread::processNextRequest() lockData(); req->setStatus(STATUS_QUEUED); mRequestQueue.insert(req); - U32 priority = req->getPriority(); unlockData(); - if (priority < PRIORITY_NORMAL) + if (mThreaded && start_priority <= PRIORITY_LOW) { ms_sleep(1); // sleep the thread a little } diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index 72c39f2e93..f8c7efa7cc 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -34,6 +34,7 @@ #define LL_LLTHREAD_H
#include "llapp.h"
+#include "llapr.h"
#include "apr_thread_cond.h"
class LLThread;
|