diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-04-09 12:27:59 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-04-09 12:27:59 +0200 |
commit | 87a957b0f5686ec3a50c98f3d1cf3019b636e700 (patch) | |
tree | 00af9694aa29b1e97f6d9b1efff5e78323316412 /runtime/rsyslog.c | |
parent | f139dc28feb74f9c8b66736905ae7d3cacd035b6 (diff) | |
parent | 5ef852f4a3f030f61254a963b0d2dca290933e3c (diff) | |
download | rsyslog-87a957b0f5686ec3a50c98f3d1cf3019b636e700.tar.gz rsyslog-87a957b0f5686ec3a50c98f3d1cf3019b636e700.tar.bz2 rsyslog-87a957b0f5686ec3a50c98f3d1cf3019b636e700.zip |
Merge branch 'v4-stable-solaris' into beta
Conflicts:
runtime/Makefile.am
runtime/rsyslog.c
tests/nettester.c
tools/syslogd.c
Diffstat (limited to 'runtime/rsyslog.c')
-rw-r--r-- | runtime/rsyslog.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/rsyslog.c b/runtime/rsyslog.c index a76ae25a..921ad0bd 100644 --- a/runtime/rsyslog.c +++ b/runtime/rsyslog.c @@ -81,6 +81,7 @@ #include "rule.h" #include "ruleset.h" #include "parser.h" +#include "atomic.h" /* forward definitions */ static rsRetVal dfltErrLogger(int, uchar *errMsg); @@ -140,6 +141,12 @@ rsrtInit(char **ppErrObj, obj_if_t *pObjIF) CHKiRet(objClassInit(NULL)); /* *THIS* *MUST* always be the first class initilizer being called! */ CHKiRet(objGetObjInterface(pObjIF)); /* this provides the root pointer for all other queries */ +#ifndef HAVE_ATOMIC_BUILTINS +#ifdef HAVE_SEMAPHORE_H + CHKiRet(atomicSemInit()); +#endif /* HAVE_SEMAPHORE_H */ +#endif /* !defined(HAVE_ATOMIC_BUILTINS) */ + /* initialize core classes. We must be very careful with the order of events. Some * classes use others and if we do not initialize them in the right order, we may end * up with an invalid call. The most important thing that can happen is that an error @@ -216,6 +223,13 @@ rsrtExit(void) glblClassExit(); rulesetClassExit(); ruleClassExit(); + +#ifndef HAVE_ATOMIC_BUILTINS +#ifdef HAVE_SEMAPHORE_H + atomicSemExit(); +#endif /* HAVE_SEMAPHORE_H */ +#endif /* !defined(HAVE_ATOMIC_BUILTINS) */ + objClassExit(); /* *THIS* *MUST/SHOULD?* always be the first class initilizer being called (except debug)! */ } |