-
Notifications
You must be signed in to change notification settings - Fork 583
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unix: add Uvmexp and SysctlUvmexp for NetBSD
NetBSD has both struct uvmexp (used internally) and struct uvmexp_sysctl (preferred for interfacing from user code). Expose the latter as type Uvmexp with the same interface as on OpenBSD. I am not sure if it makes sense to even have a name parameter for SysctlUvmexp, since the only valid value can be "vm.uvmext2". Change-Id: I40a743536c28e3fb7a54253768db35b1629fabfe Reviewed-on: https://go-review.googlesource.com/c/sys/+/460156 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Tobias Klauser <[email protected]> Run-TryBot: Benny Siegert <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
- Loading branch information
Showing
7 changed files
with
372 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 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,15 @@ | ||
// Copyright 2023 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package unix | ||
|
||
import "testing" | ||
|
||
func TestSysctlUvmexp(t *testing.T) { | ||
uvm, err := SysctlUvmexp("vm.uvmexp2") | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
t.Logf("%#v", uvm) | ||
} |
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.