[svn] w32pth - r22 - trunk
svn author marcus
cvs at cvs.gnupg.org
Fri Mar 21 15:14:43 CET 2008
Author: marcus
Date: 2008-03-21 15:14:43 +0100 (Fri, 21 Mar 2008)
New Revision: 22
Modified:
trunk/ChangeLog
trunk/libw32pth.def
trunk/pth.h
trunk/w32-pth.c
Log:
2008-03-21 Marcus Brinkmann <marcus at g10code.de>
* pth.h (pth_usleep): New prototype.
* w32-pth.c (pth_usleep): New function.
* libw32pth.def: Add pth_usleep.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-03-21 04:23:25 UTC (rev 21)
+++ trunk/ChangeLog 2008-03-21 14:14:43 UTC (rev 22)
@@ -1,5 +1,9 @@
2008-03-21 Marcus Brinkmann <marcus at g10code.de>
+ * pth.h (pth_usleep): New prototype.
+ * w32-pth.c (pth_usleep): New function.
+ * libw32pth.def: Add pth_usleep.
+
* pth.h (pth_mutex_destroy): New prototype.
* w32-pth.c (pth_mutex_destroy): New function.
* libw32pth.def: Add pth_mutex_destroy.
Modified: trunk/libw32pth.def
===================================================================
--- trunk/libw32pth.def 2008-03-21 04:23:25 UTC (rev 21)
+++ trunk/libw32pth.def 2008-03-21 14:14:43 UTC (rev 22)
@@ -70,3 +70,5 @@
pth_pipe @39
pth_close @40
pth_mutex_destroy @41
+
+ pth_usleep @42
Modified: trunk/pth.h
===================================================================
--- trunk/pth.h 2008-03-21 04:23:25 UTC (rev 21)
+++ trunk/pth.h 2008-03-21 14:14:43 UTC (rev 22)
@@ -262,6 +262,7 @@
int pth_wait (pth_event_t hd);
int pth_sleep (int n);
+int pth_usleep (unsigned int usec);
pth_time_t pth_timeout (long sec, long usec);
Modified: trunk/w32-pth.c
===================================================================
--- trunk/w32-pth.c 2008-03-21 04:23:25 UTC (rev 21)
+++ trunk/w32-pth.c 2008-03-21 14:14:43 UTC (rev 22)
@@ -2088,6 +2088,38 @@
int
+pth_usleep (unsigned int usec)
+{
+ static pth_key_t ev_key = PTH_KEY_INIT;
+ pth_event_t ev;
+
+ implicit_init ();
+ enter_pth (__FUNCTION__);
+
+ if (usec == 0)
+ {
+ leave_pth (__FUNCTION__);
+ return 0;
+ }
+
+ ev = do_pth_event (PTH_EVENT_TIME | PTH_MODE_STATIC, &ev_key,
+ pth_timeout (0, usec));
+ if (ev == NULL)
+ {
+ leave_pth (__FUNCTION__);
+ return -1;
+ }
+ do_pth_wait (ev);
+#ifdef NO_PTH_MODE_STATIC
+ do_pth_event_free (ev, PTH_FREE_THIS);
+#endif
+
+ leave_pth (__FUNCTION__);
+ return 0;
+}
+
+
+int
pth_sigmask (int how, const sigset_t *set, sigset_t *old)
{
More information about the Gnupg-commits
mailing list