summaryrefslogtreecommitdiffstats
path: root/firmware/include
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/buflib.h8
-rw-r--r--firmware/include/core_alloc.h7
2 files changed, 6 insertions, 9 deletions
diff --git a/firmware/include/buflib.h b/firmware/include/buflib.h
index 30484431f8..e912429b1f 100644
--- a/firmware/include/buflib.h
+++ b/firmware/include/buflib.h
@@ -303,12 +303,14 @@ void buflib_buffer_in(struct buflib_context *ctx, int size);
/* debugging */
/**
- * Returns the name, as given to core_alloc() and core_allloc_ex(), of the
- * allocation associated with the given handle
+ * Returns the name, as given to buflib_alloc() and buflib_allloc_ex(), of the
+ * allocation associated with the given handle. As naming allocations
+ * is optional, there might be no name associated.
*
* handle: The handle indicating the allocation
*
- * Returns: A pointer to the string identifier of the allocation
+ * Returns: A pointer to the string identifier of the allocation, or NULL
+ * if none was specified with buflib_alloc_ex/(.
*/
const char* buflib_get_name(struct buflib_context *ctx, int handle);
diff --git a/firmware/include/core_alloc.h b/firmware/include/core_alloc.h
index 095cb5da11..67fe99dfdc 100644
--- a/firmware/include/core_alloc.h
+++ b/firmware/include/core_alloc.h
@@ -17,6 +17,7 @@ bool core_shrink(int handle, void* new_start, size_t new_size);
int core_free(int handle);
size_t core_available(void);
size_t core_allocatable(void);
+const char* core_get_name(int handle);
#ifdef DEBUG
void core_check_valid(void);
#endif
@@ -43,10 +44,4 @@ static inline void* core_get_data(int handle)
return buflib_get_data(&core_ctx, handle);
}
-static inline const char* core_get_name(int handle)
-{
- extern struct buflib_context core_ctx;
- return buflib_get_name(&core_ctx, handle);
-}
-
#endif /* __CORE_ALLOC_H__ */