summaryrefslogtreecommitdiffstats
path: root/runtime/srUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/srUtils.h')
-rw-r--r--runtime/srUtils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/srUtils.h b/runtime/srUtils.h
index 288e9dd7..9d6360e7 100644
--- a/runtime/srUtils.h
+++ b/runtime/srUtils.h
@@ -92,6 +92,7 @@ void srSleep(int iSeconds, int iuSeconds);
char *rs_strerror_r(int errnum, char *buf, size_t buflen);
int decodeSyslogName(uchar *name, syslogName_t *codetab);
int getSubString(uchar **ppSrc, char *pDst, size_t DstSize, char cSep);
+rsRetVal getFileSize(uchar *pszName, off_t *pSize);
/* mutex operations */
/* some macros to cancel-safe lock a mutex (it will automatically be released
@@ -126,9 +127,12 @@ int getSubString(uchar **ppSrc, char *pDst, size_t DstSize, char cSep);
bLockedOpIsLocked = 0; \
pthread_setcancelstate(iCancelStateSave, NULL); \
}
+
/* The unconditional versions of the macro always lock the mutex. They are preferred in
* complex scenarios, where the simple ones might get mixed up by multiple calls.
*/
+#define DEFVARS_mutexProtection_uncond\
+ int iCancelStateSave
#define BEGIN_MTX_PROTECTED_OPERATIONS_UNCOND(mut) \
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &iCancelStateSave); \
d_pthread_mutex_lock(mut);