aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/block_processor
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-02-22 16:04:15 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-02-22 16:04:15 +0100
commit3d444455ee62eedc91b2eeeddb01d39ec0bcfecb (patch)
tree978309540b8156ccce838bc8715fd988136a58e6 /lib/sqfs/block_processor
parenta807a45ffd64db60dc69012bef2538eaac3dac0b (diff)
Add a seperate sqfs_block_processor_sync function
This function waits for all pending blocks to be written to disk, but doesn't flush the fragment block, so processing can continue afterwards as if nothing happened. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/block_processor')
-rw-r--r--lib/sqfs/block_processor/serial.c5
-rw-r--r--lib/sqfs/block_processor/winpthread.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/sqfs/block_processor/serial.c b/lib/sqfs/block_processor/serial.c
index 2e00198..b797ca0 100644
--- a/lib/sqfs/block_processor/serial.c
+++ b/lib/sqfs/block_processor/serial.c
@@ -81,6 +81,11 @@ done:
return sproc->status;
}
+int sqfs_block_processor_sync(sqfs_block_processor_t *proc)
+{
+ return ((serial_block_processor_t *)proc)->status;
+}
+
int sqfs_block_processor_finish(sqfs_block_processor_t *proc)
{
serial_block_processor_t *sproc = (serial_block_processor_t *)proc;
diff --git a/lib/sqfs/block_processor/winpthread.c b/lib/sqfs/block_processor/winpthread.c
index 492ad6e..47408a7 100644
--- a/lib/sqfs/block_processor/winpthread.c
+++ b/lib/sqfs/block_processor/winpthread.c
@@ -523,6 +523,11 @@ int append_to_work_queue(sqfs_block_processor_t *proc, sqfs_block_t *block)
return status;
}
+int sqfs_block_processor_sync(sqfs_block_processor_t *proc)
+{
+ return append_to_work_queue(proc, NULL);
+}
+
int sqfs_block_processor_finish(sqfs_block_processor_t *proc)
{
thread_pool_processor_t *thproc = (thread_pool_processor_t *)proc;