1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Refactored the deferring framework into a separate structure

This commit is contained in:
Maria Matejka
2024-04-23 17:35:00 +02:00
parent 83992ccb99
commit 21c7debff8
6 changed files with 109 additions and 42 deletions

View File

@@ -12,16 +12,10 @@
#define LOCAL_DEBUG
_Thread_local struct lfuc_unlock_queue *lfuc_unlock_queue;
void lfuc_unlock_deferred(void *_q)
void lfuc_unlock_deferred(struct deferred_call *dc)
{
struct lfuc_unlock_queue *q = _q;
for (u32 i = 0; i < q->pos; i++)
lfuc_unlock_immediately(q->block[i].c, q->block[i].el, q->block[i].ev);
free_page(q);
lfuc_unlock_queue = NULL;
struct lfuc_unlock_queue_item *luqi = SKIP_BACK(struct lfuc_unlock_queue_item, dc, dc);
lfuc_unlock_immediately(luqi->c, luqi->el, luqi->ev);
}
#if 0