caches-queues-lists: add queue_empty()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
mksquashfs: replace fragment_locked list with a queue

Replace the one-off implementation specific fragment locked list
with a generic queue.  This has both the advantage of reusing
generic infrastructure reducing code overhead, and it means
the queue and its size can be reported in the dump_status() function.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
info: add locked fragment queue to dump_state()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
info: squash dump_state() output so it again fits into a 80x24 terminal window

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
mksquashfs: add comment to unlock_fragments() saying queue_empty() is not racy

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
mksquashfs: tidy code in unlock_fragments()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
mksquashfs: rename from_reader queue to to_deflate

The from_reader queue used to collect all the data queued from
the reader thread (hence its name).  Data from the reader thread
is now queued to the to_main queue (uncompressed fragments etc.) and
to the from_reader queue, which is now soley used to queue
blocks to the deflator thread(s).  So rename to to_deflate which
now more accurately reflects how it is used.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
unsquashfs: quieten progressbar

Remove the update of the progressbar every time an inode
is written.  On a slow link/terminal this can mean unsquashfs
bottlenecks on progressbar output.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
unsquashfs: replace cond_var and pthread_cond_timedwait() with nanosleep()

Now we no longer wake up the progress bar asynchronously, we can
replace the cond_var and pthread_cond_timedwait() with a
nanosleep().

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
caches-queues-lists: fix lookup bug in seq_queue

When seq_queue was changed to using seq_next,
seq_queue_get() should have been updated.

Fortunately this bug will have only manifested
if the read-queue was set to 8GB or larger.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
Get rid of par_mksquashfs directory and README

Historical directory, kept around because of limitations
in CVS.  When the repository was moved to git I could have
deleted it, but it never occurred to me to do so, having become
used to 'ignoring' the directory and treating it as if it wasn't there!

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
info: fix prototype definition

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
info: take temporary copy of "ent"

dir_ent may get updated asyncronously while using it.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
progressbar: TIOCGWINSZ ioctl fail message should use ERROR() macro

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
mksquashfs: don't need to pass oldmask into pthread_sigmask(), it's not used later

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
mksquashfs: Get rid of fragment_waiting which is unused

It has been unused since commit 49e4f287beb66a74de3857b5fba77497d9c3753a
in 2008, which replaced code which waited for fragments to be written
to disk before writing a mult-block file, with the much better
"locked fragment" queue.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
unsquashfs: add code to implement info thread

This code adds the ability to dump the pathname of the file
being unsquashed when ^\ is hit.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
unsquashfs: add code to dump filename when ^\ is hit

This code adds the glue code to unsquashfs to create and talk
to the info thread.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
unsquashfs: use pthread_sigmask() instead of sigprocmask()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
unsquashfs: fix typos in pthread_sigmask() failure macro

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>