>> Another difference is that it correctly counts context switches as voluntary.
>
>Good point.  The patched version calls maybe_resched(), and I'm
>adding the line at "<<<".

This counts context switches twice (once as voluntary here, once as
involuntary when switch is done on return from the syscall).  You could
frob the count of involuntary switches here, but the uglyness of that
shows that things aren't being done right.  A direct switch as in yield()
seems best.

>(This also will let people who haven't looked at that code
>complain about the function interface - it doesn't bother me,
>macros could come later.)

I might complain about style bugs, and typedefs named priority_type,
and magic conversions between priority_type and int.

Bruce

To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to