From e055d4921b9a53e9dfedc56bbff3a9b12400d34d Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Sat, 5 Jan 2008 13:05:17 +0000 Subject: added capability for concurrent access to the msg class. Can be dynamically activated. If active, locking is employed. --- syslogd.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'syslogd.c') diff --git a/syslogd.c b/syslogd.c index abb6d16b..28060db9 100644 --- a/syslogd.c +++ b/syslogd.c @@ -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... */ -- cgit v1.2.3