diff options
author | Jacek Antonelli | 2008-09-06 18:27:37 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:27:41 -0500 |
commit | d78e22887482056e9e29cccf2b7a8a675035d040 (patch) | |
tree | a0e0fde1b1a8f91d66c3eb84871b0a3c34947419 /linden/indra/llcommon | |
parent | Second Life viewer sources 1.21.0-RC (diff) | |
download | meta-impy-d78e22887482056e9e29cccf2b7a8a675035d040.zip meta-impy-d78e22887482056e9e29cccf2b7a8a675035d040.tar.gz meta-impy-d78e22887482056e9e29cccf2b7a8a675035d040.tar.bz2 meta-impy-d78e22887482056e9e29cccf2b7a8a675035d040.tar.xz |
Second Life viewer sources 1.21.1-RC
Diffstat (limited to 'linden/indra/llcommon')
-rw-r--r-- | linden/indra/llcommon/llapr.cpp | 22 | ||||
-rw-r--r-- | linden/indra/llcommon/llapr.h | 14 | ||||
-rw-r--r-- | linden/indra/llcommon/llthread.cpp | 12 | ||||
-rw-r--r-- | linden/indra/llcommon/llversionviewer.h | 2 |
4 files changed, 43 insertions, 7 deletions
diff --git a/linden/indra/llcommon/llapr.cpp b/linden/indra/llcommon/llapr.cpp index 73e715a..17c753d 100644 --- a/linden/indra/llcommon/llapr.cpp +++ b/linden/indra/llcommon/llapr.cpp | |||
@@ -73,6 +73,28 @@ void ll_cleanup_apr() | |||
73 | } | 73 | } |
74 | 74 | ||
75 | // | 75 | // |
76 | //LLAPRPool | ||
77 | // | ||
78 | LLAPRPool::LLAPRPool(apr_pool_t *parent, apr_size_t size) | ||
79 | { | ||
80 | mStatus = apr_pool_create(&mPool, parent); | ||
81 | |||
82 | if(size > 0) //size is the number of blocks (which is usually 4K), NOT bytes. | ||
83 | { | ||
84 | apr_allocator_t *allocator = apr_pool_allocator_get(mPool); | ||
85 | if (allocator) | ||
86 | { | ||
87 | apr_allocator_max_free_set(allocator, size) ; | ||
88 | } | ||
89 | } | ||
90 | } | ||
91 | |||
92 | LLAPRPool::~LLAPRPool() | ||
93 | { | ||
94 | apr_pool_destroy(mPool) ; | ||
95 | } | ||
96 | |||
97 | // | ||
76 | // LLScopedLock | 98 | // LLScopedLock |
77 | // | 99 | // |
78 | LLScopedLock::LLScopedLock(apr_thread_mutex_t* mutex) : mMutex(mutex) | 100 | LLScopedLock::LLScopedLock(apr_thread_mutex_t* mutex) : mMutex(mutex) |
diff --git a/linden/indra/llcommon/llapr.h b/linden/indra/llcommon/llapr.h index 323dcb2..1b91d37 100644 --- a/linden/indra/llcommon/llapr.h +++ b/linden/indra/llcommon/llapr.h | |||
@@ -60,6 +60,20 @@ void ll_init_apr(); | |||
60 | */ | 60 | */ |
61 | void ll_cleanup_apr(); | 61 | void ll_cleanup_apr(); |
62 | 62 | ||
63 | class LLAPRPool | ||
64 | { | ||
65 | public: | ||
66 | LLAPRPool(apr_pool_t *parent = NULL, apr_size_t size = 0) ; | ||
67 | ~LLAPRPool() ; | ||
68 | |||
69 | apr_pool_t* getAPRPool() {return mPool ; } | ||
70 | apr_status_t getStatus() {return mStatus ; } | ||
71 | |||
72 | private: | ||
73 | apr_pool_t* mPool ; | ||
74 | apr_status_t mStatus ; | ||
75 | } ; | ||
76 | |||
63 | /** | 77 | /** |
64 | * @class LLScopedLock | 78 | * @class LLScopedLock |
65 | * @brief Small class to help lock and unlock mutexes. | 79 | * @brief Small class to help lock and unlock mutexes. |
diff --git a/linden/indra/llcommon/llthread.cpp b/linden/indra/llcommon/llthread.cpp index e07170b..822adc2 100644 --- a/linden/indra/llcommon/llthread.cpp +++ b/linden/indra/llcommon/llthread.cpp | |||
@@ -266,12 +266,12 @@ void LLThread::wakeLocked() | |||
266 | LLMutex::LLMutex(apr_pool_t *poolp) : | 266 | LLMutex::LLMutex(apr_pool_t *poolp) : |
267 | mAPRMutexp(NULL) | 267 | mAPRMutexp(NULL) |
268 | { | 268 | { |
269 | if (poolp) | 269 | //if (poolp) |
270 | { | 270 | //{ |
271 | mIsLocalPool = FALSE; | 271 | // mIsLocalPool = FALSE; |
272 | mAPRPoolp = poolp; | 272 | // mAPRPoolp = poolp; |
273 | } | 273 | //} |
274 | else | 274 | //else |
275 | { | 275 | { |
276 | mIsLocalPool = TRUE; | 276 | mIsLocalPool = TRUE; |
277 | apr_pool_create(&mAPRPoolp, NULL); // Create a subpool for this thread | 277 | apr_pool_create(&mAPRPoolp, NULL); // Create a subpool for this thread |
diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h index 4820f68..cd7b304 100644 --- a/linden/indra/llcommon/llversionviewer.h +++ b/linden/indra/llcommon/llversionviewer.h | |||
@@ -34,7 +34,7 @@ | |||
34 | 34 | ||
35 | const S32 LL_VERSION_MAJOR = 1; | 35 | const S32 LL_VERSION_MAJOR = 1; |
36 | const S32 LL_VERSION_MINOR = 21; | 36 | const S32 LL_VERSION_MINOR = 21; |
37 | const S32 LL_VERSION_PATCH = 0; | 37 | const S32 LL_VERSION_PATCH = 1; |
38 | const S32 LL_VERSION_BUILD = 0; | 38 | const S32 LL_VERSION_BUILD = 0; |
39 | 39 | ||
40 | const char * const LL_CHANNEL = "Second Life Release"; | 40 | const char * const LL_CHANNEL = "Second Life Release"; |