Thank you so much for that information.  The patch that was posted
solved my problem:

*** winscard_clnt.c.orig Fri May 7 10:39:27 2004
--- winscard_clnt.c Fri May 7 11:17:00 2004
*** 1461,1467 ****
--- 1462,1470 ----
                                        dwBreakFlag = 1;
                                }

+ SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
                                SYS_USleep(PCSCLITE_STATUS_WAIT);
+ SYS_MutexLock(psContextMap[dwContextIndex].mMutex);

                        } /* End of SCARD_STATE_UNKNOWN */

FYI, I am running Fedora Core 2, which has the 2.6 kernel as was noted
in the previous post.  If this is not detrimental to others, perhaps
this patch would be good to include in the libraries.

Thanks,
Carl Youngblood

On Sat, 17 Jul 2004 12:28:52 +0200, Damien Sauveron <[EMAIL PROTECTED]> wrote:
> Hi Carl,
> 
> > The other thread is the main execution thread.  The thing that is
> > happening is that the looping thread seems to be working just fine,
> > but the main thread gets stuck inside SCardGetStatusChange (pcsclite
> > library, source file: winscard_clnt.c on line 1033) trying to lock a
> > mutex.  Here's where it gets weird: The looping thread is continually
> > locking and unlocking this same mutex as it runs its various function
> > calls, but for some reason the main thread is never given the lock, as
> > if the scheduler is being completely unfair or something.  As far as I
> > know, both threads have the same priority (I have done nothing to
> > change them).
> It seems to be a starvation issue as those discuss in a previous thread (begin :
> [1] -- end [2].
> I hope it may help you.
> 
> [1] http://archives.neohapsis.com/archives/dev/muscle/2004-q2/0217.html
> [2] http://archives.neohapsis.com/archives/dev/muscle/2004-q2/0240.html
> 
> --
> Damien Sauveron
_______________________________________________
Muscle mailing list
[EMAIL PROTECTED]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to