Skip to content

Commit

Permalink
Do not use HAVE_PTHREAD_CANCEL
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
LudovicRousseau committed May 5, 2024
1 parent 6e264f3 commit 5be4f45
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/eventhandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5be4f45

Please sign in to comment.