steal
struct tdq *steal;
steal = TDQ_CPU(cpu);
if (TDQ_LOAD(steal) < steal_thresh ||
TDQ_TRANSFERABLE(steal) == 0)
if (TDQ_TRYLOCK_FLAGS(steal, MTX_DUPOK) == 0) {
if (TDQ_LOAD(steal) < steal_thresh ||
TDQ_TRANSFERABLE(steal) == 0 ||
tdq_unlock_pair(tdq, steal);
if (tdq_move(steal, tdq) != -1)
tdq_unlock_pair(tdq, steal);
TDQ_UNLOCK(steal);
struct tdq *steal;
steal = TDQ_CPU(cpu);
if (TDQ_LOAD(steal) < steal_thresh ||
TDQ_TRANSFERABLE(steal) == 0)
if (TDQ_TRYLOCK_FLAGS(steal, MTX_DUPOK) == 0)
if (TDQ_LOAD(steal) < steal_thresh ||
TDQ_TRANSFERABLE(steal) == 0) {
TDQ_UNLOCK(steal);
if (tdq_move(steal, tdq) == -1) {
TDQ_UNLOCK(steal);
TDQ_UNLOCK(steal);
return steal(&ctx);
return steal(&q);