X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fbucket.h;h=1af677cad8907556efe32502b40efa88ccf461eb;hb=271d2a02e7b798fd9781018c060d49e47f277cba;hp=a9b938bc4d9d6dea9d49906fcc0d0cf9e670327c;hpb=c6eff95276316f6c4fe39d22c81f2bf83e3d8528;p=libucw.git diff --git a/lib/bucket.h b/lib/bucket.h index a9b938bc..1af677ca 100644 --- a/lib/bucket.h +++ b/lib/bucket.h @@ -1,9 +1,15 @@ /* * Sherlock Library -- Object Buckets * - * (c) 2001 Martin Mares + * (c) 2001--2004 Martin Mares + * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. */ +#ifndef _SHERLOCK_BUCKET_H +#define _SHERLOCK_BUCKET_H + /* * Format: The object pool is merely a sequence of object buckets. * Each bucket starts with struct obuck_header and it's padded @@ -11,33 +17,82 @@ * * Locking: Each operation on the pool is protected by a flock. * - * The buckets emulate non-seekable fastbuf streams. + * The buckets emulate fastbuf streams. Read streams act as normal files, + * but there can be only one write stream which is non-seekable and you + * also shouldn't open new read streams when writing. + * + * fork()'ing if you don't have any bucket open is safe. */ +extern byte *obuck_name; /* Internal, for use by buckettool only! */ + #define OBUCK_SHIFT 7 #define OBUCK_ALIGN (1<