summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxant <xant@dyne.org>2012-06-15 00:39:40 (GMT)
committer xant <xant@dyne.org>2012-06-15 00:39:40 (GMT)
commitc7af171f18faf86d3afa07d005b03c0a5760836d (patch)
treebd043ede1d6f5504031d3e83cc67683b0852e819
parent9196da4210e5ac4adc3d774f2b76cf989314de3c (diff)
avoid recursive locks
those could hide potential issues
-rw-r--r--core/JMXElement.h2
-rw-r--r--core/JMXElement.mm2
-rw-r--r--core/JMXImageElement.h2
-rw-r--r--entities/JMXAudioOutput.h2
-rw-r--r--entities/video_outputs/JMXOpenGLScreen.h2
5 files changed, 5 insertions, 5 deletions
diff --git a/core/JMXElement.h b/core/JMXElement.h
index 562c61b..c9fc602 100644
--- a/core/JMXElement.h
+++ b/core/JMXElement.h
@@ -16,7 +16,7 @@
@private
NSString *uid;
NSString *jsId;
- NSRecursiveLock *idLock;
+ NSLock *idLock;
}
@property (readonly) NSString *uid;
diff --git a/core/JMXElement.mm b/core/JMXElement.mm
index 3d0deea..59505cb 100644
--- a/core/JMXElement.mm
+++ b/core/JMXElement.mm
@@ -21,7 +21,7 @@ JMXV8_EXPORT_NODE_CLASS(JMXElement);
- (void)addElementAttributes
{
if (!idLock)
- idLock = [[NSRecursiveLock alloc] init];
+ idLock = [[NSLock alloc] init];
if (!uid) {
uid = [[NSString stringWithFormat:@"%8lx", [self hash]] retain];
[self addAttribute:[JMXAttribute attributeWithName:@"uid"
diff --git a/core/JMXImageElement.h b/core/JMXImageElement.h
index 4148397..ebc3550 100644
--- a/core/JMXImageElement.h
+++ b/core/JMXImageElement.h
@@ -22,7 +22,7 @@
BOOL complete;
@private
NSData *imageData;
- NSRecursiveLock *imageLock;
+ NSLock *imageLock;
}
@property (readwrite, copy) NSString *alt;
diff --git a/entities/JMXAudioOutput.h b/entities/JMXAudioOutput.h
index c1297c2..743617b 100644
--- a/entities/JMXAudioOutput.h
+++ b/entities/JMXAudioOutput.h
@@ -49,7 +49,7 @@
UInt32 wOffset;
UInt32 rOffset;
BOOL needsPrefill;
- NSRecursiveLock *writersLock;
+ NSLock *writersLock;
}
- (JMXAudioBuffer *)currentSample;
diff --git a/entities/video_outputs/JMXOpenGLScreen.h b/entities/video_outputs/JMXOpenGLScreen.h
index e32ad51..28d1a6c 100644
--- a/entities/video_outputs/JMXOpenGLScreen.h
+++ b/entities/video_outputs/JMXOpenGLScreen.h
@@ -33,7 +33,7 @@
CIContext *ciContext;
BOOL fullScreen;
NSWindow *myWindow;
- NSRecursiveLock *lock;
+ NSLock *lock;
uint64_t lastTime;
#if MAC_OS_X_VERSION_10_6