From fae92a2df852992216eb24418a1dd0b676696bee Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 15 Apr 2010 16:55:34 +0100 Subject: some clean-up of lllfsthread to help me understand it, remove one extraneous close(). to be reviewed by bao. (transplanted from 17c6af7a2396f9890aab8226356a556b4d58a7d8) --- indra/llcommon/llapr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llcommon/llapr.h') diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h index b05a222b33..c1ad0bfed1 100644 --- a/indra/llcommon/llapr.h +++ b/indra/llcommon/llapr.h @@ -182,7 +182,7 @@ typedef LLAtomic32 LLAtomicU32; typedef LLAtomic32 LLAtomicS32; // File IO convenience functions. -// Returns NULL if the file fails to openm sets *sizep to file size of not NULL +// Returns NULL if the file fails to open, sets *sizep to file size if not NULL // abbreviated flags #define LL_APR_R (APR_READ) // "r" #define LL_APR_W (APR_CREATE|APR_TRUNCATE|APR_WRITE) // "w" @@ -200,7 +200,7 @@ typedef LLAtomic32 LLAtomicS32; // especially do not put some time-costly operations between open() and close(). // otherwise it might lock the APRFilePool. //there are two different apr_pools the APRFile can use: -// 1, a temperary pool passed to an APRFile function, which is used within this function and only once. +// 1, a temporary pool passed to an APRFile function, which is used within this function and only once. // 2, a global pool. // -- cgit v1.2.3 From 1c638961543909e897bc343d260f300202687723 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 15 Apr 2010 18:00:00 +0100 Subject: Supporting 'read from the end' doesn't make sense (to me), unlike 'write from the end'. Also, more comments. Also, try to avoid a seek when offset==0 in read. To be reviewed by Bao. (transplanted from 60eb013221a83ff76054ab7dcb1d07c108f51a9d) --- indra/llcommon/llapr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llcommon/llapr.h') diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h index c1ad0bfed1..08cf11e593 100644 --- a/indra/llcommon/llapr.h +++ b/indra/llcommon/llapr.h @@ -255,12 +255,12 @@ public: // Returns bytes read/written, 0 if read/write fails: static S32 readEx(const std::string& filename, void *buf, S32 offset, S32 nbytes, LLVolatileAPRPool* pool = NULL); - static S32 writeEx(const std::string& filename, void *buf, S32 offset, S32 nbytes, LLVolatileAPRPool* pool = NULL); + static S32 writeEx(const std::string& filename, void *buf, S32 offset, S32 nbytes, LLVolatileAPRPool* pool = NULL); // offset<0 means append //******************************************************************************************************************************* }; /** - * @brief Function which approprately logs error or remains quiet on + * @brief Function which appropriately logs error or remains quiet on * APR_SUCCESS. * @return Returns true if status is an error condition. */ -- cgit v1.2.3