[Pcsclite-cvs-commit] CVS PCSC/src
CVS User rousseau
ludovic.rousseau@free.fr
Mon, 28 Feb 2005 01:40:51 -0700
Update of /cvsroot/pcsclite/PCSC/src
In directory haydn:/tmp/cvs-serv11727/src
Modified Files:
winscard_scf.c
Log Message:
remove #ifdef USE_THREAD_SAFETY since it _must_ be defined for the file
to compile
--- /cvsroot/pcsclite/PCSC/src/winscard_scf.c 2005/01/11 20:45:46 1.16
+++ /cvsroot/pcsclite/PCSC/src/winscard_scf.c 2005/02/28 08:40:50 1.17
@@ -7,7 +7,7 @@
* David Corcoran <corcoran@linuxnet.com>
* Najam Siddiqui
*
- * $Id: winscard_scf.c,v 1.16 2005/01/11 20:45:46 rousseau Exp $
+ * $Id: winscard_scf.c,v 1.17 2005/02/28 08:40:50 rousseau Exp $
*/
#include "config.h"
@@ -23,11 +23,7 @@
#include "winscard.h"
#include "debuglog.h"
-#ifdef USE_THREAD_SAFETY
#include "thread_generic.h"
-#else
-#error "client side thread safety required"
-#endif
#include "readerfactory.h"
#include "eventhandler.h"
@@ -81,7 +77,6 @@
SCF_ListenerHandle_t lHandle;
} psReaderMap[PCSCLITE_MAX_READERS_CONTEXTS];
-#ifdef USE_THREAD_SAFETY
static PCSCLITE_MUTEX clientMutex = PTHREAD_MUTEX_INITIALIZER;
/*
@@ -90,7 +85,6 @@
* so to get lock on the clientMutex may affect the performance of the ocf server.
*/
static PCSCLITE_MUTEX EventMutex = PTHREAD_MUTEX_INITIALIZER;
-#endif
static LONG isOCFServerRunning(void);
LONG SCardLockThread(void);
@@ -1449,45 +1443,28 @@
must wait to use this function
*/
-LONG SCardLockThread() {
-
-#ifdef USE_THREAD_SAFETY
+LONG SCardLockThread()
+{
return SYS_MutexLock( &clientMutex );
-#else
- return 0;
-#endif
-
}
LONG SCardEventLock()
{
-#ifdef USE_THREAD_SAFETY
return SYS_MutexLock( &EventMutex );
-#else
- return 0;
-#endif
}
/* This function unlocks a mutex so another thread
may use the client library
*/
-LONG SCardUnlockThread() {
-
-#ifdef USE_THREAD_SAFETY
+LONG SCardUnlockThread()
+{
return SYS_MutexUnLock( &clientMutex );
-#else
- return 0;
-#endif
-
}
+
LONG SCardEventUnlock()
{
-#ifdef USE_THREAD_SAFETY
return SYS_MutexUnLock( &EventMutex );
-#else
- return 0;
-#endif
}
static void EventCallback(SCF_Event_t eventType, SCF_Terminal_t hTerm,