diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-03-14 12:50:21 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-03-14 12:50:21 +0100 |
commit | e6aaf19689791c668ea444a21e470e4db3244cb5 (patch) | |
tree | c527a55e51001afa53a2b3ba65bd429ddecc8cd7 /runtime/queue.c | |
parent | 16cc84fc699fc3f830b0c28d677d6ae0daa35723 (diff) | |
download | rsyslog-e6aaf19689791c668ea444a21e470e4db3244cb5.tar.gz rsyslog-e6aaf19689791c668ea444a21e470e4db3244cb5.tar.xz rsyslog-e6aaf19689791c668ea444a21e470e4db3244cb5.zip |
changed statsobj interface and added better doc
Diffstat (limited to 'runtime/queue.c')
-rw-r--r-- | runtime/queue.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/runtime/queue.c b/runtime/queue.c index 5b25fcf7..621a4eed 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -1930,10 +1930,9 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */ CHKiRet(statsobj.Construct(&pThis->statsobj)); CHKiRet(statsobj.SetName(pThis->statsobj, qName)); /* we need to save the queue size, as the stats module initializes it to 0! */ - iQueueSizeSave = pThis->iQueueSize; + /* iQueueSize is a dual-use counter: no init, no mutex! */ CHKiRet(statsobj.AddCounter(pThis->statsobj, UCHAR_CONSTANT("size"), ctrType_Int, &pThis->iQueueSize)); - pThis->iQueueSize = iQueueSizeSave; STATSCOUNTER_INIT(pThis->ctrEnqueued, pThis->mutCtrEnqueued); CHKiRet(statsobj.AddCounter(pThis->statsobj, UCHAR_CONSTANT("enqueued"), @@ -1943,7 +1942,7 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */ CHKiRet(statsobj.AddCounter(pThis->statsobj, UCHAR_CONSTANT("full"), ctrType_IntCtr, &pThis->ctrFull)); - pThis->ctrMaxqsize = 0; + pThis->ctrMaxqsize = 0; /* no mutex needed, thus no init call */ CHKiRet(statsobj.AddCounter(pThis->statsobj, UCHAR_CONSTANT("maxqsize"), ctrType_Int, &pThis->ctrMaxqsize)); |