X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpagecache.h;h=ef4bf5af5740c5d710e6ac58da5cc82a07dcec70;hb=6a26177ec0df11f55bff590d63ea02e7c9884993;hp=0c8b4d673a8e1499115749378d8fca53660c8f56;hpb=302d2509b53224e828558f3f328be444adee77d6;p=libucw.git diff --git a/lib/pagecache.h b/lib/pagecache.h index 0c8b4d67..ef4bf5af 100644 --- a/lib/pagecache.h +++ b/lib/pagecache.h @@ -1,11 +1,14 @@ /* - * Sherlock Library -- File Page Cache + * UCW Library -- File Page Cache * - * (c) 1999 Martin Mares + * (c) 1999--2002 Martin Mares + * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. */ -#ifndef _SHERLOCK_PAGECACHE_H -#define _SHERLOCK_PAGECACHE_H +#ifndef _UCW_PAGECACHE_H +#define _UCW_PAGECACHE_H #include "lib/lists.h" @@ -14,7 +17,8 @@ struct page_cache; struct page { node n; /* Node in page list */ node hn; /* Node in hash table */ - sh_off_t key; /* Lower bits contain file handle */ + sh_off_t pos; + uns fd; uns flags; uns lock_count; byte data[0]; @@ -34,6 +38,5 @@ struct page *pgc_get_zero(struct page_cache *, int fd, sh_off_t); /* ... and cle void pgc_put(struct page_cache *, struct page *); /* Release page */ void pgc_mark_dirty(struct page_cache *, struct page *); /* Mark locked page as dirty */ byte *pgc_read_data(struct page_cache *, int fd, sh_off_t, uns *); /* Partial reading */ -sh_off_t pgc_page_pos(struct page_cache *, struct page *); /* Get page position */ #endif