[svn] w32pth - r21 - trunk

svn author marcus cvs at cvs.gnupg.org
Fri Mar 21 05:23:25 CET 2008


Author: marcus
Date: 2008-03-21 05:23:25 +0100 (Fri, 21 Mar 2008)
New Revision: 21

Modified:
   trunk/ChangeLog
   trunk/TODO
   trunk/libw32pth.def
   trunk/pth.h
   trunk/w32-pth.c
Log:
2008-03-21  Marcus Brinkmann  <marcus at g10code.de>

        * pth.h (pth_mutex_destroy): New prototype.
        * w32-pth.c (pth_mutex_destroy): New function.
        * libw32pth.def: Add pth_mutex_destroy.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-02-15 19:05:23 UTC (rev 20)
+++ trunk/ChangeLog	2008-03-21 04:23:25 UTC (rev 21)
@@ -1,3 +1,9 @@
+2008-03-21  Marcus Brinkmann  <marcus at g10code.de>
+
+	* pth.h (pth_mutex_destroy): New prototype.
+	* w32-pth.c (pth_mutex_destroy): New function.
+	* libw32pth.def: Add pth_mutex_destroy.
+
 2008-02-15  Marcus Brinkmann  <marcus at g10code.de>
 
 	* w32-pth.c (map_wsa_to_errno, map_w32_to_errno): New functions.

Modified: trunk/TODO
===================================================================
--- trunk/TODO	2008-02-15 19:05:23 UTC (rev 20)
+++ trunk/TODO	2008-03-21 04:23:25 UTC (rev 21)
@@ -10,7 +10,7 @@
 * Speaking of signals, that needs to be properly implemented and 
   tested.
 
-* Dirmngr still leaks some events under load.  Find out if this is a
-  bug in dirmngr or in w32pth or a combination of both.
+* We can support static initializers for mutexes, because we can check
+  the initialization flag (or some other marker, like invalid handle)
+  before we call enter_pth.
 
-

Modified: trunk/libw32pth.def
===================================================================
--- trunk/libw32pth.def	2008-02-15 19:05:23 UTC (rev 20)
+++ trunk/libw32pth.def	2008-03-21 04:23:25 UTC (rev 21)
@@ -69,3 +69,4 @@
 
       pth_pipe @39
       pth_close @40
+      pth_mutex_destroy @41

Modified: trunk/pth.h
===================================================================
--- trunk/pth.h	2008-02-15 19:05:23 UTC (rev 20)
+++ trunk/pth.h	2008-03-21 04:23:25 UTC (rev 21)
@@ -240,6 +240,8 @@
 int pth_mutex_release (pth_mutex_t *hd);
 int pth_mutex_acquire(pth_mutex_t *hd, int try_only, pth_event_t ev_extra);
 int pth_mutex_init (pth_mutex_t *hd);
+/* We need this under windows, otherwise we would leak handles.  */
+int pth_mutex_destroy (pth_mutex_t *hd);
 
 int pth_rwlock_init (pth_rwlock_t *rwlock);
 int pth_rwlock_acquire (pth_rwlock_t *rwlock, int op, int try, pth_event_t ev);

Modified: trunk/w32-pth.c
===================================================================
--- trunk/w32-pth.c	2008-02-15 19:05:23 UTC (rev 20)
+++ trunk/w32-pth.c	2008-03-21 04:23:25 UTC (rev 21)
@@ -1037,7 +1037,21 @@
 }
 
 
+/* Destroy the mutex MUTEX.  */
 int
+pth_mutex_destroy (pth_mutex_t *mutex)
+{
+  implicit_init ();
+  enter_pth (__FUNCTION__);
+
+  CloseHandle (*mutex);
+
+  leave_pth (__FUNCTION__);
+  return TRUE;
+}
+
+
+int
 pth_rwlock_init (pth_rwlock_t *rwlock)
 {
   /* FIXME */




More information about the Gnupg-commits mailing list