Messages in this thread Patch in this message |  | | | Subject | [PATCH 2.6] fix POSIX timers expire before their scheduled time | | From | "Liu, Hong" <> | | Date | Thu, 17 Mar 2005 10:20:22 +0800 |
| |
POSIX says: POSIX timers should not expire before their scheduled time.
Due to the timer started between jiffies, there are cases that the timer will expire before its scheduled time. This patch ensures timers will not expire early.
--- a/kernel/posix-timers.c 2005-03-10 15:46:27.329333664 +0800 +++ b/kernel/posix-timers.c 2005-03-10 15:50:11.884196136 +0800 @@ -957,7 +957,8 @@ &expire_64, &(timr->wall_to_prev))) { return -EINVAL; } - timr->it_timer.expires = (unsigned long)expire_64; + timr->it_timer.expires = (unsigned long)expire_64 + 1; tstojiffie(&new_setting->it_interval, clock->res, &expire_64); timr->it_incr = (unsigned long)expire_64;
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |