-
Notifications
You must be signed in to change notification settings - Fork 469
Linux port of libdispatch-685 merge #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -295,9 +295,6 @@ AC_MSG_CHECKING([what semaphore type to use]); | |||
AS_IF([test "x$have_mach" = "xtrue"], | |||
[AC_DEFINE(USE_MACH_SEM, 1, [Define to use Mach semaphores]) | |||
AC_MSG_RESULT([Mach semaphores])], | |||
[test "x$have_futex" = "xtrue"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is very good, you should also get rid of all the code guarded with #if USE_FUTEX_SEM
that is still around
2260c33
to
75ae076
Compare
revised based on feedback; squashed & force-pushed. |
// FIXME: Need real implementation of this + related functions for Linux | ||
DISPATCH_NOINLINE | ||
void | ||
_dispatch_queue_class_override_drainer(dispatch_queue_t dq, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's not the right patch please remove that hunk, and instead do this:
DISPATCH_NOINLINE
void
_dispatch_queue_wakeup(dispatch_queue_t dq, pthread_priority_t pp,
dispatch_wakeup_flags_t flags)
{
dispatch_queue_wakeup_target_t target = DISPATCH_QUEUE_WAKEUP_NONE;
if (_dispatch_queue_class_probe(dq)) {
target = DISPATCH_QUEUE_WAKEUP_TARGET;
}
if (target) {
return _dispatch_queue_class_wakeup(dq, pp, flags, target);
+#if HAVE_PTHREAD_WORKQUEUE_QOS
} else if (pp) {
return _dispatch_queue_class_override_drainer(dq, pp, flags);
+#endif
} else if (flags & DISPATCH_WAKEUP_CONSUME) {
return _dispatch_release_tailcall(dq);
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the reason is that _dispatch_queue_class_override_drainer()
only makes sense if you have QoS support which linux doesn't so there's no point having the code in the first place, as you can see _dispatch_queue_class_override_drainer() is not reachable because it is itself under #if HAVE_PTHREAD_WORKQUEUE_QOS
Minimal set of changes to get sources merged from libdispatch-685 to compile and run on Linux.
75ae076
to
b45bc2f
Compare
Thanks. updated. Also had to guard calls to _dispatch_queue_class_override_drainer in source.c |
Makes perfect sense. |
Linux port of libdispatch-685 merge Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Minimal set of changes to get sources merged
from libdispatch-685 to compile and run on Linux.