diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-16 13:59:09 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-16 13:59:09 +0200 |
commit | b5f3387357ffa11e238ddfe0fa38af4fffba6081 (patch) | |
tree | 80447feb5aac91ca4d515ae373167efca4dea9ca /runtime/srUtils.h | |
parent | cf1289737659a8a807419b51566613c9fb776005 (diff) | |
parent | aef1a38fe8c7472362904b2f90c67113b21034ab (diff) | |
download | rsyslog-b5f3387357ffa11e238ddfe0fa38af4fffba6081.tar.gz rsyslog-b5f3387357ffa11e238ddfe0fa38af4fffba6081.tar.xz rsyslog-b5f3387357ffa11e238ddfe0fa38af4fffba6081.zip |
Merge branch 'omfile' into v5-devel
Note that this was NOT a trivial merge, and there may be
some issues. This needs to be seen when we continue developing.
Conflicts:
runtime/msg.h
runtime/obj.h
runtime/queue.c
runtime/srUtils.h
runtime/stream.c
runtime/stream.h
runtime/wti.c
tests/Makefile.am
tools/omfile.c
tools/syslogd.c
Diffstat (limited to 'runtime/srUtils.h')
-rw-r--r-- | runtime/srUtils.h | 4 |
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); |