-
Notifications
You must be signed in to change notification settings - Fork 165
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
drgn.helpers.linux: Add helpers to work with wait-queue(s). #357
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.
Thanks, this looks great! Only minor comments.
Thanks for reviewing this. I have integrated your suggestions. |
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.
A couple things I missed last round, and a couple new small things.
drgn/helpers/linux/wait.py
Outdated
Iterate over all entries in a given wait-queue. | ||
|
||
:param waitq: ``wait_queue_head_t *`` | ||
:return: Iterator of ``struct wait_queue_entry *`` or ``struct __wait_queue *`` objects. |
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.
Since you're using the typedef names now, we should document it that way, and also specify why it can be different.
:return: Iterator of ``struct wait_queue_entry *`` or ``struct __wait_queue *`` objects. | |
:return: Iterator of ``wait_queue_entry_t *`` or ``wait_queue_t *`` objects | |
depending on the kernel version. |
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.
Agree. Although the comment later in the function gives a summary of the change, I have further explained the relation between these 2 typedefs. Please let me know if it looks good or needs any change.
Signed-off-by: Imran Khan <[email protected]>
Signed-off-by: Imran Khan <[email protected]>
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 copy-edited the documentation a bit, and with that, it's ready to go. Thanks!
Helpers to work with kernel's waitqueue subsystem