Closed cocalele closed 2 months ago
U* alloc() {
AutoSpinLock _l(&lock);
if (free_obj_queue.is_empty())
return NULL;
return free_obj_queue.dequeue(); //TODO: double locked here!!
}
Has fixed in commit bb78c76d
Too many spinlocks, 1) in PfFixedSizeQueue , there's spinlock protected. 2) in PfEventQueue, there's also a spinlock.
each time
post_event
is called, the two spinlock will be both acquired.