aboutsummaryrefslogtreecommitdiff
path: root/objectivec/GPBUtilities.m
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2015-12-21 00:31:04 -0800
committerFeng Xiao <xfxyjwf@gmail.com>2015-12-21 00:34:19 -0800
commitd21780841734326d8a7653710f4f23b5366c4447 (patch)
tree25df44708c81059a3e1c7025e12b734cc80ee3f4 /objectivec/GPBUtilities.m
parent1e2fece3e01b8e079b4f6930306377a9332a2ddb (diff)
parentb27f2893b2a118b4e3bfcd23d32114dbdd4e6d9b (diff)
downloadprotobuf-d21780841734326d8a7653710f4f23b5366c4447.tar.gz
protobuf-d21780841734326d8a7653710f4f23b5366c4447.tar.bz2
protobuf-d21780841734326d8a7653710f4f23b5366c4447.zip
Merge branch master into v3.0.0-beta-2
Diffstat (limited to 'objectivec/GPBUtilities.m')
-rw-r--r--objectivec/GPBUtilities.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/objectivec/GPBUtilities.m b/objectivec/GPBUtilities.m
index 5ee61230..eaa28bbc 100644
--- a/objectivec/GPBUtilities.m
+++ b/objectivec/GPBUtilities.m
@@ -411,7 +411,7 @@ id GPBGetObjectIvarWithField(GPBMessage *self, GPBFieldDescriptor *field) {
return field.defaultValue.valueMessage;
}
- OSSpinLockLock(&self->readOnlyMutex_);
+ dispatch_semaphore_wait(self->readOnlySemaphore_, DISPATCH_TIME_FOREVER);
GPBMessage *result = GPBGetObjectIvarWithFieldNoAutocreate(self, field);
if (!result) {
// For non repeated messages, create the object, set it and return it.
@@ -420,7 +420,7 @@ id GPBGetObjectIvarWithField(GPBMessage *self, GPBFieldDescriptor *field) {
result = GPBCreateMessageWithAutocreator(field.msgClass, self, field);
GPBSetAutocreatedRetainedObjectIvarWithField(self, field, result);
}
- OSSpinLockUnlock(&self->readOnlyMutex_);
+ dispatch_semaphore_signal(self->readOnlySemaphore_);
return result;
}