aboutsummaryrefslogtreecommitdiff
path: root/include/08.heap/heap10.c
diff options
context:
space:
mode:
Diffstat (limited to 'include/08.heap/heap10.c')
-rw-r--r--include/08.heap/heap10.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/08.heap/heap10.c b/include/08.heap/heap10.c
new file mode 100644
index 0000000..15505de
--- /dev/null
+++ b/include/08.heap/heap10.c
@@ -0,0 +1,7 @@
+static uint8_t k_heapBMGetNID(uint8_t a, uint8_t b);
+static uint8_t k_heapBMGetNID(uint8_t a, uint8_t b)
+{
+ uint8_t c;
+ for (c=a+1;c==b||c==0;++c);
+ return c;
+}