summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/include/rtems/bsd/bsd.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-02-13 10:31:27 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-02-13 10:34:18 +0100
commit5383ed40490ba6dd4ac9a41be269db2b0ace1787 (patch)
treea721b6c084c72cdd73f46580029b78f3cf23f1e5 /rtemsbsd/include/rtems/bsd/bsd.h
parentZONE(9): Enable UMA sysctls (diff)
downloadrtems-libbsd-5383ed40490ba6dd4ac9a41be269db2b0ace1787.tar.bz2
Add and use rtems_bsd_get_allocator_domain_size()
Diffstat (limited to 'rtemsbsd/include/rtems/bsd/bsd.h')
-rw-r--r--rtemsbsd/include/rtems/bsd/bsd.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/rtemsbsd/include/rtems/bsd/bsd.h b/rtemsbsd/include/rtems/bsd/bsd.h
index 38247a83..1014a96e 100644
--- a/rtemsbsd/include/rtems/bsd/bsd.h
+++ b/rtemsbsd/include/rtems/bsd/bsd.h
@@ -103,6 +103,26 @@ rtems_task_priority rtems_bsd_get_task_priority(const char *name);
*/
size_t rtems_bsd_get_task_stack_size(const char *name);
+typedef enum {
+ RTEMS_BSD_ALLOCATOR_DOMAIN_PAGE,
+ RTEMS_BSD_ALLOCATOR_DOMAIN_MBUF,
+ RTEMS_BSD_ALLOCATOR_DOMAIN_MALLOC
+} rtems_bsd_allocator_domain;
+
+/**
+ * @brief Returns the size for a specific allocator domain.
+ *
+ * Applications may provide their own implementation of this function. For
+ * example they can define their implementation in the same module which calls
+ * rtems_bsd_initialize().
+ *
+ * @param[in] domain The allocator domain.
+ *
+ * @return The desired size for the specified allocator domain.
+ */
+uintptr_t rtems_bsd_get_allocator_domain_size(
+ rtems_bsd_allocator_domain domain);
+
/**
* @brief Returns the Ethernet MAC address for a specified device.
*