summaryrefslogtreecommitdiff
path: root/ext2fs/ext2fs.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-11-01 15:00:51 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-11-01 15:00:51 +0100
commitccfdec8708430e4255b4d24424aafbd0d5f4c32d (patch)
treec3c2f2b7d00b5ebef30ebeefe73e57fa4a07d76a /ext2fs/ext2fs.h
parent14ca7bbf803d0b6f9defc28db9021dcb2e65384a (diff)
Add missing spinlock initializers
Thanks Agustina Arzille for the report * ext2fs/ext2fs.h (global_lock, modified_global_blocks_lock): Declare extern * ext2fs/ext2fs.c (global_lock, modified_global_blocks_lock): Define and initialize to PTHREAD_SPINLOCK_INITIALIZER. * libtreefs/xinl.c (treefs_node_refcnt_lock): Likewise.
Diffstat (limited to 'ext2fs/ext2fs.h')
-rw-r--r--ext2fs/ext2fs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h
index afcd25c8..a3d22b28 100644
--- a/ext2fs/ext2fs.h
+++ b/ext2fs/ext2fs.h
@@ -433,7 +433,7 @@ void write_all_disknodes ();
/* What to lock if changing global data data (e.g., the superblock or block
group descriptors or bitmaps). */
-pthread_spinlock_t global_lock;
+extern pthread_spinlock_t global_lock;
/* Where to record such changes. */
struct pokel global_pokel;
@@ -442,7 +442,7 @@ struct pokel global_pokel;
record which disk blocks are actually modified, so we don't stomp on parts
of the disk which are backed by file pagers. */
unsigned char *modified_global_blocks;
-pthread_spinlock_t modified_global_blocks_lock;
+extern pthread_spinlock_t modified_global_blocks_lock;
extern int global_block_modified (block_t block);
extern void record_global_poke (void *ptr);