Am Montag Juli 17 2006 20:53 schrieb Andreas Mohr: > for (i = 0; i < 4; i++) { > j = INDEX(i); > do { > if (list_empty(varray[i]->vec + j)) { > j = (j + 1) & TVN_MASK; > continue; > } > list_for_each_entry(nte, varray[i]->vec + j, entry) > if (time_before(nte->expires, expires)) > expires = nte->expires; > if (j < (INDEX(i)) && i < 3) > list = varray[i + 1]->vec + (INDEX(i + 1)); > goto found; > } while (j != (INDEX(i))); > } > found: is equivalent to for (i = 0; i < 4; i++) { j = INDEX(i); do { if (!list_empty(varray[i]->vec + j)) { list_for_each_entry(nte, varray[i]->vec + j, entry) if (time_before(nte->expires, expires)) expires = nte->expires; if (j < (INDEX(i)) && i < 3) list = varray[i + 1]->vec + (INDEX(i + 1)); goto found; } j = (j + 1) & TVN_MASK; } while (j != (INDEX(i))); } found: But probably the code in timer.c takes account of probabilities, thus it is a bit more obscure. HTH, -- (°= =°) //\ Prakash Punnoor /\\ V_/ \_V
Attachment:
pgp8DfN5VY7C2.pgp
Description: PGP signature
- Follow-Ups:
- References:
- Prev by Date: Re: Generic B-tree implementation
- Next by Date: Re: Bad ext3/nfs DoS bug
- Previous by thread: Re: [PATCH] fix bad macro param in timer.c
- Next by thread: offtopic boot parameter notsc [Was: Re: kernel/timer.c: next_timer_interrupt() strange/buggy(?) code (2.6.18-rc1-mm2)]
- Index(es):