This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]