aboutsummaryrefslogtreecommitdiff
path: root/libflash
diff options
context:
space:
mode:
authorJordan Niethe <jniethe5@gmail.com>2019-04-02 10:43:24 +1100
committerStewart Smith <stewart@linux.ibm.com>2019-05-20 14:21:57 +1000
commit6c74b8e4dda1d37ba18c2efe5caf789dcce5776b (patch)
treedda41392ba40b92a2fe3154163e884154d611e48 /libflash
parent085dbf049050ef6f4e2a0ced06b084dcb1e4ce23 (diff)
downloadskiboot-6c74b8e4dda1d37ba18c2efe5caf789dcce5776b.zip
skiboot-6c74b8e4dda1d37ba18c2efe5caf789dcce5776b.tar.gz
skiboot-6c74b8e4dda1d37ba18c2efe5caf789dcce5776b.tar.bz2
include/mem_region-malloc: Define calloc for CCAN Heap
We would like to be able to use dump_trace to dump multiple trace buffers at a time. The entries should be displayed in timestamp order. As each buffer is already ordered on timestamp, a k-way merge is an efficient method to sort the buffers together by timestamp. A heap can be used to implement a k-way merge. As CCAN is already included in Skiboot, use the CCAN heap. The heap uses the calloc function which is currently not defined in skiboot. Prepare for adding this heap by defining calloc. Remove local calloc definition from libffs.c. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'libflash')
-rw-r--r--libflash/libffs.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/libflash/libffs.c b/libflash/libffs.c
index 82caeb3..09448a0 100644
--- a/libflash/libffs.c
+++ b/libflash/libffs.c
@@ -23,14 +23,6 @@
#ifndef __SKIBOOT__
#include <sys/types.h>
#include <unistd.h>
-#else
-static void *calloc(size_t num, size_t size)
-{
- void *ptr = malloc(num * size);
- if (ptr)
- memset(ptr, 0, num * size);
- return ptr;
-}
#endif
#include "ffs.h"