squashfs:

- adding patch for better multi core support
This commit is contained in:
Stephan Raue 2009-12-05 12:59:34 +01:00
parent 9500a597a1
commit 0df46679da

View File

@ -0,0 +1,23 @@
diff -Naur squashfs4.0-old/squashfs-tools/mksquashfs.c squashfs4.0-new/squashfs-tools/mksquashfs.c
--- squashfs4.0-old/squashfs-tools/mksquashfs.c 2009-04-05 14:22:48.000000000 -0700
+++ squashfs4.0-new/squashfs-tools/mksquashfs.c 2009-09-14 14:25:37.000000000 -0700
@@ -1733,8 +1733,8 @@
entry->buffer->block = bytes;
bytes += compressed_size;
fragments_outstanding --;
- pthread_mutex_unlock(&fragment_mutex);
queue_put(to_writer, entry->buffer);
+ pthread_mutex_unlock(&fragment_mutex);
pthread_mutex_lock(&fragment_mutex);
TRACE("fragment_locked writing fragment %d, compressed size %d"
"\n", entry->fragment, compressed_size);
@@ -2426,8 +2426,8 @@
write_buffer->block = bytes;
bytes += compressed_size;
fragments_outstanding --;
- pthread_mutex_unlock(&fragment_mutex);
queue_put(to_writer, write_buffer);
+ pthread_mutex_unlock(&fragment_mutex);
TRACE("Writing fragment %lld, uncompressed size %d, "
"compressed size %d\n", file_buffer->block,
file_buffer->size, compressed_size);