Messages in this thread | | | Date | Sat, 06 Mar 2004 14:13:28 +0100 | From | "Magnus Naeslund(t)" <> | Subject | Re: 2.4.23aa2 (bugfixes and important VM improvements for the high end) |
| |
Magnus Naeslund(t) wrote: > > But isn't this kind of code a known buggy way of implementing timeouts? > Shouldn't it be like: > > time_t x = time(0); > do { > ... > } while (time(0) - x >= TIMEOUT_IN_SECONDS);
I meant: } while (time(0) - x < TIMEOUT_IN_SECONDS);
Also if time_t is signed, that needs to be taken care of.
Magnus - butterfingers
- 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/
| |