summaryrefslogtreecommitdiff
path: root/src/target/target.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/target.h')
-rw-r--r--src/target/target.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/target/target.h b/src/target/target.h
index 0292945d..4a48e5aa 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -452,6 +452,14 @@ const char *target_state_name( struct target *target );
*/
int target_alloc_working_area(struct target *target,
uint32_t size, struct working_area **area);
+/* Same as target_alloc_working_area, except that no error is logged
+ * when ERROR_TARGET_RESOURCE_NOT_AVAILABLE is returned.
+ *
+ * This allows the calling code to *try* to allocate target memory
+ * and have a fallback to another behavior(slower?).
+ */
+int target_alloc_working_area_try(struct target *target,
+ uint32_t size, struct working_area **area);
int target_free_working_area(struct target *target, struct working_area *area);
void target_free_all_working_areas(struct target *target);