summaryrefslogtreecommitdiffstats
path: root/firmware/buflib.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/buflib.c')
-rw-r--r--firmware/buflib.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/buflib.c b/firmware/buflib.c
index f73c8ce4fb..098872f317 100644
--- a/firmware/buflib.c
+++ b/firmware/buflib.c
@@ -212,9 +212,13 @@ move_block(struct buflib_context* ctx, union buflib_data* block, int shift)
* in it. and protect "tmp->alloc = new_start" for buflib_get_data() */
/* call the callback before moving */
if (ops && ops->sync_callback)
+ {
ops->sync_callback(handle, true);
+ }
else
+ {
disable_irq();
+ }
bool retval = false;
if (!ops || ops->move_callback(handle, tmp->alloc, new_start)
@@ -226,9 +230,13 @@ move_block(struct buflib_context* ctx, union buflib_data* block, int shift)
}
if (ops && ops->sync_callback)
+ {
ops->sync_callback(handle, false);
+ }
else
+ {
enable_irq();
+ }
return retval;
}