[Pcsclite-cvs-commit] r2378 - trunk/PCSC/src

Ludovic Rousseau rousseau at alioth.debian.org
Mon Feb 5 14:16:19 CET 2007


Author: rousseau
Date: 2007-02-05 14:16:18 +0100 (Mon, 05 Feb 2007)
New Revision: 2378

Modified:
   trunk/PCSC/src/pcscd.h.in
   trunk/PCSC/src/winscard.c
Log:
define and use PCSCLITE_LOCK_POLL_RATE as SYS_USleep() argument when
waiting after a lock


Modified: trunk/PCSC/src/pcscd.h.in
===================================================================
--- trunk/PCSC/src/pcscd.h.in	2007-02-05 13:13:56 UTC (rev 2377)
+++ trunk/PCSC/src/pcscd.h.in	2007-02-05 13:16:18 UTC (rev 2378)
@@ -44,6 +44,7 @@
 #define PCSCLITE_CLIENT_ATTEMPTS	120		/**< Attempts to reach sv */
 #define PCSCLITE_MCLIENT_ATTEMPTS	20		/**< Attempts to reach sv */
 #define PCSCLITE_STATUS_POLL_RATE	400000		/**< Status polling rate */
+#define PCSCLITE_LOCK_POLL_RATE		100000		/**< Lock polling rate */
 #define PCSCLITE_MSG_KEY_LEN		16		/**< App ID key length */
 #define PCSCLITE_RW_ATTEMPTS		100		/**< Attempts to rd/wrt */
 

Modified: trunk/PCSC/src/winscard.c
===================================================================
--- trunk/PCSC/src/winscard.c	2007-02-05 13:13:56 UTC (rev 2377)
+++ trunk/PCSC/src/winscard.c	2007-02-05 13:16:18 UTC (rev 2378)
@@ -334,7 +334,7 @@
 	{
 		Log1(PCSC_LOG_INFO, "Waiting for release of lock");
 		while (rContext->dwLockId != 0)
-			SYS_USleep(100000);
+			SYS_USleep(PCSCLITE_LOCK_POLL_RATE);
 		Log1(PCSC_LOG_INFO, "Lock released");
 
 		/* Allow the status thread to convey information */
@@ -821,7 +821,7 @@
 	{
 		Log1(PCSC_LOG_INFO, "Waiting for release of lock");
 		while (rContext->dwLockId != 0)
-			SYS_USleep(100000);
+			SYS_USleep(PCSCLITE_LOCK_POLL_RATE);
 		Log1(PCSC_LOG_INFO, "Lock released");
 	}
 
@@ -1003,7 +1003,7 @@
 
 	rv = RFLockSharing(hCard);
 	if (SCARD_E_SHARING_VIOLATION == rv)
-		SYS_USleep(100000);
+		SYS_USleep(PCSCLITE_LOCK_POLL_RATE);
 
 	Log2(PCSC_LOG_DEBUG, "Status: 0x%08X", rv);
 




More information about the Pcsclite-cvs-commit mailing list