diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-05 13:05:17 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-05 13:05:17 +0000 |
commit | e055d4921b9a53e9dfedc56bbff3a9b12400d34d (patch) | |
tree | 7a0969cefb4fdd6023faec7e2614d033fdb78480 /syslogd.c | |
parent | 800ac1889b99057f1e6670d4ce5941bda33b6773 (diff) | |
download | rsyslog-e055d4921b9a53e9dfedc56bbff3a9b12400d34d.tar.gz rsyslog-e055d4921b9a53e9dfedc56bbff3a9b12400d34d.tar.xz rsyslog-e055d4921b9a53e9dfedc56bbff3a9b12400d34d.zip |
added capability for concurrent access to the msg class. Can be dynamically
activated. If active, locking is employed.
Diffstat (limited to 'syslogd.c')
-rw-r--r-- | syslogd.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2338,6 +2338,7 @@ logmsg(int pri, msg_t *pMsg, int flags) */ pMsg->msgFlags = flags; + MsgPrepareEnqueue(pMsg); queueEnqObj(pMsgQueue, (void*) pMsg); } @@ -3349,6 +3350,10 @@ init(void) pDfltProgNameCmp = NULL; } + /* switch the message object to threaded operation, if necessary */ + // TODO: handle the "if" part above ;) + MsgEnableThreadSafety(); + /* create message queue */ CHKiRet_Hdlr(queueConstruct(&pMsgQueue, MainMsgQueType, iMainMsgQueueSize, msgConsumer)) { /* no queue is fatal, we need to give up in that case... */ |