diff options
| author | Paul Sokolovsky | 2016-12-24 00:06:29 +0300 |
|---|---|---|
| committer | Paul Sokolovsky | 2016-12-24 00:06:29 +0300 |
| commit | 7327966da73b1c22d6658489c2a032932467e495 (patch) | |
| tree | f40b43d064f162fff6adb6bff5817b1dfa07aac8 | |
| parent | 18f12caafc8b0f7d1681d0d2a20b6fec3be9bd84 (diff) | |
extmod/modutimeq: Make time_less_than be actually "less than", not less/eq.
This fixes an obvious case of non-fair scheduling of 2 tasks with the same
deadline.
| -rw-r--r-- | extmod/modutimeq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/modutimeq.c b/extmod/modutimeq.c index acd653e77..f73b39103 100644 --- a/extmod/modutimeq.c +++ b/extmod/modutimeq.c @@ -66,7 +66,7 @@ STATIC bool time_less_than(struct qentry *item, struct qentry *parent) { if ((mp_int_t)res < 0) { res += MODULO; } - return res < (MODULO / 2); + return res && res < (MODULO / 2); } STATIC mp_obj_t utimeq_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { |
