Lines Matching defs:g_aPreemptHacks
60 static RTDARWINPREEMPTHACK g_aPreemptHacks[RTCPUSET_MAX_CPUS];
72 for (size_t i = 0; i < RT_ELEMENTS(g_aPreemptHacks); i++)
74 g_aPreemptHacks[i].pSpinLock = lck_spin_alloc_init(g_pDarwinLockGroup, LCK_ATTR_NULL);
75 if (!g_aPreemptHacks[i].pSpinLock)
89 for (size_t i = 0; i < RT_ELEMENTS(g_aPreemptHacks); i++)
90 if (g_aPreemptHacks[i].pSpinLock)
92 lck_spin_free(g_aPreemptHacks[i].pSpinLock, g_pDarwinLockGroup);
93 g_aPreemptHacks[i].pSpinLock = NULL;
143 if (RT_UNLIKELY(idCpu < RT_ELEMENTS(g_aPreemptHacks)))
145 Assert(g_aPreemptHacks[idCpu].cRecursion < UINT32_MAX / 2);
146 if (++g_aPreemptHacks[idCpu].cRecursion == 1)
148 lck_spin_t *pSpinLock = g_aPreemptHacks[idCpu].pSpinLock;
169 if (RT_UNLIKELY(idCpu < RT_ELEMENTS(g_aPreemptHacks)))
171 Assert(g_aPreemptHacks[idCpu].cRecursion > 0);
172 if (--g_aPreemptHacks[idCpu].cRecursion == 0)
174 lck_spin_t *pSpinLock = g_aPreemptHacks[idCpu].pSpinLock;