From 5be4f45e86e46d6b58c9da672122c87209daa10f Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau Date: Sun, 5 May 2024 22:19:54 +0200 Subject: [PATCH] Do not use HAVE_PTHREAD_CANCEL pthread_cancel(3) is used when the driver supports TAG_IFD_POLLING_THREAD_KILLABLE. This is the case for the CCID driver for ICCD version A and ICCD version B tokens. --- src/eventhandler.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/eventhandler.c b/src/eventhandler.c index 9bbf279b..c3fdabf8 100644 --- a/src/eventhandler.c +++ b/src/eventhandler.c @@ -179,14 +179,12 @@ void EHDestroyEventHandler(READER_CONTEXT * rContext) rv = IFDGetCapabilities(rContext, TAG_IFD_POLLING_THREAD_KILLABLE, &dwGetSize, ucGetData); -#ifdef HAVE_PTHREAD_CANCEL if ((IFD_SUCCESS == rv) && (1 == dwGetSize) && ucGetData[0]) { Log1(PCSC_LOG_INFO, "Killing polling thread"); (void)pthread_cancel(rContext->pthThread); } else -#endif { /* ask to stop the "polling" thread */ RESPONSECODE (*fct)(DWORD) = NULL;