Closed hendrikdonner closed 4 months ago
This was meant for the CCID repo, hope it's not too confusing :)
Maybe you want to create a PR for the CCID project?
Maybe you want to create a PR for the CCID project?
Let me see. I think you might be able to transfer this issue over to the CCID project btw.
Yes, I can transfer the patch. But it is also nice to have your name in the git history.
Yes, I can transfer the patch. But it is also nice to have your name in the git history.
I was talking about moving this issue. Anyways, PR is open on the correct repo.
I'm hunting down an issue with spurious timeouts i see since CCID 1.5.0, one problem that was noticed is that timeouts happen when e.g. the system clock jumps into the future. Very rare on the target platform, but it does happen.
This is due to the use of
CLOCK_REALTIME
forpthread_cond_timedwait
inccid_usb.c
.I'm trying out the following diff to see if it fixes my timeout issues, rough idea so far:
Notice that
libusb
itself hasCLOCK_MONOTONIC
support, see e.g.libusb/os/threads_posix.c
for a similar approach to thepthread_cond_timedwait
API. A cleaner implementation should probably check if the OS supports the relevantpthread
API calls just likelibusb
does.