aboutsummaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-08-09 17:35:26 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2025-08-09 17:35:26 +0300
commit489beadf61d05f40dd4ac40e4e5290502f7ad078 (patch)
tree58241d94c3376aae6b081c6fe16288aa0f4d8593 /src/mem
parent1853f5d6594bc371e4d8e631c24acd011a620915 (diff)
downloadgran-489beadf61d05f40dd4ac40e4e5290502f7ad078.tar.gz
gran-489beadf61d05f40dd4ac40e4e5290502f7ad078.zip
format
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/ideal_alloc.c12
-rw-r--r--src/mem/simple_mem.c3
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;