version 1.7, 2007/01/09 03:48:40
|
version 1.8, 2007/01/11 16:21:54
|
|
|
{ | { |
// Throw away the lower two bits since they are almost always zero | // Throw away the lower two bits since they are almost always zero |
// anyway due to alignment properties. | // anyway due to alignment properties. |
return ((unsigned long)x >> 2) % PEGASUS_NUM_SHARED_SPIN_LOCKS; |
return ((size_t)x >> 2) % PEGASUS_NUM_SHARED_SPIN_LOCKS; |
} | } |
| |
// Call this function before forking to unlock the spinlocks in the global | // Call this function before forking to unlock the spinlocks in the global |