[svn] w32pth - r9 - trunk

svn author marcus cvs at cvs.gnupg.org
Fri Jul 20 17:26:48 CEST 2007


Author: marcus
Date: 2007-07-20 17:26:16 +0200 (Fri, 20 Jul 2007)
New Revision: 9

Modified:
   trunk/ChangeLog
   trunk/README
   trunk/pth.h
   trunk/w32-pth.c
Log:
2007-07-20  Marcus Brinkmann  <marcus at g10code.de>

	* pth.h (PTH_RWLOCK_RD, PTH_RWLOCK_RW): New symbols.
	(pth_rwlock_t): New type.
	* w32-pth.c (pth_rwlock_init, pth_rwlock_acquire,
	(pth_rwlock_release): New functions.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-07-05 18:53:18 UTC (rev 8)
+++ trunk/ChangeLog	2007-07-20 15:26:16 UTC (rev 9)
@@ -1,3 +1,10 @@
+2007-07-20  Marcus Brinkmann  <marcus at g10code.de>
+
+	* pth.h (PTH_RWLOCK_RD, PTH_RWLOCK_RW): New symbols.
+	(pth_rwlock_t): New type.
+	* w32-pth.c (pth_rwlock_init, pth_rwlock_acquire,
+	(pth_rwlock_release): New functions.
+
 2007-07-05  Werner Koch  <wk at g10code.com>
 
 	Released 2.0.0 (first release). 

Modified: trunk/README
===================================================================
--- trunk/README	2007-07-05 18:53:18 UTC (rev 8)
+++ trunk/README	2007-07-20 15:26:16 UTC (rev 9)
@@ -10,12 +10,13 @@
 It is currently limited to what GnuPG 2.0 requires.
 
 
-
 Missing stuff:
 
   PTH_MODE_STATIC is known but ignored.
   PTH_MODE_REUSE
   PTH_MODE_CHAIN
 
+  rwlock - currently just a mutex
+
   as well as many more things.
 

Modified: trunk/pth.h
===================================================================
--- trunk/pth.h	2007-07-05 18:53:18 UTC (rev 8)
+++ trunk/pth.h	2007-07-20 15:26:16 UTC (rev 9)
@@ -74,7 +74,17 @@
 /* Note: We can't do static initialization, thus we don't define the
    initializer PTH_MUTEX_INIT.  */
 
+/* Read-write lock values.  */
+enum
+  {
+    PTH_RWLOCK_RD,
+    PTH_RWLOCK_RW
+  };
 
+/* Note: We can't do static initialization, thus we don't define the
+   initializer PTH_RWLOCK_INIT.  */
+
+
 #define PTH_KEY_INIT	       (1<<0)
 
 
@@ -179,7 +189,10 @@
 /* The Mutex object.  */
 typedef W32_PTH_HANDLE_INTERNAL pth_mutex_t;
 
+/* The read-write lock object.  */
+typedef W32_PTH_HANDLE_INTERNAL pth_rwlock_t;
 
+
 /* The Event object.  */
 struct pth_event_s;
 typedef struct pth_event_s *pth_event_t;
@@ -224,7 +237,11 @@
 int pth_mutex_acquire(pth_mutex_t *hd, int try_only, pth_event_t ev_extra);
 int pth_mutex_init (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);
+int pth_rwlock_release (pth_rwlock_t *rwlock);
 
+
 pth_attr_t pth_attr_new (void);
 int pth_attr_destroy (pth_attr_t hd);
 int pth_attr_set (pth_attr_t hd, int field, ...);

Modified: trunk/w32-pth.c
===================================================================
--- trunk/w32-pth.c	2007-07-05 18:53:18 UTC (rev 8)
+++ trunk/w32-pth.c	2007-07-20 15:26:16 UTC (rev 9)
@@ -804,6 +804,29 @@
 }
 
 
+int
+pth_rwlock_init (pth_rwlock_t *rwlock)
+{
+  /* FIXME */
+  return pth_mutex_init (rwlock);
+}
+
+
+int
+pth_rwlock_acquire (pth_rwlock_t *rwlock, int op, int try, pth_event_t ev)
+{
+  /* FIXME */
+  return pth_mutex_acquire (rwlock, try, ev);
+}
+
+int
+pth_rwlock_release (pth_rwlock_t *rwlock)
+{
+  /* FIXME */
+  return pth_mutex_release (rwlock);
+}
+
+
 pth_attr_t
 pth_attr_new (void)
 {




More information about the Gnupg-commits mailing list