Home | History | Annotate | Download | only in locks

Lines Matching defs:SPINS

236      * thrashing among many threads.  We limit spins to the head of
237 * queue. A thread spin-waits up to SPINS times (where each
242 * spins (up to MAX_HEAD_SPINS) to reduce the likelihood of
271 private static final int SPINS = (NCPU > 1) ? 1 << 6 : 0;
1035 for (int spins = -1;;) { // spin while enqueuing
1041 else if (spins < 0)
1042 spins = (m == WBIT && wtail == whead) ? SPINS : 0;
1043 else if (spins > 0) {
1045 --spins;
1063 for (int spins = -1;;) {
1066 if (spins < 0)
1067 spins = HEAD_SPINS;
1068 else if (spins < MAX_HEAD_SPINS)
1069 spins <<= 1;
1070 for (int k = spins;;) { // spin at head
1144 for (int spins = -1;;) {
1156 if (spins > 0) {
1158 --spins;
1161 if (spins == 0) {
1166 spins = SPINS;
1241 for (int spins = -1;;) {
1244 if (spins < 0)
1245 spins = HEAD_SPINS;
1246 else if (spins < MAX_HEAD_SPINS)
1247 spins <<= 1;
1248 for (int k = spins;;) { // spin at head