Diff
Modified: trunk/src/object.c (182 => 183)
--- trunk/src/object.c 2010-01-27 17:32:30 UTC (rev 182)
+++ trunk/src/object.c 2010-01-27 17:32:37 UTC (rev 183)
@@ -87,11 +87,9 @@
return;
}
if (oldval == 1) {
-#ifndef DISPATCH_NO_LEGACY
if (dou._do->do_vtable == (void*)&_dispatch_source_kevent_vtable) {
- return _dispatch_source_legacy_xref_release(dou._ds);
+ return _dispatch_source_xref_release(dou._ds);
}
-#endif
if (slowpath(DISPATCH_OBJECT_SUSPENDED(dou._do))) {
// Arguments for and against this assert are within 6705399
DISPATCH_CLIENT_CRASH("Release of a suspended object");
Modified: trunk/src/source.c (182 => 183)
--- trunk/src/source.c 2010-01-27 17:32:30 UTC (rev 182)
+++ trunk/src/source.c 2010-01-27 17:32:37 UTC (rev 183)
@@ -60,25 +60,26 @@
_dispatch_release(ds);
}
-#ifndef DISPATCH_NO_LEGACY
+DISPATCH_NOINLINE
void
-_dispatch_source_legacy_xref_release(dispatch_source_t ds)
+_dispatch_source_xref_release(dispatch_source_t ds)
{
+#ifndef DISPATCH_NO_LEGACY
if (ds->ds_is_legacy) {
if (!(ds->ds_timer.flags & DISPATCH_TIMER_ONESHOT)) {
dispatch_source_cancel(ds);
}
-
// Clients often leave sources suspended at the last release
dispatch_atomic_and(&ds->do_suspend_cnt, DISPATCH_OBJECT_SUSPEND_LOCK);
- } else if (slowpath(DISPATCH_OBJECT_SUSPENDED(ds))) {
+ } else
+#endif
+ if (slowpath(DISPATCH_OBJECT_SUSPENDED(ds))) {
// Arguments for and against this assert are within 6705399
DISPATCH_CLIENT_CRASH("Release of a suspended object");
}
_dispatch_wakeup(ds);
_dispatch_release(ds);
}
-#endif /* DISPATCH_NO_LEGACY */
long
dispatch_source_testcancel(dispatch_source_t ds)
Modified: trunk/src/source_internal.h (182 => 183)
--- trunk/src/source_internal.h 2010-01-27 17:32:30 UTC (rev 182)
+++ trunk/src/source_internal.h 2010-01-27 17:32:37 UTC (rev 183)
@@ -98,7 +98,7 @@
};
-void _dispatch_source_legacy_xref_release(dispatch_source_t ds);
+void _dispatch_source_xref_release(dispatch_source_t ds);
dispatch_queue_t _dispatch_source_invoke(dispatch_source_t ds);
bool _dispatch_source_probe(dispatch_source_t ds);
void _dispatch_source_dispose(dispatch_source_t ds);