diff options
Diffstat (limited to 'src/mem')
| -rw-r--r-- | src/mem/ideal_alloc.c | 12 | ||||
| -rw-r--r-- | src/mem/simple_mem.c | 3 |
2 files changed, 6 insertions, 9 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; diff --git a/src/mem/simple_mem.c b/src/mem/simple_mem.c index 77d8319..48a4631 100644 --- a/src/mem/simple_mem.c +++ b/src/mem/simple_mem.c @@ -31,7 +31,8 @@ static stat simple_mem_clock(struct simple_mem *mem) return OK; } -static stat simple_mem_receive(struct simple_mem *mem, struct component *from, struct packet pkt) +static stat simple_mem_receive(struct simple_mem *mem, struct component *from, + struct packet pkt) { if (mem->busy) return EBUSY; |
