[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 10/28: Add missing spinlock initializers
From: |
Samuel Thibault |
Subject: |
[hurd] 10/28: Add missing spinlock initializers |
Date: |
Wed, 16 Nov 2016 08:30:26 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit ccfdec8708430e4255b4d24424aafbd0d5f4c32d
Author: Samuel Thibault <address@hidden>
Date: Tue Nov 1 15:00:51 2016 +0100
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.
---
ext2fs/ext2fs.c | 3 +++
ext2fs/ext2fs.h | 4 ++--
libtreefs/xinl.c | 2 ++
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ext2fs/ext2fs.c b/ext2fs/ext2fs.c
index 1ead6d2..4f38c92 100644
--- a/ext2fs/ext2fs.c
+++ b/ext2fs/ext2fs.c
@@ -55,6 +55,9 @@ struct store *store;
struct store_parsed *store_parsed;
char *diskfs_disk_name;
+
+pthread_spinlock_t global_lock = PTHREAD_SPINLOCK_INITIALIZER;
+pthread_spinlock_t modified_global_blocks_lock = PTHREAD_SPINLOCK_INITIALIZER;
#ifdef EXT2FS_DEBUG
int ext2_debug_flag;
diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h
index afcd25c..a3d22b2 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);
diff --git a/libtreefs/xinl.c b/libtreefs/xinl.c
index fe83e5a..ca7073a 100644
--- a/libtreefs/xinl.c
+++ b/libtreefs/xinl.c
@@ -1,3 +1,5 @@
#define TREEFS_DEFINE_EI
#include "treefs.h"
#include "mig-decls.h"
+
+pthread_spinlock_t treefs_node_refcnt_lock = PTHREAD_SPINLOCK_INITIALIZER;
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 12/28: boot: Use the smallest possible name when inserting rights., (continued)
- [hurd] 12/28: boot: Use the smallest possible name when inserting rights., Samuel Thibault, 2016/11/16
- [hurd] 15/28: boot: restore terminal state on exit, Samuel Thibault, 2016/11/16
- [hurd] 18/28: boot: Tidy up the argument parser., Samuel Thibault, 2016/11/16
- [hurd] 24/28: eth-multiplexer: Avoid local definitions., Samuel Thibault, 2016/11/16
- [hurd] 28/28: libpager: fix returning error on data_unlock, Samuel Thibault, 2016/11/16
- [hurd] 08/28: proc: Fix new task notifications., Samuel Thibault, 2016/11/16
- [hurd] 19/28: Adjust to the fixed new task notifications., Samuel Thibault, 2016/11/16
- [hurd] 22/28: eth-multiplexer: Fix packet delivery., Samuel Thibault, 2016/11/16
- [hurd] 16/28: boot: Allow unprivileged users to boot Subhurds., Samuel Thibault, 2016/11/16
- [hurd] 17/28: boot: Add a default boot script., Samuel Thibault, 2016/11/16
- [hurd] 10/28: Add missing spinlock initializers,
Samuel Thibault <=
- [hurd] 23/28: eth-multiplexer: Fix retrieving status of virtual interfaces., Samuel Thibault, 2016/11/16
- [hurd] 26/28: boot: Improve device pass-through., Samuel Thibault, 2016/11/16
- [hurd] 25/28: eth-multiplexer: Generate stable ethernet addresses., Samuel Thibault, 2016/11/16
- [hurd] 05/28: Mark library stubs as weak, Samuel Thibault, 2016/11/16
- [hurd] 13/28: boot: Quote arguments containing spaces., Samuel Thibault, 2016/11/16
- [hurd] 09/28: boot: Remove hacks for running boot on UX., Samuel Thibault, 2016/11/16
- [hurd] 27/28: mach-defpager: Fix daemonization., Samuel Thibault, 2016/11/16
- [hurd] 07/28: libdiskfs: Factorize code for last hard reference being released, Samuel Thibault, 2016/11/16
- [hurd] 14/28: boot: Move bootscript callbacks., Samuel Thibault, 2016/11/16
- [hurd] 20/28: libbpf: Merge the Berkeley Packet Filter library., Samuel Thibault, 2016/11/16