diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-08-09 17:35:26 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-08-09 17:35:26 +0300 |
| commit | 489beadf61d05f40dd4ac40e4e5290502f7ad078 (patch) | |
| tree | 58241d94c3376aae6b081c6fe16288aa0f4d8593 /src/mem/ideal_alloc.c | |
| parent | 1853f5d6594bc371e4d8e631c24acd011a620915 (diff) | |
| download | gran-489beadf61d05f40dd4ac40e4e5290502f7ad078.tar.gz gran-489beadf61d05f40dd4ac40e4e5290502f7ad078.zip | |
format
Diffstat (limited to 'src/mem/ideal_alloc.c')
| -rw-r--r-- | src/mem/ideal_alloc.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mem/ideal_alloc.c b/src/mem/ideal_alloc.c index 0396123..8840a17 100644 --- a/src/mem/ideal_alloc.c +++ b/src/mem/ideal_alloc.c @@ -1,12 +1,6 @@ #include <stdlib.h> #include <gran/mem/ideal_alloc.h> -/** @todo almost everyone has the same def for reg, should maybe make common */ -struct reg { - struct packet pkt; - bool busy; -}; - struct region { uint64_t start, end; }; @@ -69,7 +63,8 @@ static void alloc_destroy(struct alloc *a) free(a); } -static stat alloc_receive(struct alloc *a, struct component *from, struct packet pkt) +static stat alloc_receive(struct alloc *a, struct component *from, + struct packet pkt) { (void)from; /* unused */ if (a->in.busy) @@ -80,7 +75,8 @@ static stat alloc_receive(struct alloc *a, struct component *from, struct packet return OK; } -static stat alloc_resp(struct alloc *a, enum alloc_if_ret resp, uint64_t start, uint64_t end) +static stat alloc_resp(struct alloc *a, enum alloc_if_ret resp, uint64_t start, + uint64_t end) { a->in.busy = false; |
