tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mutexes, IPL, tty locking



David Holland <dholland-tech%netbsd.org@localhost> wrote:
>       if (oldspl == highest && cur->l_iplcounts[highest-1] == 0) {
>          while (highest > 0 && cur->l_iplcounts[highest-1] == 0) {
>             highest--;
>          }

It would probably be better to use bitmask and ffs() right here, to avoid
looping through priorities.   Anyway, this is some overhead in low level
primitive to support very rare cases.   I do not think it is worth.  Also,
the case in our TTY locking should be fixed be revamping it (i.e. having
locking in drivers).

-- 
Mindaugas


Home | Main Index | Thread Index | Old Index