]> mj.ucw.cz Git - libucw.git/commit
Improved and cleaned up the bucket library. The original "single operation
authorMartin Mares <mj@ucw.cz>
Sun, 7 Dec 2003 14:23:58 +0000 (14:23 +0000)
committerMartin Mares <mj@ucw.cz>
Sun, 7 Dec 2003 14:23:58 +0000 (14:23 +0000)
commited7c7b20afed72df0d4195548ec5346f1daac1d1
treee3a6b1d5420900c6300220c743b2760b16d6ddda
parentc417273915a5344349f35e332c133e19dc4cdd04
Improved and cleaned up the bucket library. The original "single operation
pending per process" invariant was no longer feasible (and it caused several
problems in Shepherd).

Reading and writing of buckets now uses dynamically allocated fastbufs and
there can be any number of readers at any time, but only a single writer
(otherwise a deadlock would occur). Read streams are seekable, write streams
at least btell()-able.

Also removed the omnipresent global variables for start of current bucket
etc., each part (Find, Slurp, Create, Shakedown, ...) has its own state
variables.

Added some more sanity checks.
lib/bucket.c
lib/bucket.h