summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/rtl/rtl-allocator.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/include/rtems/rtl/rtl-allocator.h')
-rw-r--r--cpukit/include/rtems/rtl/rtl-allocator.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/cpukit/include/rtems/rtl/rtl-allocator.h b/cpukit/include/rtems/rtl/rtl-allocator.h
index 1a5d615582..da221fef68 100644
--- a/cpukit/include/rtems/rtl/rtl-allocator.h
+++ b/cpukit/include/rtems/rtl/rtl-allocator.h
@@ -50,6 +50,8 @@ typedef enum rtems_rtl_alloc_tags rtems_rtl_alloc_tag;
enum rtems_rtl_alloc_cmd {
RTEMS_RTL_ALLOC_NEW, /**< Allocate new memory. */
RTEMS_RTL_ALLOC_DEL, /**< Delete allocated memory. */
+ RTEMS_RTL_ALLOC_LOCK, /**< Lock the allocator. */
+ RTEMS_RTL_ALLOC_UNLOCK, /**< Unlock the allocator. */
RTEMS_RTL_ALLOC_WR_ENABLE, /**< Enable writes to the memory. */
RTEMS_RTL_ALLOC_WR_DISABLE, /**< Disable writes to the memory. */
};
@@ -122,6 +124,24 @@ void* rtems_rtl_alloc_new (rtems_rtl_alloc_tag tag, size_t size, bool zero);
void rtems_rtl_alloc_del (rtems_rtl_alloc_tag tag, void* address);
/**
+ * The Runtime Loader allocator lock. An allocator that depends on a
+ * separate allocation process, for example the heap, may need to be
+ * locked during loading of an object file to make sure the locality
+ * of the memory. This call be used to lock such an allocator.
+ * Allocator calls in this interface are protected by the RTL lock.
+ */
+void rtems_rtl_alloc_lock (void);
+
+/**
+ * The Runtime Loader allocator unlock. An allocator that depends on a
+ * separate allocation process, for example the heap, may need to be
+ * locked during loading of an object file to make sure the locality
+ * of the memory. This call can be used to unlock such an allocator.
+ * Allocator calls in this interface are protected by the RTL lock.
+ */
+void rtems_rtl_alloc_unlock (void);
+
+/**
* The Runtime Loader allocator enable write on a bloc of allocated memory.
*
* @param tag The type of allocation request. Must match the address.