diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-15 18:33:33 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-15 18:33:33 +0200 |
commit | e53d91ce666453b114880e0619dd8c4d40072201 (patch) | |
tree | c937aeef85ab8166b07612e1568abd14e6f370a5 /threads.h | |
parent | 5b1eb920914d97aee68b674459b68e99957c80d6 (diff) | |
download | rsyslog-e53d91ce666453b114880e0619dd8c4d40072201.tar.gz rsyslog-e53d91ce666453b114880e0619dd8c4d40072201.tar.xz rsyslog-e53d91ce666453b114880e0619dd8c4d40072201.zip |
solved a recently introduced race during input thread shutdown
This was introduced when we re-enabled non-cancel thread termination
a few commits ago. This code has never been released as a tarball,
so that is no bugfix for a release but rather a WiP regression fix
and thus does not need to be mentioned in the ChangeLog.
Diffstat (limited to 'threads.h')
-rw-r--r-- | threads.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -25,7 +25,8 @@ /* the thread object */ struct thrdInfo { - pthread_mutex_t *mutTermOK; /* Is it ok to terminate that thread now? */ + pthread_mutex_t mutThrd;/* mutex for handling long-running operations and shutdown */ + pthread_cond_t condThrdTerm;/* condition: thread terminates (used just for shutdown loop) */ int bIsActive; /* Is thread running? */ int bShallStop; /* set to 1 if the thread should be stopped ? */ rsRetVal (*pUsrThrdMain)(struct thrdInfo*); /* user thread main to be called in new thread */ |