changeset 7943:7b8aca1cdf0a

octave_mutex initialization fixes
author John W. Eaton <jwe@octave.org>
date Fri, 18 Jul 2008 13:00:52 -0400
parents db6478d9c669
children c2449e91f50a
files liboctave/ChangeLog liboctave/oct-mutex.cc liboctave/oct-mutex.h
diffstat 3 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/ChangeLog	Thu Jul 17 14:25:11 2008 -0400
+++ b/liboctave/ChangeLog	Fri Jul 18 13:00:52 2008 -0400
@@ -1,3 +1,10 @@
+2008-07-18  John W. Eaton  <jwe@octave.org>
+
+	* oct-mutex.h (octave_mutex::octave_mutex (int)): Initialize rep
+	to 0, not count.
+	* oct-mutex.cc (octave_mutex::octave_mutex (void)): Set rep->count
+	to 1 instead of incrementing it.
+
 2008-07-17  Michael Goffioul  <michael.goffioul@gmail.com>
 
 	* dNDArray.cc: Do not include ctor NDArray(Array<octave_idx_type>,
--- a/liboctave/oct-mutex.cc	Thu Jul 17 14:25:11 2008 -0400
+++ b/liboctave/oct-mutex.cc	Fri Jul 18 13:00:52 2008 -0400
@@ -127,5 +127,5 @@
 #else
   rep = new octave_default_mutex ();
 #endif
-  rep->count++;
+  rep->count = 1;
 }
--- a/liboctave/oct-mutex.h	Thu Jul 17 14:25:11 2008 -0400
+++ b/liboctave/oct-mutex.h	Fri Jul 18 13:00:52 2008 -0400
@@ -67,7 +67,7 @@
 
 protected:
     explicit octave_mutex (int /* dummy */)
-	: count (0) { }
+	: rep (0) { }
 
 protected:
     union