]> mj.ucw.cz Git - libucw.git/commitdiff
Export functions for explicit locking.
authorMartin Mares <mj@ucw.cz>
Mon, 26 Aug 2002 15:54:20 +0000 (15:54 +0000)
committerMartin Mares <mj@ucw.cz>
Mon, 26 Aug 2002 15:54:20 +0000 (15:54 +0000)
lib/bucket.c
lib/bucket.h

index 5e974eb24e448407157cfe426e8920893d690b7a..5e193407a952dc49caa1d60aebcc6cea1d286d88 100644 (file)
@@ -73,19 +73,19 @@ obuck_do_lock(int type)
     die("fcntl lock: %m");
 }
 
-static inline void
+inline void
 obuck_lock_read(void)
 {
   obuck_do_lock(F_RDLCK);
 }
 
-static inline void
+inline void
 obuck_lock_write(void)
 {
   obuck_do_lock(F_WRLCK);
 }
 
-static inline void
+inline void
 obuck_unlock(void)
 {
   obuck_do_lock(F_UNLCK);
index 80c6f43227586c18185d2ee44cc721d2b7ad32f8..24e7ae00d13c1a5d810a2eae38559de8960aa7ab 100644 (file)
@@ -42,6 +42,9 @@ struct fastbuf;
 void obuck_init(int writeable);        /* Initialize the bucket module */
 void obuck_cleanup(void);      /* Clean up the bucket module */
 void obuck_sync(void);         /* Flush all buffers to disk */
+void obuck_lock_read(void);    /* Explicit locking to make sure other threads don't touch buckets now */
+void obuck_lock_write(void);
+void obuck_unlock(void);
 
 /* Searching for buckets */
 void obuck_find_by_oid(struct obuck_header *hdrp);