[Bug 210093] Redundant sq initialization in kern/subr_sleepqueue

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Aug 4 19:40:44 UTC 2016


John Baldwin <jhb at FreeBSD.org> changed:

           What    |Removed                     |Added
             Status|New                         |Closed
                 CC|                            |jhb at FreeBSD.org
         Resolution|---                         |Works As Intended

--- Comment #3 from John Baldwin <jhb at FreeBSD.org> ---
If the INVARIANTS block didn't have to define a variable we probably wouldn't
do it twice.  We could fix it but it would have to be a bit uglier:

   int i;

   sq = td->td_sleepqueue;
   for (i = 0; ...) {
   sq->sq_lock = lock;

If our style permitted C99-type 'for (int i' that would be a simple way to
solve it, but it doesn't.

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-threads mailing list