summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-01-14 11:50:13 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-01-14 11:50:13 +0100
commit55d222543f12ba83080d4511f312265890d52c1e (patch)
tree0b6c288ae83619e479ec763f7bd8a6013e50b6af
parent262d05999029892e0550459a6361e74fed5a15fc (diff)
downloadrsyslog-55d222543f12ba83080d4511f312265890d52c1e.tar.gz
rsyslog-55d222543f12ba83080d4511f312265890d52c1e.tar.bz2
rsyslog-55d222543f12ba83080d4511f312265890d52c1e.zip
optimize: permit cancel during object destruction
1) usually, no cancellation happens 2) even if so, there is no cancellation point inside the destructors, so disabeling cancellation was mood in the first place...
-rw-r--r--runtime/obj-types.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/runtime/obj-types.h b/runtime/obj-types.h
index da27a391..30a6a2c0 100644
--- a/runtime/obj-types.h
+++ b/runtime/obj-types.h
@@ -282,14 +282,12 @@ rsRetVal objName##ClassExit(void) \
rsRetVal OBJ##Destruct(OBJ##_t __attribute__((unused)) **ppThis) \
{ \
DEFiRet; \
- int iCancelStateSave; \
OBJ##_t *pThis;
#define CODESTARTobjDestruct(OBJ) \
ASSERT(ppThis != NULL); \
pThis = *ppThis; \
- ISOBJ_TYPE_assert(pThis, OBJ); \
- pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &iCancelStateSave);
+ ISOBJ_TYPE_assert(pThis, OBJ);
/* note: there was a long-time bug in the macro below that lead to *ppThis = NULL
* only when the object was actually destructed. I discovered this issue during
@@ -309,7 +307,6 @@ rsRetVal objName##ClassExit(void) \
free(pThis); \
} \
*ppThis = NULL; \
- pthread_setcancelstate(iCancelStateSave, NULL); \
RETiRet; \
}