Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/timer.cc4
2 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index a868a00a5..6015c4251 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2005-03-28 Christopher Faylor <cgf@timesys.com>
+ * timer.cc (timer_tracker::settime): Set times to zero when just
+ cancelling a timer.
+
+2005-03-28 Christopher Faylor <cgf@timesys.com>
+
* cygthread.cc (cygthread::detach): Revert to just waiting for thred
event since waiting for anything else is racy.
* timer.cc (timer_tracker::hcancel): Rename from cancel.
diff --git a/winsup/cygwin/timer.cc b/winsup/cygwin/timer.cc
index 60149bad4..746362779 100644
--- a/winsup/cygwin/timer.cc
+++ b/winsup/cygwin/timer.cc
@@ -230,7 +230,9 @@ timer_tracker::settime (int in_flags, const itimerspec *value, itimerspec *ovalu
if (ovalue)
gettime (ovalue);
- if (value->it_value.tv_sec || value->it_value.tv_nsec)
+ if (!value->it_value.tv_sec && !value->it_value.tv_nsec)
+ interval_us = sleepto_us = 0;
+ else
{
sleepto_us = now + to_us (value->it_value);
interval_us = to_us (value->it_interval);