significance of lock->__spinlock increment in spinlock.c?

Britton fsblk@aurora.uaf.edu
Mon Dec 18 15:33:00 GMT 2000


I have been trying to understand the thread code.  On smp kernels, after a
failed spin, lock->__spinlock gets incremented like this:

    lock->__spinlock += (spin_count - lock->__spinlock) / 8;

which amount to

    lock->__spinlock += (lock->__spinlock * 2 + 10 - lock->__spinlock) / 8

I am just wondering what is the significance of the numbers used in this
increment, or where can I find out?

Thanks,
Britton



More information about the Libc-alpha mailing list