[Pcsclite-cvs-commit] PCSC/src hotplug_linux.c,1.29,1.30 hotplug_libusb.c,1.30,1.31 eventhandler.c,1.25,1.26

rousseau@haydn.debian.org rousseau@haydn.debian.org


Update of /cvsroot/pcsclite/PCSC/src
In directory haydn:/tmp/cvs-serv30642

Modified Files:
	hotplug_linux.c hotplug_libusb.c eventhandler.c 
Log Message:
use THREAD_ATTR_DETACHED in SYS_ThreadCreate() to automatically
deallocate resources allocated by the thread when the thread exits
(because the thread is not joined with SYS_ThreadJoin())


Index: hotplug_linux.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/hotplug_linux.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- hotplug_linux.c	2 Aug 2004 21:54:16 -0000	1.29
+++ hotplug_linux.c	2 Aug 2004 22:06:43 -0000	1.30
@@ -371,7 +371,7 @@
 
 	HPReadBundleValues();
 
-	SYS_ThreadCreate(&usbNotifyThread, THREAD_ATTR_DEFAULT,
+	SYS_ThreadCreate(&usbNotifyThread, THREAD_ATTR_DETACHED,
 		(PCSCLITE_THREAD_FUNCTION( )) HPEstablishUSBNotifications, 0);
 
 	return 0;

Index: hotplug_libusb.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/hotplug_libusb.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- hotplug_libusb.c	2 Aug 2004 21:54:16 -0000	1.30
+++ hotplug_libusb.c	2 Aug 2004 22:06:44 -0000	1.31
@@ -347,7 +347,7 @@
 
 	HPReadBundleValues();
 
-	SYS_ThreadCreate(&usbNotifyThread, THREAD_ATTR_DEFAULT,
+	SYS_ThreadCreate(&usbNotifyThread, THREAD_ATTR_DETACHED,
 		(PCSCLITE_THREAD_FUNCTION( )) HPEstablishUSBNotifications, 0);
 
 	return 0;

Index: eventhandler.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/eventhandler.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- eventhandler.c	2 Aug 2004 21:54:16 -0000	1.25
+++ eventhandler.c	2 Aug 2004 22:06:44 -0000	1.26
@@ -180,7 +180,7 @@
 	rContext->readerState->cardAtrLength = dwAtrLen;
 	rContext->readerState->cardProtocol = SCARD_PROTOCOL_UNSET;
 
-	rv = SYS_ThreadCreate(&rContext->pthThread, THREAD_ATTR_DEFAULT,
+	rv = SYS_ThreadCreate(&rContext->pthThread, THREAD_ATTR_DETACHED,
 		(PCSCLITE_THREAD_FUNCTION( ))EHStatusHandlerThread, (LPVOID) rContext);
 	if (rv == 1)
 		return SCARD_S_SUCCESS;