-
Notifications
You must be signed in to change notification settings - Fork 471
Add support for CFRunLoop integration APIs #46
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
|
||
// 6618342 Contact the team that owns the Instrument DTrace probe before |
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.
not ok to remove a comment that says something quite explicit about it not being removed ever.
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.
This just moved up a few lines.
I disagree with that patch, I think it should not add new interfaces for the sake of linux when the |
@@ -23,6 +23,11 @@ | |||
#include "protocol.h" | |||
#endif | |||
|
|||
#if __linux__ |
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.
should be in "internal.h" and #ifdef
For the sake of porting I think the right way is like I said, have:
|
I'm happy to rename the guards and move to implementing As per my initial comment, I took the approach of implementing the interface functions as Presumably we'll new some new |
@MadCoder I've made an interaction of changes that moves towards what your looking for - they're not complete but I'd like to get some feedback before doing much more. For the CFRunLoop entry points, I've retained retained Linux specific APIs, but moved the declaration to
The equivalents for Darwin and Windows return a "port"/Handle, and the "drain" function for Darwin has the port as a parameter. Using shared I've introduced a new I've also left the implementation of |
Hi @MadCoder . Can you take a second look at this and give some recommendations on how we can move forward? |
Hi @MadCoder . Have you been able to do another review of this yet? |
Replaced by #101 |
Work has already been done by @kovpas and merged by @parkera to add a CFRunLoop implementation for Linux into CoreFoundation by PR #133 (swiftlang/swift-corelibs-foundation#133).
This followed the model in CFLite of using
eventfd
rather than mach ports, and calling the following two (new) APIs:instead of the existing "4CF" calls:
Those APIs don't exist in libdispatch, so this adds them. The APIs are defined in
queue.h
which effectively makes then public - that's been done because it matched the approach used by the CoreFoundation PR. If it makes sense to make them "4CF" functions I can modify the PR here and open an equivalent against CoreFoundation.