[Pcsclite-cvs-commit] PCSC/src hotplug.h,1.5,1.6 hotplug_libusb.c,1.21,1.22
rousseau@haydn.debian.org
rousseau@haydn.debian.org
Update of /cvsroot/pcsclite/PCSC/src
In directory haydn:/tmp/cvs-serv27049
Modified Files:
hotplug.h hotplug_libusb.c
Log Message:
add HPStopHotPluggables() to exit the hotplug thread
Index: hotplug.h
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/hotplug.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- hotplug.h 21 Oct 2003 20:00:53 -0000 1.5
+++ hotplug.h 18 Mar 2004 10:08:50 -0000 1.6
@@ -30,6 +30,7 @@
LONG HPSearchHotPluggables(void);
ULONG HPRegisterForHotplugEvents(void);
+ LONG HPStopHotPluggables(void);
#ifdef __cplusplus
}
Index: hotplug_libusb.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/hotplug_libusb.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- hotplug_libusb.c 23 Feb 2004 09:57:29 -0000 1.21
+++ hotplug_libusb.c 18 Mar 2004 10:08:50 -0000 1.22
@@ -48,6 +48,7 @@
static PCSCLITE_THREAD_T usbNotifyThread;
static int driverSize = -1;
+static int AraKiriHotPlug = FALSE;
/*
* keep track of PCSCLITE_MAX_READERS_CONTEXTS simultaneous drivers
@@ -290,6 +291,13 @@
}
SYS_Sleep(1);
+ if (AraKiriHotPlug)
+ {
+ int retval;
+
+ DebugLogA("Hotplug stopped");
+ pthread_exit(&retval);
+ }
} /* End of while loop */
}
@@ -318,6 +326,13 @@
SYS_ThreadCreate(&usbNotifyThread, NULL,
(LPVOID) HPEstablishUSBNotifications, 0);
+
+ return 0;
+}
+
+LONG HPStopHotPluggables()
+{
+ AraKiriHotPlug = TRUE;
return 0;
}