[9fans] scheduler

2014-05-30 Thread erik quanstrom
the 9 schedulers guts break down to the following loop. this is the improved version, abstracted a bit (by hand) spllo(); for(;;){ for(i = Npri-1; i >= 0; i--) ->a for(p = runqueue[i]; p != nil; p = p->rproc) if(s

Re: [9fans] Compiler bug

2014-05-30 Thread Charles Forsyth
On 30 May 2014 14:03, Julius Schmidt wrote: > Comparing an int to a u16int causes the int to be cast to unsigned int, > instead of the u16int being promoted to int and then compared (as I would > argue the C89 standard specifies). Ken's compiler implements the original unsigned-preserving rule

[9fans] Compiler bug

2014-05-30 Thread Julius Schmidt
I have found what I believe to be a compiler bug: Comparing an int to a u16int causes the int to be cast to unsigned int, instead of the u16int being promoted to int and then compared (as I would argue the C89 standard specifies). As a result -1 < u is false for any u16int u. Or is this intende