Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1457996 > unrolled thread

[PATCH 3/3] radix-tree tests: properly initialize mutex

Started byRoss Zwisler <ross.zwisler@linux.intel.com>
First post2016-08-08 21:00 +0200
Last post2016-08-08 21:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/3] radix-tree tests: properly initialize mutex Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-08-08 21:00 +0200

#1457996 — [PATCH 3/3] radix-tree tests: properly initialize mutex

FromRoss Zwisler <ross.zwisler@linux.intel.com>
Date2016-08-08 21:00 +0200
Subject[PATCH 3/3] radix-tree tests: properly initialize mutex
Message-ID<s3XWi-55N-25@gated-at.bofh.it>
The pthread_mutex_t in regression1.c wasn't being initialized properly.

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
---
 tools/testing/radix-tree/regression1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/radix-tree/regression1.c b/tools/testing/radix-tree/regression1.c
index 2d03a63..0d6813a 100644
--- a/tools/testing/radix-tree/regression1.c
+++ b/tools/testing/radix-tree/regression1.c
@@ -43,7 +43,7 @@
 #include "regression.h"
 
 static RADIX_TREE(mt_tree, GFP_KERNEL);
-static pthread_mutex_t mt_lock;
+static pthread_mutex_t mt_lock = PTHREAD_MUTEX_INITIALIZER;
 
 struct page {
 	pthread_mutex_t lock;
-- 
2.9.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web