From 55d222543f12ba83080d4511f312265890d52c1e Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 14 Jan 2013 11:50:13 +0100 Subject: 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... --- runtime/obj-types.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'runtime/obj-types.h') 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; \ } -- cgit v1.2.3