-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add syncobj support and poll-based example #149
Conversation
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.
While on first glance the syncobj code looks quite good (thanks for working on this!), I have a couple of questions regarding the example and edition upgrade.
- Why does this require tokio? I guess just using nix::poll would be totally sufficient to demonstrate this use-case?
- If we want a tokio example (@Slabity opinions?), can you please separate these into separate commits? So one for adding the syncobj-apis, one upgrading the edition and one adding tokio + the example.
Would it make sense to have the example use poll and describe possible tokio usage in a doc comment?
Sure! Though if we just have the example use poll, this could be skipped. |
I think that makes sense. It is certainly nice to let less knowledgeable users now, that they can use this with tokio.
Great. I agree we don't need this then. |
Poll based example is pushed with edition removed. Please let me know if anything seems amiss. |
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.
I think this is good to go! Thanks again :)
It looks like a new lint was added to 1.70 which doesn't like the re-exported bindgen primitive types. I can't see a great way to solve this without getting rid of the |
Right, that looks indeed like that is the easiest workaround given, that this is generated code. |
Removing the libc glob may actually be the better solution, then the lint would remain active: Would this be acceptable? |
Yes. :) |
Done, that should pass all builtin and clippy lints for all features. |
I see the problem. |
Please use |
* syncobj::Handle and syncobj::SyncFile types added * These types may be used in device-specific Card implementations to add multiple-event asynchronicity of command submissions.
Done. Thank you for the assistance! |
Tested on Raspberry Pi VC4 device in https://github.com/CirrusNeptune/rpi-drm/blob/main/vc4-drm/src/card.rs#L1043