Repository navigation
openbsd: add uvmexp structure and related constants #5658
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,3 +5,4 @@ | |
|
|
||
| pub(crate) mod sys; | ||
| pub(crate) mod unistd; | ||
| pub(crate) mod uvm; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| //! Directory: `uvm/` | ||
| //! | ||
| //! <https://github.com/openbsd/src/blob/master/sys/uvm> | ||
|
|
||
| pub(crate) mod uvmexp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| //! Header: `uvm/uvmexp.h` | ||
| //! | ||
| //! <https://github.com/openbsd/src/blob/master/sys/uvm/uvmexp.h> | ||
|
|
||
| use crate::prelude::*; | ||
|
|
||
| pub const VM_METER: c_int = 1; | ||
| pub const VM_LOADAVG: c_int = 2; | ||
| pub const VM_PSSTRINGS: c_int = 3; | ||
| pub const VM_UVMEXP: c_int = 4; | ||
| pub const VM_SWAPENCRYPT: c_int = 5; | ||
| pub const VM_NKMEMPAGES: c_int = 6; | ||
| pub const VM_ANONMIN: c_int = 7; | ||
| pub const VM_VTEXTMIN: c_int = 8; | ||
| pub const VM_VNODEMIN: c_int = 9; | ||
| pub const VM_MAXSLP: c_int = 10; | ||
| pub const VM_USPACE: c_int = 11; | ||
| pub const VM_MALLOC_CONF: c_int = 12; | ||
| /// Constants may change across releases. | ||
| /// See the [usage guidelines](crate#usage-guidelines) for details. | ||
| pub const VM_MAXID: c_int = 13; | ||
|
|
||
| s2! { | ||
| pub struct uvmexp { | ||
| pub pagesize: c_int, | ||
| pub pagemask: c_int, | ||
| pub pageshift: c_int, | ||
| pub npages: c_int, | ||
| pub free: c_int, | ||
| pub active: c_int, | ||
| pub inactive: c_int, | ||
| pub paging: c_int, | ||
| pub wired: c_int, | ||
| pub zeropages: c_int, | ||
| pub reserve_pagedaemon: c_int, | ||
| pub reserve_kernel: c_int, | ||
| pub percpucaches: c_int, | ||
| pub vnodepages: c_int, | ||
| pub vtextpages: c_int, | ||
| pub freemin: c_int, | ||
| pub freetarg: c_int, | ||
| pub inactarg: c_int, | ||
| pub wiredmax: c_int, | ||
| pub anonmin: c_int, | ||
| pub vtextmin: c_int, | ||
| pub vnodemin: c_int, | ||
| pub anonminpct: c_int, | ||
| pub vtextminpct: c_int, | ||
| pub vnodeminpct: c_int, | ||
| pub nswapdev: c_int, | ||
| pub swpages: c_int, | ||
| pub swpginuse: c_int, | ||
| pub swpgonly: c_int, | ||
| pub nswget: c_int, | ||
| pub nanon: c_int, | ||
| pub unused05: c_int, | ||
| pub unused06: c_int, | ||
| pub faults: c_int, | ||
| pub traps: c_int, | ||
| pub intrs: c_int, | ||
| pub swtch: c_int, | ||
| pub softs: c_int, | ||
| pub syscalls: c_int, | ||
| pub pageins: c_int, | ||
| pub pcphit: c_int, | ||
| pub pcpmiss: c_int, | ||
| pub pgswapin: c_int, | ||
| pub pgswapout: c_int, | ||
| pub forks: c_int, | ||
| pub forks_ppwait: c_int, | ||
| pub forks_sharevm: c_int, | ||
| pub pga_zerohit: c_int, | ||
| pub pga_zeromiss: c_int, | ||
| pub unused09: c_int, | ||
| pub fltnoram: c_int, | ||
| pub fltnoanon: c_int, | ||
| pub fltnoamap: c_int, | ||
| pub fltpgwait: c_int, | ||
| pub fltpgrele: c_int, | ||
| pub fltrelck: c_int, | ||
| pub fltnorelck: c_int, | ||
| pub fltanget: c_int, | ||
| pub fltanretry: c_int, | ||
| pub fltamcopy: c_int, | ||
| pub fltnamap: c_int, | ||
| pub fltnomap: c_int, | ||
| pub fltlget: c_int, | ||
| pub fltget: c_int, | ||
| pub flt_anon: c_int, | ||
| pub flt_acow: c_int, | ||
| pub flt_obj: c_int, | ||
| pub flt_prcopy: c_int, | ||
| pub flt_przero: c_int, | ||
| pub fltup: c_int, | ||
| pub fltnoup: c_int, | ||
| pub pdwoke: c_int, | ||
| pub pdrevs: c_int, | ||
| pub pdswout: c_int, | ||
| pub pdfreed: c_int, | ||
| pub pdscans: c_int, | ||
| pub pdanscan: c_int, | ||
| pub pdobscan: c_int, | ||
| pub pdreact: c_int, | ||
| pub pdbusy: c_int, | ||
| pub pdpageouts: c_int, | ||
| pub pdpending: c_int, | ||
| pub pddeact: c_int, | ||
| pub swpskip: c_int, | ||
| pub fpswtch: c_int, | ||
| pub kmapent: c_int, | ||
| } | ||
|
|
||
| pub struct _ps_strings { | ||
| pub val: *mut c_void, | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.