Skip to content

Conversation

@notable-equivalent
Copy link
Contributor

Add a C binding for accessing cgroup_limits.

Since C doesn't have optional types, the function instead writes the limits to passed-in-pointers, and returns a boolean of whether the information was available. This is probably the most C-like way of doing things.

Currently I have it taking in separate pointers for each data field in cgroup_limits, to avoid making a struct definition shared between C and Rust (which seemed more complex and kind of error-prone), but either way should work

@GuillaumeGomez
Copy link
Owner

Thanks!

@GuillaumeGomez GuillaumeGomez merged commit 8c5cd19 into GuillaumeGomez:main Dec 5, 2025
67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants