mirror of
https://github.com/BishopFox/sliver.git
synced 2026-11-09 01:49:40 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf3619553a | ||
|
|
d647389c52 | ||
|
|
d1e5053c34 | ||
|
|
d15afa23a5 | ||
|
|
e231cd5252 | ||
|
|
5bcae143cb | ||
|
|
d1d2415508 | ||
|
|
57a4cb6b12 | ||
|
|
4845dfed87 | ||
|
|
17e102e72c | ||
|
|
8d1ce4cca7 | ||
|
|
508257f825 | ||
|
|
ec2fc66c9f | ||
|
|
3b24870ce8 | ||
|
|
b6340ead44 | ||
|
|
0cf021dc2b | ||
|
|
aac9ded76a | ||
|
|
2fefb634ef | ||
|
|
db11d8d6bb | ||
|
|
cca1f66ea6 | ||
|
|
cdd941bdad | ||
|
|
a37e8d6b2d | ||
|
|
8d1dc478b9 | ||
|
|
8a28bf4506 |
No files matched your search
@@ -280,8 +280,22 @@ func runAliasCommand(ctx *grumble.Context, con *console.SliverConsoleClient) {
|
||||
extArgs = strings.TrimSpace(extArgs)
|
||||
entryPoint := aliasManifest.Entrypoint
|
||||
processArgsStr := ctx.Flags.String("process-arguments")
|
||||
// Special case for payloads with pass to Donut (.NET assemblies and sideloaded payloads):
|
||||
// The Donut loader has a hard limit of 256 characters for the command line arguments, so
|
||||
// we're alerting the user that the arguments will be truncated.
|
||||
if len(extArgs) > 256 && (aliasManifest.IsAssembly || !aliasManifest.IsReflective) {
|
||||
con.PrintWarnf(" Arguments are limited to 256 characters when using the default fork/exec model for .NET assemblies and non-reflective PE files.\nConsider using the --in-process flag to execute .NET assemblies in-process and work around this limitation.\n")
|
||||
msgStr := ""
|
||||
// The --in-process flag only exists for .NET assemblies (aliasManifest.IsAssembly == true).
|
||||
// Groupping the two conditions together could crash the client since ctx.Flags.Type panics
|
||||
// if the flag is not registered.
|
||||
if aliasManifest.IsAssembly {
|
||||
if !ctx.Flags.Bool("in-process") {
|
||||
msgStr = " Arguments are limited to 256 characters when using the default fork/exec model for .NET assemblies.\nConsider using the --in-process flag to execute .NET assemblies in-process and work around this limitation.\n"
|
||||
}
|
||||
} else if !aliasManifest.IsReflective {
|
||||
msgStr = " Arguments are limited to 256 characters when using the default fork/exec model for non-reflective PE payloads.\n"
|
||||
}
|
||||
con.PrintWarnf(msgStr)
|
||||
confirm := false
|
||||
prompt := &survey.Confirm{Message: "Do you want to continue?"}
|
||||
survey.AskOne(prompt, &confirm, nil)
|
||||
|
||||
@@ -60,6 +60,7 @@ func ExecuteAssemblyCmd(ctx *grumble.Context, con *console.SliverConsoleClient)
|
||||
process := ctx.Flags.String("process")
|
||||
processArgsStr := ctx.Flags.String("process-arguments")
|
||||
processArgs := strings.Split(processArgsStr, " ")
|
||||
inProcess := ctx.Flags.Bool("in-process")
|
||||
|
||||
runtime := ctx.Flags.String("runtime")
|
||||
etwBypass := ctx.Flags.Bool("etw-bypass")
|
||||
@@ -67,7 +68,7 @@ func ExecuteAssemblyCmd(ctx *grumble.Context, con *console.SliverConsoleClient)
|
||||
|
||||
assemblyArgsStr := strings.Join(assemblyArgs, " ")
|
||||
assemblyArgsStr = strings.TrimSpace(assemblyArgsStr)
|
||||
if len(assemblyArgsStr) > 256 {
|
||||
if len(assemblyArgsStr) > 256 && !inProcess {
|
||||
con.PrintWarnf(" Injected .NET assembly arguments are limited to 256 characters when using the default fork/exec model.\nConsider using the --in-process flag to execute the .NET assembly in-process and work around this limitation.\n")
|
||||
confirm := false
|
||||
prompt := &survey.Confirm{Message: "Do you want to continue?"}
|
||||
@@ -94,7 +95,7 @@ func ExecuteAssemblyCmd(ctx *grumble.Context, con *console.SliverConsoleClient)
|
||||
Runtime: runtime,
|
||||
EtwBypass: etwBypass,
|
||||
AmsiBypass: amsiBypass,
|
||||
InProcess: ctx.Flags.Bool("in-process"),
|
||||
InProcess: inProcess,
|
||||
})
|
||||
ctrl <- true
|
||||
<-ctrl
|
||||
|
||||
@@ -455,7 +455,7 @@ The profile must be created with the [[.Bold]]service[[.Normal]] format, so that
|
||||
|
||||
To create such a profile, use the [[.Bold]]profiles new[[.Normal]] command:
|
||||
|
||||
profiles new --format service --skip-symbols --mtls a.bc.de --profile-name win-svc64
|
||||
profiles new --format service --skip-symbols --mtls a.bc.de win-svc64
|
||||
|
||||
Once the profile has been created, run the [[.Bold]]psexec[[.Normal]] command:
|
||||
|
||||
|
||||
+2
-2
@@ -232,7 +232,7 @@ GEM
|
||||
jekyll-seo-tag (~> 2.1)
|
||||
minitest (5.15.0)
|
||||
multipart-post (2.1.1)
|
||||
nokogiri (1.13.9)
|
||||
nokogiri (1.13.10)
|
||||
mini_portile2 (~> 2.8.0)
|
||||
racc (~> 1.4)
|
||||
octokit (4.22.0)
|
||||
@@ -241,7 +241,7 @@ GEM
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (4.0.6)
|
||||
racc (1.6.0)
|
||||
racc (1.6.1)
|
||||
rb-fsevent (0.11.1)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
|
||||
+2
-2
@@ -170,6 +170,6 @@ for USER_DIR in "${USER_DIRS[@]}"; do
|
||||
if id -u $USER >/dev/null 2>&1; then
|
||||
mkdir -p $USER_DIR/.sliver-client/configs
|
||||
/root/sliver-server operator --name $USER --lhost localhost --save $USER_DIR/.sliver-client/configs
|
||||
chown -R $USER:$USER $USER_DIR/.sliver-client/
|
||||
chown -R $USER:"$(id -gn $USER)" $USER_DIR/.sliver-client/
|
||||
fi
|
||||
done
|
||||
done
|
||||
@@ -24,15 +24,15 @@ require (
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/gorilla/mux v1.8.0
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.2
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.3
|
||||
github.com/kbinani/screenshot v0.0.0-20191211154542-3a185f1ce18f
|
||||
github.com/lesnuages/go-winio v0.4.19
|
||||
github.com/lesnuages/snitch v0.6.0
|
||||
github.com/mattn/go-sqlite3 v1.14.16
|
||||
github.com/miekg/dns v1.1.50
|
||||
github.com/moloch--/memmod v0.0.0-20211120144554-8b37cc654945
|
||||
github.com/pquerna/otp v1.3.0
|
||||
github.com/shirou/gopsutil/v3 v3.22.10
|
||||
github.com/pquerna/otp v1.4.0
|
||||
github.com/shirou/gopsutil/v3 v3.22.11
|
||||
github.com/sirupsen/logrus v1.9.0
|
||||
github.com/spf13/cobra v1.6.1
|
||||
github.com/stretchr/testify v1.8.1
|
||||
@@ -41,9 +41,9 @@ require (
|
||||
github.com/yiya1989/sshkrb5 v0.0.0-20201110125252-a1455b75a35e
|
||||
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b
|
||||
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec
|
||||
golang.org/x/sys v0.3.0
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
|
||||
golang.org/x/text v0.4.0
|
||||
golang.org/x/text v0.5.0
|
||||
golang.zx2c4.com/wireguard v0.0.0-20220316235147-5aff28b14c24
|
||||
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20220208144051-fde48d68ee68
|
||||
google.golang.org/grpc v1.42.0-dev.0.20211020220737-f00baa6c3c84
|
||||
@@ -51,7 +51,7 @@ require (
|
||||
gopkg.in/AlecAivazis/survey.v1 v1.8.8
|
||||
gorm.io/driver/mysql v1.4.4
|
||||
gorm.io/driver/postgres v1.4.5
|
||||
gorm.io/driver/sqlite v1.4.3
|
||||
gorm.io/driver/sqlite v1.4.4
|
||||
gorm.io/gorm v1.24.1-0.20221019064659-5dd2bb482755
|
||||
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5
|
||||
modernc.org/sqlite v1.19.3
|
||||
@@ -110,6 +110,8 @@ require (
|
||||
github.com/rivo/uniseg v0.2.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/thedevsaddam/gojsonq/v2 v2.5.2 // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.11 // indirect
|
||||
github.com/tklauser/numcpus v0.6.0 // indirect
|
||||
github.com/yusufpapurcu/wmi v1.2.2 // indirect
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
|
||||
|
||||
@@ -228,8 +228,8 @@ github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dv
|
||||
github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8=
|
||||
github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.2 h1:DcJNSNIb1E17Tvy9w9S7z+sExvWvvjNbFdyr6C+FUL0=
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.2/go.mod h1:MgmISkTWDSFu0xOqiZ0mKNntMQ2mDgOcwOkwBEkMDJI=
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.3 h1:2n9BZ0YQiXGESUSR+6FLg0WWWE80u+mIz35f0uHWcIE=
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.3/go.mod h1:MgmISkTWDSFu0xOqiZ0mKNntMQ2mDgOcwOkwBEkMDJI=
|
||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||
github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
@@ -317,8 +317,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
|
||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
||||
github.com/pquerna/otp v1.3.0 h1:oJV/SkzR33anKXwQU3Of42rL4wbrffP4uvUf1SvS5Xs=
|
||||
github.com/pquerna/otp v1.3.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
|
||||
github.com/pquerna/otp v1.4.0 h1:wZvl1TIVxKRThZIBiwOOHOGP/1+nZyWBil9Y2XNEDzg=
|
||||
github.com/pquerna/otp v1.4.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
@@ -332,8 +332,8 @@ github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OK
|
||||
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/shirou/gopsutil/v3 v3.22.10 h1:4KMHdfBRYXGF9skjDWiL4RA2N+E8dRdodU/bOZpPoVg=
|
||||
github.com/shirou/gopsutil/v3 v3.22.10/go.mod h1:QNza6r4YQoydyCfo6rH0blGfKahgibh4dQmV5xdFkQk=
|
||||
github.com/shirou/gopsutil/v3 v3.22.11 h1:kxsPKS+Eeo+VnEQ2XCaGJepeP6KY53QoRTETx3+1ndM=
|
||||
github.com/shirou/gopsutil/v3 v3.22.11/go.mod h1:xl0EeL4vXJ+hQMAGN8B9VFpxukEMA0XdevQOe5MZ1oY=
|
||||
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
|
||||
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
|
||||
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||
@@ -367,8 +367,10 @@ github.com/thedevsaddam/gojsonq/v2 v2.5.2 h1:CoMVaYyKFsVj6TjU6APqAhAvC07hTI6IQen
|
||||
github.com/thedevsaddam/gojsonq/v2 v2.5.2/go.mod h1:bv6Xa7kWy82uT0LnXPE2SzGqTj33TAEeR560MdJkiXs=
|
||||
github.com/things-go/go-socks5 v0.0.3-0.20210722055343-24af464efe43 h1:+sN63SJGqchSsVyNoeW4GyA0Y+g0LvKOHcaeqs1Rf6M=
|
||||
github.com/things-go/go-socks5 v0.0.3-0.20210722055343-24af464efe43/go.mod h1:dhnDTBbIg31cbJdROP4/Zz6Iw7JPEpiMvOl2LdHSSjE=
|
||||
github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
|
||||
github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ=
|
||||
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=
|
||||
github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI=
|
||||
github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms=
|
||||
github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4=
|
||||
github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk=
|
||||
github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0=
|
||||
github.com/yiya1989/sshkrb5 v0.0.0-20201110125252-a1455b75a35e h1:6SWomM8ezwUwnN3lqKxE4r7bYVwpY9514DQkwBV9IPI=
|
||||
@@ -492,11 +494,11 @@ golang.org/x/sys v0.0.0-20220207234003-57398862261d/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec h1:BkDtF2Ih9xZ7le9ndzTA7KJow28VbQW3odyk/8drmuI=
|
||||
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY=
|
||||
@@ -509,8 +511,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
|
||||
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE=
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
@@ -608,8 +610,8 @@ gorm.io/driver/mysql v1.4.4 h1:MX0K9Qvy0Na4o7qSC/YI7XxqUw5KDw01umqgID+svdQ=
|
||||
gorm.io/driver/mysql v1.4.4/go.mod h1:BCg8cKI+R0j/rZRQxeKis/forqRwRSYOR8OM3Wo6hOM=
|
||||
gorm.io/driver/postgres v1.4.5 h1:mTeXTTtHAgnS9PgmhN2YeUbazYpLhUI1doLnw42XUZc=
|
||||
gorm.io/driver/postgres v1.4.5/go.mod h1:GKNQYSJ14qvWkvPwXljMGehpKrhlDNsqYRr5HnYGncg=
|
||||
gorm.io/driver/sqlite v1.4.3 h1:HBBcZSDnWi5BW3B3rwvVTc510KGkBkexlOg0QrmLUuU=
|
||||
gorm.io/driver/sqlite v1.4.3/go.mod h1:0Aq3iPO+v9ZKbcdiz8gLWRw5VOPcBOPUQJFLq5e2ecI=
|
||||
gorm.io/driver/sqlite v1.4.4 h1:gIufGoR0dQzjkyqDyYSCvsYR6fba1Gw5YKDqKeChxFc=
|
||||
gorm.io/driver/sqlite v1.4.4/go.mod h1:0Aq3iPO+v9ZKbcdiz8gLWRw5VOPcBOPUQJFLq5e2ecI=
|
||||
gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
|
||||
gorm.io/gorm v1.24.0/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
|
||||
gorm.io/gorm v1.24.1-0.20221019064659-5dd2bb482755 h1:7AdrbfcvKnzejfqP5g37fdSZOXH/JvaPIzBIHTOqXKk=
|
||||
|
||||
@@ -259,7 +259,11 @@ func MakeToken(domain string, username string, password string, logonType uint32
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = syscalls.LogonUser(pu, pd, pp, logonType, syscalls.LOGON32_PROVIDER_DEFAULT, &token)
|
||||
if logonType == 0 {
|
||||
err = syscalls.LogonUser(pu, pd, pp, logonType, syscalls.LOGON32_PROVIDER_WINNT50, &token)
|
||||
} else {
|
||||
err = syscalls.LogonUser(pu, pd, pp, logonType, syscalls.LOGON32_PROVIDER_DEFAULT, &token)
|
||||
}
|
||||
if err != nil {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("LogonUser failed: %v\n", err)
|
||||
|
||||
@@ -227,6 +227,11 @@ func WGConnect(address string, port uint16) (net.Conn, *device.Device, error) {
|
||||
// bringUpWGInterface - First creates an inet.af network stack.
|
||||
// then creates a Wireguard device/interface and applies configuration
|
||||
func bringUpWGInterface(address string, port uint16, implantPrivKey string, serverPubKey string, netstackTunIP string) (tun.Device, *device.Device, *netstack.Net, error) {
|
||||
if netstackTunIP == "" {
|
||||
err := errors.New("[wireguard] Cannot connect to empty IP address")
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
|
||||
tun, tNet, err := netstack.CreateNetTUN(
|
||||
[]netip.Addr{netip.MustParseAddr(netstackTunIP)},
|
||||
[]netip.Addr{netip.MustParseAddr("127.0.0.1")}, // We don't use DNS in the WG implant. Yet.
|
||||
|
||||
+5
-1
@@ -37,7 +37,6 @@ Pretty-print tables into ASCII/Unicode strings.
|
||||
- HTML Table (with custom CSS Class)
|
||||
- Markdown Table
|
||||
|
||||
|
||||
```
|
||||
+---------------------------------------------------------------------+
|
||||
| Game of Thrones +
|
||||
@@ -57,6 +56,11 @@ A demonstration of all the capabilities can be found here:
|
||||
|
||||
If you want very specific examples, read ahead.
|
||||
|
||||
**Hint**: I've tried to ensure that almost all supported use-cases are covered
|
||||
by unit-tests and that they print the table rendered. Run
|
||||
`go test -v github.com/jedib0t/go-pretty/v6/table` to see the test outputs and
|
||||
help you figure out how to do something.
|
||||
|
||||
# Examples
|
||||
|
||||
All the examples below are going to start with the following block, although
|
||||
|
||||
+294
@@ -0,0 +1,294 @@
|
||||
package table
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/jedib0t/go-pretty/v6/text"
|
||||
)
|
||||
|
||||
func (t *Table) analyzeAndStringify(row Row, hint renderHint) rowStr {
|
||||
// update t.numColumns if this row is the longest seen till now
|
||||
if len(row) > t.numColumns {
|
||||
// init the slice for the first time; and pad it the rest of the time
|
||||
if t.numColumns == 0 {
|
||||
t.columnIsNonNumeric = make([]bool, len(row))
|
||||
} else {
|
||||
t.columnIsNonNumeric = append(t.columnIsNonNumeric, make([]bool, len(row)-t.numColumns)...)
|
||||
}
|
||||
// update t.numColumns
|
||||
t.numColumns = len(row)
|
||||
}
|
||||
|
||||
// convert each column to string and figure out if it has non-numeric data
|
||||
rowOut := make(rowStr, len(row))
|
||||
for colIdx, col := range row {
|
||||
// if the column is not a number, keep track of it
|
||||
if !hint.isHeaderRow && !hint.isFooterRow && !t.columnIsNonNumeric[colIdx] && !isNumber(col) {
|
||||
t.columnIsNonNumeric[colIdx] = true
|
||||
}
|
||||
|
||||
rowOut[colIdx] = t.analyzeAndStringifyColumn(colIdx, col, hint)
|
||||
}
|
||||
return rowOut
|
||||
}
|
||||
|
||||
func (t *Table) analyzeAndStringifyColumn(colIdx int, col interface{}, hint renderHint) string {
|
||||
// convert to a string and store it in the row
|
||||
var colStr string
|
||||
if transformer := t.getColumnTransformer(colIdx, hint); transformer != nil {
|
||||
colStr = transformer(col)
|
||||
} else if colStrVal, ok := col.(string); ok {
|
||||
colStr = colStrVal
|
||||
} else {
|
||||
colStr = fmt.Sprint(col)
|
||||
}
|
||||
if strings.Contains(colStr, "\t") {
|
||||
colStr = strings.Replace(colStr, "\t", " ", -1)
|
||||
}
|
||||
if strings.Contains(colStr, "\r") {
|
||||
colStr = strings.Replace(colStr, "\r", "", -1)
|
||||
}
|
||||
return fmt.Sprintf("%s%s", t.style.Format.Direction.Modifier(), colStr)
|
||||
}
|
||||
|
||||
func (t *Table) extractMaxColumnLengths(rows []rowStr, hint renderHint) {
|
||||
for rowIdx, row := range rows {
|
||||
hint.rowNumber = rowIdx + 1
|
||||
t.extractMaxColumnLengthsFromRow(row, t.getMergedColumnIndices(row, hint))
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Table) extractMaxColumnLengthsFromRow(row rowStr, mci mergedColumnIndices) {
|
||||
for colIdx, colStr := range row {
|
||||
longestLineLen := text.LongestLineLen(colStr)
|
||||
maxColWidth := t.getColumnWidthMax(colIdx)
|
||||
if maxColWidth > 0 && maxColWidth < longestLineLen {
|
||||
longestLineLen = maxColWidth
|
||||
}
|
||||
mergedColumnsLength := mci.mergedLength(colIdx, t.maxColumnLengths)
|
||||
if longestLineLen > mergedColumnsLength {
|
||||
if mergedColumnsLength > 0 {
|
||||
t.extractMaxColumnLengthsFromRowForMergedColumns(colIdx, longestLineLen, mci)
|
||||
} else {
|
||||
t.maxColumnLengths[colIdx] = longestLineLen
|
||||
}
|
||||
} else if maxColWidth == 0 && longestLineLen > t.maxColumnLengths[colIdx] {
|
||||
t.maxColumnLengths[colIdx] = longestLineLen
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Table) extractMaxColumnLengthsFromRowForMergedColumns(colIdx int, mergedColumnLength int, mci mergedColumnIndices) {
|
||||
numMergedColumns := mci.len(colIdx)
|
||||
mergedColumnLength -= (numMergedColumns - 1) * text.RuneWidthWithoutEscSequences(t.style.Box.MiddleSeparator)
|
||||
maxLengthSplitAcrossColumns := mergedColumnLength / numMergedColumns
|
||||
if maxLengthSplitAcrossColumns > t.maxColumnLengths[colIdx] {
|
||||
t.maxColumnLengths[colIdx] = maxLengthSplitAcrossColumns
|
||||
}
|
||||
for otherColIdx := range mci[colIdx] {
|
||||
if maxLengthSplitAcrossColumns > t.maxColumnLengths[otherColIdx] {
|
||||
t.maxColumnLengths[otherColIdx] = maxLengthSplitAcrossColumns
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Table) initForRender() {
|
||||
// pick a default style if none was set until now
|
||||
t.Style()
|
||||
|
||||
// reset rendering state
|
||||
t.reset()
|
||||
|
||||
// initialize the column configs and normalize them
|
||||
t.initForRenderColumnConfigs()
|
||||
|
||||
// initialize and stringify all the raw rows
|
||||
t.initForRenderRows()
|
||||
|
||||
// find the longest continuous line in each column
|
||||
t.initForRenderColumnLengths()
|
||||
|
||||
// generate a separator row and calculate maximum row length
|
||||
t.initForRenderRowSeparator()
|
||||
|
||||
// reset the counter for the number of lines rendered
|
||||
t.numLinesRendered = 0
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderColumnConfigs() {
|
||||
t.columnConfigMap = map[int]ColumnConfig{}
|
||||
for _, colCfg := range t.columnConfigs {
|
||||
// find the column number if none provided; this logic can work only if
|
||||
// a header row is present and has a column with the given name
|
||||
if colCfg.Number == 0 {
|
||||
for _, row := range t.rowsHeaderRaw {
|
||||
colCfg.Number = row.findColumnNumber(colCfg.Name)
|
||||
if colCfg.Number > 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if colCfg.Number > 0 {
|
||||
t.columnConfigMap[colCfg.Number-1] = colCfg
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderColumnLengths() {
|
||||
t.maxColumnLengths = make([]int, t.numColumns)
|
||||
t.extractMaxColumnLengths(t.rowsHeader, renderHint{isHeaderRow: true})
|
||||
t.extractMaxColumnLengths(t.rows, renderHint{})
|
||||
t.extractMaxColumnLengths(t.rowsFooter, renderHint{isFooterRow: true})
|
||||
|
||||
// increase the column lengths if any are under the limits
|
||||
for colIdx := range t.maxColumnLengths {
|
||||
minWidth := t.getColumnWidthMin(colIdx)
|
||||
if minWidth > 0 && t.maxColumnLengths[colIdx] < minWidth {
|
||||
t.maxColumnLengths[colIdx] = minWidth
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderHideColumns() {
|
||||
if !t.hasHiddenColumns() {
|
||||
return
|
||||
}
|
||||
colIdxMap := t.hideColumns()
|
||||
|
||||
// re-create columnIsNonNumeric with new column indices
|
||||
columnIsNonNumeric := make([]bool, t.numColumns)
|
||||
for oldColIdx, nonNumeric := range t.columnIsNonNumeric {
|
||||
if newColIdx, ok := colIdxMap[oldColIdx]; ok {
|
||||
columnIsNonNumeric[newColIdx] = nonNumeric
|
||||
}
|
||||
}
|
||||
t.columnIsNonNumeric = columnIsNonNumeric
|
||||
|
||||
// re-create columnConfigMap with new column indices
|
||||
columnConfigMap := make(map[int]ColumnConfig)
|
||||
for oldColIdx, cc := range t.columnConfigMap {
|
||||
if newColIdx, ok := colIdxMap[oldColIdx]; ok {
|
||||
columnConfigMap[newColIdx] = cc
|
||||
}
|
||||
}
|
||||
t.columnConfigMap = columnConfigMap
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderRows() {
|
||||
// auto-index: calc the index column's max length
|
||||
t.autoIndexVIndexMaxLength = len(fmt.Sprint(len(t.rowsRaw)))
|
||||
|
||||
// stringify all the rows to make it easy to render
|
||||
if t.rowPainter != nil {
|
||||
t.rowsColors = make([]text.Colors, len(t.rowsRaw))
|
||||
}
|
||||
t.rows = t.initForRenderRowsStringify(t.rowsRaw, renderHint{})
|
||||
t.rowsFooter = t.initForRenderRowsStringify(t.rowsFooterRaw, renderHint{isFooterRow: true})
|
||||
t.rowsHeader = t.initForRenderRowsStringify(t.rowsHeaderRaw, renderHint{isHeaderRow: true})
|
||||
|
||||
// sort the rows as requested
|
||||
t.initForRenderSortRows()
|
||||
|
||||
// suppress columns without any content
|
||||
t.initForRenderSuppressColumns()
|
||||
|
||||
// strip out hidden columns
|
||||
t.initForRenderHideColumns()
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderRowsStringify(rows []Row, hint renderHint) []rowStr {
|
||||
rowsStr := make([]rowStr, len(rows))
|
||||
for idx, row := range rows {
|
||||
if t.rowPainter != nil && hint.isRegularRow() {
|
||||
t.rowsColors[idx] = t.rowPainter(row)
|
||||
}
|
||||
rowsStr[idx] = t.analyzeAndStringify(row, hint)
|
||||
}
|
||||
return rowsStr
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderRowSeparator() {
|
||||
t.maxRowLength = 0
|
||||
if t.autoIndex {
|
||||
t.maxRowLength += text.RuneWidthWithoutEscSequences(t.style.Box.PaddingLeft)
|
||||
t.maxRowLength += len(fmt.Sprint(len(t.rows)))
|
||||
t.maxRowLength += text.RuneWidthWithoutEscSequences(t.style.Box.PaddingRight)
|
||||
if t.style.Options.SeparateColumns {
|
||||
t.maxRowLength += text.RuneWidthWithoutEscSequences(t.style.Box.MiddleSeparator)
|
||||
}
|
||||
}
|
||||
if t.style.Options.SeparateColumns {
|
||||
t.maxRowLength += text.RuneWidthWithoutEscSequences(t.style.Box.MiddleSeparator) * (t.numColumns - 1)
|
||||
}
|
||||
t.rowSeparator = make(rowStr, t.numColumns)
|
||||
for colIdx, maxColumnLength := range t.maxColumnLengths {
|
||||
maxColumnLength += text.RuneWidthWithoutEscSequences(t.style.Box.PaddingLeft + t.style.Box.PaddingRight)
|
||||
t.maxRowLength += maxColumnLength
|
||||
t.rowSeparator[colIdx] = text.RepeatAndTrim(t.style.Box.MiddleHorizontal, maxColumnLength)
|
||||
}
|
||||
if t.style.Options.DrawBorder {
|
||||
t.maxRowLength += text.RuneWidthWithoutEscSequences(t.style.Box.Left + t.style.Box.Right)
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderSortRows() {
|
||||
if len(t.sortBy) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
// sort the rows
|
||||
sortedRowIndices := t.getSortedRowIndices()
|
||||
sortedRows := make([]rowStr, len(t.rows))
|
||||
for idx := range t.rows {
|
||||
sortedRows[idx] = t.rows[sortedRowIndices[idx]]
|
||||
}
|
||||
t.rows = sortedRows
|
||||
|
||||
// sort the rowsColors
|
||||
if len(t.rowsColors) > 0 {
|
||||
sortedRowsColors := make([]text.Colors, len(t.rows))
|
||||
for idx := range t.rows {
|
||||
sortedRowsColors[idx] = t.rowsColors[sortedRowIndices[idx]]
|
||||
}
|
||||
t.rowsColors = sortedRowsColors
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderSuppressColumns() {
|
||||
shouldSuppressColumn := func(colIdx int) bool {
|
||||
for _, row := range t.rows {
|
||||
if colIdx < len(row) && row[colIdx] != "" {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
if t.suppressEmptyColumns {
|
||||
for colIdx := 0; colIdx < t.numColumns; colIdx++ {
|
||||
if shouldSuppressColumn(colIdx) {
|
||||
cc := t.columnConfigMap[colIdx]
|
||||
cc.Hidden = true
|
||||
t.columnConfigMap[colIdx] = cc
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// reset initializes all the variables used to maintain rendering information
|
||||
// that are written to in this file
|
||||
func (t *Table) reset() {
|
||||
t.autoIndexVIndexMaxLength = 0
|
||||
t.columnConfigMap = nil
|
||||
t.columnIsNonNumeric = nil
|
||||
t.maxColumnLengths = nil
|
||||
t.maxRowLength = 0
|
||||
t.numColumns = 0
|
||||
t.numLinesRendered = 0
|
||||
t.rowSeparator = nil
|
||||
t.rows = nil
|
||||
t.rowsColors = nil
|
||||
t.rowsFooter = nil
|
||||
t.rowsHeader = nil
|
||||
}
|
||||
+7
-299
@@ -296,51 +296,6 @@ func (t *Table) SuppressEmptyColumns() {
|
||||
t.suppressEmptyColumns = true
|
||||
}
|
||||
|
||||
func (t *Table) analyzeAndStringify(row Row, hint renderHint) rowStr {
|
||||
// update t.numColumns if this row is the longest seen till now
|
||||
if len(row) > t.numColumns {
|
||||
// init the slice for the first time; and pad it the rest of the time
|
||||
if t.numColumns == 0 {
|
||||
t.columnIsNonNumeric = make([]bool, len(row))
|
||||
} else {
|
||||
t.columnIsNonNumeric = append(t.columnIsNonNumeric, make([]bool, len(row)-t.numColumns)...)
|
||||
}
|
||||
// update t.numColumns
|
||||
t.numColumns = len(row)
|
||||
}
|
||||
|
||||
// convert each column to string and figure out if it has non-numeric data
|
||||
rowOut := make(rowStr, len(row))
|
||||
for colIdx, col := range row {
|
||||
// if the column is not a number, keep track of it
|
||||
if !hint.isHeaderRow && !hint.isFooterRow && !t.columnIsNonNumeric[colIdx] && !isNumber(col) {
|
||||
t.columnIsNonNumeric[colIdx] = true
|
||||
}
|
||||
|
||||
rowOut[colIdx] = t.analyzeAndStringifyColumn(colIdx, col, hint)
|
||||
}
|
||||
return rowOut
|
||||
}
|
||||
|
||||
func (t *Table) analyzeAndStringifyColumn(colIdx int, col interface{}, hint renderHint) string {
|
||||
// convert to a string and store it in the row
|
||||
var colStr string
|
||||
if transformer := t.getColumnTransformer(colIdx, hint); transformer != nil {
|
||||
colStr = transformer(col)
|
||||
} else if colStrVal, ok := col.(string); ok {
|
||||
colStr = colStrVal
|
||||
} else {
|
||||
colStr = fmt.Sprint(col)
|
||||
}
|
||||
if strings.Contains(colStr, "\t") {
|
||||
colStr = strings.Replace(colStr, "\t", " ", -1)
|
||||
}
|
||||
if strings.Contains(colStr, "\r") {
|
||||
colStr = strings.Replace(colStr, "\r", "", -1)
|
||||
}
|
||||
return fmt.Sprintf("%s%s", t.style.Format.Direction.Modifier(), colStr)
|
||||
}
|
||||
|
||||
func (t *Table) getAlign(colIdx int, hint renderHint) text.Align {
|
||||
align := text.AlignDefault
|
||||
if cfg, ok := t.columnConfigMap[colIdx]; ok {
|
||||
@@ -377,6 +332,8 @@ func (t *Table) getBorderColors(hint renderHint) text.Colors {
|
||||
return t.style.Color.Footer
|
||||
} else if t.autoIndex {
|
||||
return t.style.Color.IndexColumn
|
||||
} else if hint.rowNumber%2 == 0 && t.style.Color.RowAlternate != nil {
|
||||
return t.style.Color.RowAlternate
|
||||
}
|
||||
return t.style.Color.Row
|
||||
}
|
||||
@@ -561,39 +518,29 @@ func (t *Table) getMaxColumnLengthForMerging(colIdx int) int {
|
||||
|
||||
// getMergedColumnIndices returns a map of colIdx values to all the other colIdx
|
||||
// values (that are being merged) and their lengths.
|
||||
func (t *Table) getMergedColumnIndices(row rowStr, hint renderHint) map[int]map[int]bool {
|
||||
func (t *Table) getMergedColumnIndices(row rowStr, hint renderHint) mergedColumnIndices {
|
||||
if !t.getRowConfig(hint).AutoMerge {
|
||||
return nil
|
||||
}
|
||||
|
||||
rsp := make(map[int]map[int]bool)
|
||||
appendColumnsToResponse := func(colIdx, otherColIdx int) {
|
||||
if rsp[colIdx] == nil {
|
||||
rsp[colIdx] = make(map[int]bool)
|
||||
}
|
||||
if rsp[otherColIdx] == nil {
|
||||
rsp[otherColIdx] = make(map[int]bool)
|
||||
}
|
||||
rsp[colIdx][otherColIdx] = true
|
||||
rsp[otherColIdx][colIdx] = true
|
||||
}
|
||||
mci := make(mergedColumnIndices)
|
||||
for colIdx := 0; colIdx < t.numColumns-1; colIdx++ {
|
||||
// look backward
|
||||
for otherColIdx := colIdx - 1; colIdx >= 0 && otherColIdx >= 0; otherColIdx-- {
|
||||
if row[colIdx] != row[otherColIdx] {
|
||||
break
|
||||
}
|
||||
appendColumnsToResponse(colIdx, otherColIdx)
|
||||
mci.safeAppend(colIdx, otherColIdx)
|
||||
}
|
||||
// look forward
|
||||
for otherColIdx := colIdx + 1; colIdx < len(row) && otherColIdx < len(row); otherColIdx++ {
|
||||
if row[colIdx] != row[otherColIdx] {
|
||||
break
|
||||
}
|
||||
appendColumnsToResponse(colIdx, otherColIdx)
|
||||
mci.safeAppend(colIdx, otherColIdx)
|
||||
}
|
||||
}
|
||||
return rsp
|
||||
return mci
|
||||
}
|
||||
|
||||
func (t *Table) getRow(rowIdx int, hint renderHint) rowStr {
|
||||
@@ -699,236 +646,10 @@ func (t *Table) hideColumns() map[int]int {
|
||||
return colIdxMap
|
||||
}
|
||||
|
||||
func (t *Table) initForRender() {
|
||||
// pick a default style if none was set until now
|
||||
t.Style()
|
||||
|
||||
// initialize the column configs and normalize them
|
||||
t.initForRenderColumnConfigs()
|
||||
|
||||
// initialize and stringify all the raw rows
|
||||
t.initForRenderRows()
|
||||
|
||||
// find the longest continuous line in each column
|
||||
t.initForRenderColumnLengths()
|
||||
|
||||
// generate a separator row and calculate maximum row length
|
||||
t.initForRenderRowSeparator()
|
||||
|
||||
// reset the counter for the number of lines rendered
|
||||
t.numLinesRendered = 0
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderColumnConfigs() {
|
||||
t.columnConfigMap = map[int]ColumnConfig{}
|
||||
for _, colCfg := range t.columnConfigs {
|
||||
// find the column number if none provided; this logic can work only if
|
||||
// a header row is present and has a column with the given name
|
||||
if colCfg.Number == 0 {
|
||||
for _, row := range t.rowsHeaderRaw {
|
||||
colCfg.Number = row.findColumnNumber(colCfg.Name)
|
||||
if colCfg.Number > 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if colCfg.Number > 0 {
|
||||
t.columnConfigMap[colCfg.Number-1] = colCfg
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderColumnLengths() {
|
||||
t.maxColumnLengths = make([]int, t.numColumns)
|
||||
t.parseRowForMaxColumnLengths(t.rowsHeader, renderHint{isHeaderRow: true})
|
||||
t.parseRowForMaxColumnLengths(t.rows, renderHint{})
|
||||
t.parseRowForMaxColumnLengths(t.rowsFooter, renderHint{isFooterRow: true})
|
||||
|
||||
// increase the column lengths if any are under the limits
|
||||
for colIdx := range t.maxColumnLengths {
|
||||
minWidth := t.getColumnWidthMin(colIdx)
|
||||
if minWidth > 0 && t.maxColumnLengths[colIdx] < minWidth {
|
||||
t.maxColumnLengths[colIdx] = minWidth
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderHideColumns() {
|
||||
if !t.hasHiddenColumns() {
|
||||
return
|
||||
}
|
||||
colIdxMap := t.hideColumns()
|
||||
|
||||
// re-create columnIsNonNumeric with new column indices
|
||||
columnIsNonNumeric := make([]bool, t.numColumns)
|
||||
for oldColIdx, nonNumeric := range t.columnIsNonNumeric {
|
||||
if newColIdx, ok := colIdxMap[oldColIdx]; ok {
|
||||
columnIsNonNumeric[newColIdx] = nonNumeric
|
||||
}
|
||||
}
|
||||
t.columnIsNonNumeric = columnIsNonNumeric
|
||||
|
||||
// re-create columnConfigMap with new column indices
|
||||
columnConfigMap := make(map[int]ColumnConfig)
|
||||
for oldColIdx, cc := range t.columnConfigMap {
|
||||
if newColIdx, ok := colIdxMap[oldColIdx]; ok {
|
||||
columnConfigMap[newColIdx] = cc
|
||||
}
|
||||
}
|
||||
t.columnConfigMap = columnConfigMap
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderRows() {
|
||||
t.reset()
|
||||
|
||||
// auto-index: calc the index column's max length
|
||||
t.autoIndexVIndexMaxLength = len(fmt.Sprint(len(t.rowsRaw)))
|
||||
|
||||
// stringify all the rows to make it easy to render
|
||||
if t.rowPainter != nil {
|
||||
t.rowsColors = make([]text.Colors, len(t.rowsRaw))
|
||||
}
|
||||
t.rows = t.initForRenderRowsStringify(t.rowsRaw, renderHint{})
|
||||
t.rowsFooter = t.initForRenderRowsStringify(t.rowsFooterRaw, renderHint{isFooterRow: true})
|
||||
t.rowsHeader = t.initForRenderRowsStringify(t.rowsHeaderRaw, renderHint{isHeaderRow: true})
|
||||
|
||||
// sort the rows as requested
|
||||
t.initForRenderSortRows()
|
||||
|
||||
// suppress columns without any content
|
||||
t.initForRenderSuppressColumns()
|
||||
|
||||
// strip out hidden columns
|
||||
t.initForRenderHideColumns()
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderRowsStringify(rows []Row, hint renderHint) []rowStr {
|
||||
rowsStr := make([]rowStr, len(rows))
|
||||
for idx, row := range rows {
|
||||
if t.rowPainter != nil && hint.isRegularRow() {
|
||||
t.rowsColors[idx] = t.rowPainter(row)
|
||||
}
|
||||
rowsStr[idx] = t.analyzeAndStringify(row, hint)
|
||||
}
|
||||
return rowsStr
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderRowSeparator() {
|
||||
t.maxRowLength = 0
|
||||
if t.autoIndex {
|
||||
t.maxRowLength += text.RuneWidthWithoutEscSequences(t.style.Box.PaddingLeft)
|
||||
t.maxRowLength += len(fmt.Sprint(len(t.rows)))
|
||||
t.maxRowLength += text.RuneWidthWithoutEscSequences(t.style.Box.PaddingRight)
|
||||
if t.style.Options.SeparateColumns {
|
||||
t.maxRowLength += text.RuneWidthWithoutEscSequences(t.style.Box.MiddleSeparator)
|
||||
}
|
||||
}
|
||||
if t.style.Options.SeparateColumns {
|
||||
t.maxRowLength += text.RuneWidthWithoutEscSequences(t.style.Box.MiddleSeparator) * (t.numColumns - 1)
|
||||
}
|
||||
t.rowSeparator = make(rowStr, t.numColumns)
|
||||
for colIdx, maxColumnLength := range t.maxColumnLengths {
|
||||
maxColumnLength += text.RuneWidthWithoutEscSequences(t.style.Box.PaddingLeft + t.style.Box.PaddingRight)
|
||||
t.maxRowLength += maxColumnLength
|
||||
t.rowSeparator[colIdx] = text.RepeatAndTrim(t.style.Box.MiddleHorizontal, maxColumnLength)
|
||||
}
|
||||
if t.style.Options.DrawBorder {
|
||||
t.maxRowLength += text.RuneWidthWithoutEscSequences(t.style.Box.Left + t.style.Box.Right)
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderSortRows() {
|
||||
if len(t.sortBy) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
// sort the rows
|
||||
sortedRowIndices := t.getSortedRowIndices()
|
||||
sortedRows := make([]rowStr, len(t.rows))
|
||||
for idx := range t.rows {
|
||||
sortedRows[idx] = t.rows[sortedRowIndices[idx]]
|
||||
}
|
||||
t.rows = sortedRows
|
||||
|
||||
// sort the rowsColors
|
||||
if len(t.rowsColors) > 0 {
|
||||
sortedRowsColors := make([]text.Colors, len(t.rows))
|
||||
for idx := range t.rows {
|
||||
sortedRowsColors[idx] = t.rowsColors[sortedRowIndices[idx]]
|
||||
}
|
||||
t.rowsColors = sortedRowsColors
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Table) initForRenderSuppressColumns() {
|
||||
shouldSuppressColumn := func(colIdx int) bool {
|
||||
for _, row := range t.rows {
|
||||
if colIdx < len(row) && row[colIdx] != "" {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
if t.suppressEmptyColumns {
|
||||
for colIdx := 0; colIdx < t.numColumns; colIdx++ {
|
||||
if shouldSuppressColumn(colIdx) {
|
||||
cc := t.columnConfigMap[colIdx]
|
||||
cc.Hidden = true
|
||||
t.columnConfigMap[colIdx] = cc
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Table) isIndexColumn(colIdx int, hint renderHint) bool {
|
||||
return t.indexColumn == colIdx+1 || hint.isAutoIndexColumn
|
||||
}
|
||||
|
||||
func (t *Table) parseRowForMaxColumnLengths(rows []rowStr, hint renderHint) {
|
||||
getMergedColumnsTotalLength := func(colIdx int, mergedColumns map[int]bool) int {
|
||||
mergedColLength := t.maxColumnLengths[colIdx]
|
||||
for otherColIdx := range mergedColumns {
|
||||
mergedColLength += t.maxColumnLengths[otherColIdx]
|
||||
}
|
||||
return mergedColLength
|
||||
}
|
||||
separatorLength := text.RuneWidthWithoutEscSequences(t.style.Box.MiddleSeparator)
|
||||
|
||||
for rowIdx, row := range rows {
|
||||
hint.rowNumber = rowIdx + 1
|
||||
mergedColumnsMap := t.getMergedColumnIndices(row, hint)
|
||||
for colIdx, colStr := range row {
|
||||
longestLineLen := text.LongestLineLen(colStr)
|
||||
maxColWidth := t.getColumnWidthMax(colIdx)
|
||||
if maxColWidth > 0 && maxColWidth < longestLineLen {
|
||||
longestLineLen = maxColWidth
|
||||
}
|
||||
mergedColumnsForCol := mergedColumnsMap[colIdx]
|
||||
mergedColumnsLength := getMergedColumnsTotalLength(colIdx, mergedColumnsForCol)
|
||||
if longestLineLen > mergedColumnsLength {
|
||||
if mergedColumnsLength > 0 {
|
||||
numMergedColumns := len(mergedColumnsForCol) + 1
|
||||
longestLineLen -= (numMergedColumns - 1) * separatorLength
|
||||
maxLengthSplitAcrossColumns := longestLineLen / numMergedColumns
|
||||
if maxLengthSplitAcrossColumns > t.maxColumnLengths[colIdx] {
|
||||
t.maxColumnLengths[colIdx] = maxLengthSplitAcrossColumns
|
||||
}
|
||||
for otherColIdx := range mergedColumnsForCol {
|
||||
if maxLengthSplitAcrossColumns > t.maxColumnLengths[otherColIdx] {
|
||||
t.maxColumnLengths[otherColIdx] = maxLengthSplitAcrossColumns
|
||||
}
|
||||
}
|
||||
} else {
|
||||
t.maxColumnLengths[colIdx] = longestLineLen
|
||||
}
|
||||
} else if maxColWidth == 0 && longestLineLen > t.maxColumnLengths[colIdx] {
|
||||
t.maxColumnLengths[colIdx] = longestLineLen
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Table) render(out *strings.Builder) string {
|
||||
outStr := out.String()
|
||||
if t.outputMirror != nil && len(outStr) > 0 {
|
||||
@@ -938,19 +659,6 @@ func (t *Table) render(out *strings.Builder) string {
|
||||
return outStr
|
||||
}
|
||||
|
||||
func (t *Table) reset() {
|
||||
t.autoIndexVIndexMaxLength = 0
|
||||
t.columnIsNonNumeric = nil
|
||||
t.maxColumnLengths = nil
|
||||
t.maxRowLength = 0
|
||||
t.numColumns = 0
|
||||
t.rowsColors = nil
|
||||
t.rowSeparator = nil
|
||||
t.rows = nil
|
||||
t.rowsFooter = nil
|
||||
t.rowsHeader = nil
|
||||
}
|
||||
|
||||
func (t *Table) shouldMergeCellsHorizontallyAbove(row rowStr, colIdx int, hint renderHint) bool {
|
||||
if hint.isAutoIndexColumn || hint.isAutoIndexRow {
|
||||
return false
|
||||
|
||||
+33
-5
@@ -17,6 +17,14 @@ func AutoIndexColumnID(colIdx int) string {
|
||||
return out
|
||||
}
|
||||
|
||||
// WidthEnforcer is a function that helps enforce a width condition on a string.
|
||||
type WidthEnforcer func(col string, maxLen int) string
|
||||
|
||||
// widthEnforcerNone returns the input string as is without any modifications.
|
||||
func widthEnforcerNone(col string, maxLen int) string {
|
||||
return col
|
||||
}
|
||||
|
||||
// isNumber returns true if the argument is a numeric type; false otherwise.
|
||||
func isNumber(x interface{}) bool {
|
||||
if x == nil {
|
||||
@@ -32,10 +40,30 @@ func isNumber(x interface{}) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// WidthEnforcer is a function that helps enforce a width condition on a string.
|
||||
type WidthEnforcer func(col string, maxLen int) string
|
||||
type mergedColumnIndices map[int]map[int]bool
|
||||
|
||||
// widthEnforcerNone returns the input string as is without any modifications.
|
||||
func widthEnforcerNone(col string, maxLen int) string {
|
||||
return col
|
||||
func (m mergedColumnIndices) mergedLength(colIdx int, maxColumnLengths []int) int {
|
||||
mergedLength := maxColumnLengths[colIdx]
|
||||
for otherColIdx := range m[colIdx] {
|
||||
mergedLength += maxColumnLengths[otherColIdx]
|
||||
}
|
||||
return mergedLength
|
||||
}
|
||||
|
||||
func (m mergedColumnIndices) len(colIdx int) int {
|
||||
return len(m[colIdx]) + 1
|
||||
}
|
||||
|
||||
func (m mergedColumnIndices) safeAppend(colIdx, otherColIdx int) {
|
||||
// map
|
||||
if m[colIdx] == nil {
|
||||
m[colIdx] = make(map[int]bool)
|
||||
}
|
||||
m[colIdx][otherColIdx] = true
|
||||
|
||||
// reverse map
|
||||
if m[otherColIdx] == nil {
|
||||
m[otherColIdx] = make(map[int]bool)
|
||||
}
|
||||
m[otherColIdx][colIdx] = true
|
||||
}
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
|
||||
# Why One Time Passwords?
|
||||
|
||||
One Time Passwords (OTPs) are an mechanism to improve security over passwords alone. When a Time-based OTP (TOTP) is stored on a user's phone, and combined with something the user knows (Password), you have an easy on-ramp to [Multi-factor authentication](http://en.wikipedia.org/wiki/Multi-factor_authentication) without adding a dependency on a SMS provider. This Password and TOTP combination is used by many popular websites including Google, Github, Facebook, Salesforce and many others.
|
||||
One Time Passwords (OTPs) are an mechanism to improve security over passwords alone. When a Time-based OTP (TOTP) is stored on a user's phone, and combined with something the user knows (Password), you have an easy on-ramp to [Multi-factor authentication](http://en.wikipedia.org/wiki/Multi-factor_authentication) without adding a dependency on a SMS provider. This Password and TOTP combination is used by many popular websites including Google, GitHub, Facebook, Salesforce and many others.
|
||||
|
||||
The `otp` library enables you to easily add TOTPs to your own application, increasing your user's security against mass-password breaches and malware.
|
||||
|
||||
@@ -21,7 +21,7 @@ Because TOTP is standardized and widely deployed, there are many [mobile clients
|
||||
|
||||
### User Enrollment
|
||||
|
||||
For an example of a working enrollment work flow, [Github has documented theirs](https://help.github.com/articles/configuring-two-factor-authentication-via-a-totp-mobile-app/
|
||||
For an example of a working enrollment work flow, [GitHub has documented theirs](https://help.github.com/articles/configuring-two-factor-authentication-via-a-totp-mobile-app/
|
||||
), but the basics are:
|
||||
|
||||
1. Generate new TOTP Key for a User. `key,_ := totp.Generate(...)`.
|
||||
|
||||
+2
-1
@@ -19,7 +19,7 @@
|
||||
// one time passcodes in a Google Authenticator compatible manner.
|
||||
//
|
||||
// When adding a TOTP for a user, you must store the "secret" value
|
||||
// persistently. It is recommend to store the secret in an encrypted field in your
|
||||
// persistently. It is recommended to store the secret in an encrypted field in your
|
||||
// datastore. Due to how TOTP works, it is not possible to store a hash
|
||||
// for the secret value like you would a password.
|
||||
//
|
||||
@@ -57,6 +57,7 @@
|
||||
//
|
||||
// Validating a TOTP passcode is very easy, just prompt the user for a passcode
|
||||
// and retrieve the associated user's previously stored secret.
|
||||
//
|
||||
// import "github.com/pquerna/otp/totp"
|
||||
//
|
||||
// passcode := promptForPasscode()
|
||||
|
||||
+7
-2
@@ -19,6 +19,7 @@ package hotp
|
||||
|
||||
import (
|
||||
"github.com/pquerna/otp"
|
||||
"github.com/pquerna/otp/internal"
|
||||
"io"
|
||||
|
||||
"crypto/hmac"
|
||||
@@ -71,6 +72,10 @@ func GenerateCode(secret string, counter uint64) (string, error) {
|
||||
// GenerateCodeCustom uses a counter and secret value and options struct to
|
||||
// create a passcode.
|
||||
func GenerateCodeCustom(secret string, counter uint64, opts ValidateOpts) (passcode string, err error) {
|
||||
//Set default value
|
||||
if opts.Digits == 0 {
|
||||
opts.Digits = otp.DigitsSix
|
||||
}
|
||||
// As noted in issue #10 and #17 this adds support for TOTP secrets that are
|
||||
// missing their padding.
|
||||
secret = strings.TrimSpace(secret)
|
||||
@@ -182,7 +187,7 @@ func Generate(opts GenerateOpts) (*otp.Key, error) {
|
||||
opts.Rand = rand.Reader
|
||||
}
|
||||
|
||||
// otpauth://totp/Example:[email protected]?secret=JBSWY3DPEHPK3PXP&issuer=Example
|
||||
// otpauth://hotp/Example:[email protected]?secret=JBSWY3DPEHPK3PXP&issuer=Example
|
||||
|
||||
v := url.Values{}
|
||||
if len(opts.Secret) != 0 {
|
||||
@@ -204,7 +209,7 @@ func Generate(opts GenerateOpts) (*otp.Key, error) {
|
||||
Scheme: "otpauth",
|
||||
Host: "hotp",
|
||||
Path: "/" + opts.Issuer + ":" + opts.AccountName,
|
||||
RawQuery: v.Encode(),
|
||||
RawQuery: internal.EncodeQuery(v),
|
||||
}
|
||||
|
||||
return otp.NewKeyFromURL(u.String())
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
"net/url"
|
||||
"sort"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// EncodeQuery is a copy-paste of url.Values.Encode, except it uses %20 instead
|
||||
// of + to encode spaces. This is necessary to correctly render spaces in some
|
||||
// authenticator apps, like Google Authenticator.
|
||||
func EncodeQuery(v url.Values) string {
|
||||
if v == nil {
|
||||
return ""
|
||||
}
|
||||
var buf strings.Builder
|
||||
keys := make([]string, 0, len(v))
|
||||
for k := range v {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
sort.Strings(keys)
|
||||
for _, k := range keys {
|
||||
vs := v[k]
|
||||
keyEscaped := url.PathEscape(k) // changed from url.QueryEscape
|
||||
for _, v := range vs {
|
||||
if buf.Len() > 0 {
|
||||
buf.WriteByte('&')
|
||||
}
|
||||
buf.WriteString(keyEscaped)
|
||||
buf.WriteByte('=')
|
||||
buf.WriteString(url.PathEscape(v)) // changed from url.QueryEscape
|
||||
}
|
||||
}
|
||||
return buf.String()
|
||||
}
|
||||
+39
-7
@@ -18,9 +18,6 @@
|
||||
package otp
|
||||
|
||||
import (
|
||||
"github.com/boombuler/barcode"
|
||||
"github.com/boombuler/barcode/qr"
|
||||
|
||||
"crypto/md5"
|
||||
"crypto/sha1"
|
||||
"crypto/sha256"
|
||||
@@ -30,8 +27,11 @@ import (
|
||||
"hash"
|
||||
"image"
|
||||
"net/url"
|
||||
"strings"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/boombuler/barcode"
|
||||
"github.com/boombuler/barcode/qr"
|
||||
)
|
||||
|
||||
// Error when attempting to convert the secret from base32 to raw bytes.
|
||||
@@ -61,7 +61,6 @@ func NewKeyFromURL(orig string) (*Key, error) {
|
||||
s := strings.TrimSpace(orig)
|
||||
|
||||
u, err := url.Parse(s)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -81,7 +80,6 @@ func (k *Key) String() string {
|
||||
// to enroll a user's TOTP/HOTP key.
|
||||
func (k *Key) Image(width int, height int) (image.Image, error) {
|
||||
b, err := qr.Encode(k.orig, qr.M, qr.Auto)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -146,11 +144,45 @@ func (k *Key) Period() uint64 {
|
||||
if u, err := strconv.ParseUint(q.Get("period"), 10, 64); err == nil {
|
||||
return u
|
||||
}
|
||||
|
||||
|
||||
// If no period is defined 30 seconds is the default per (rfc6238)
|
||||
return 30
|
||||
}
|
||||
|
||||
// Digits returns a tiny int representing the number of OTP digits.
|
||||
func (k *Key) Digits() Digits {
|
||||
q := k.url.Query()
|
||||
|
||||
if u, err := strconv.ParseUint(q.Get("digits"), 10, 64); err == nil {
|
||||
switch u {
|
||||
case 8:
|
||||
return DigitsEight
|
||||
default:
|
||||
return DigitsSix
|
||||
}
|
||||
}
|
||||
|
||||
// Six is the most common value.
|
||||
return DigitsSix
|
||||
}
|
||||
|
||||
// Algorithm returns the algorithm used or the default (SHA1).
|
||||
func (k *Key) Algorithm() Algorithm {
|
||||
q := k.url.Query()
|
||||
|
||||
a := strings.ToLower(q.Get("algorithm"))
|
||||
switch a {
|
||||
case "md5":
|
||||
return AlgorithmMD5
|
||||
case "sha256":
|
||||
return AlgorithmSHA256
|
||||
case "sha512":
|
||||
return AlgorithmSHA512
|
||||
default:
|
||||
return AlgorithmSHA1
|
||||
}
|
||||
}
|
||||
|
||||
// URL returns the OTP URL as a string
|
||||
func (k *Key) URL() string {
|
||||
return k.url.String()
|
||||
|
||||
+2
-1
@@ -20,6 +20,7 @@ package totp
|
||||
import (
|
||||
"github.com/pquerna/otp"
|
||||
"github.com/pquerna/otp/hotp"
|
||||
"github.com/pquerna/otp/internal"
|
||||
"io"
|
||||
|
||||
"crypto/rand"
|
||||
@@ -199,7 +200,7 @@ func Generate(opts GenerateOpts) (*otp.Key, error) {
|
||||
Scheme: "otpauth",
|
||||
Host: "totp",
|
||||
Path: "/" + opts.Issuer + ":" + opts.AccountName,
|
||||
RawQuery: v.Encode(),
|
||||
RawQuery: internal.EncodeQuery(v),
|
||||
}
|
||||
|
||||
return otp.NewKeyFromURL(u.String())
|
||||
|
||||
+12
@@ -12,6 +12,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -68,6 +69,17 @@ func BootTimeWithContext(ctx context.Context) (uint64, error) {
|
||||
|
||||
filename := HostProc(statFile)
|
||||
lines, err := ReadLines(filename)
|
||||
if os.IsPermission(err) {
|
||||
var info syscall.Sysinfo_t
|
||||
err := syscall.Sysinfo(&info)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
currentTime := time.Now().UnixNano() / int64(time.Second)
|
||||
t := currentTime - int64(info.Uptime)
|
||||
return uint64(t), nil
|
||||
}
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
+27
@@ -12,6 +12,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/shirou/gopsutil/v3/internal/common"
|
||||
"github.com/tklauser/go-sysconf"
|
||||
)
|
||||
|
||||
// VirtualMemory for Solaris is a minimal implementation which only returns
|
||||
@@ -34,6 +35,13 @@ func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) {
|
||||
return nil, err
|
||||
}
|
||||
result.Total = cap
|
||||
freemem, err := globalZoneFreeMemory(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
result.Available = freemem
|
||||
result.Free = freemem
|
||||
result.Used = result.Total - result.Free
|
||||
} else {
|
||||
cap, err := nonGlobalZoneMemoryCapacity()
|
||||
if err != nil {
|
||||
@@ -85,6 +93,25 @@ func globalZoneMemoryCapacity() (uint64, error) {
|
||||
return totalMB * 1024 * 1024, nil
|
||||
}
|
||||
|
||||
func globalZoneFreeMemory(ctx context.Context) (uint64, error) {
|
||||
output, err := invoke.CommandWithContext(ctx, "pagesize")
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
pagesize, err := strconv.ParseUint(strings.TrimSpace(string(output)), 10, 64)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
free, err := sysconf.Sysconf(sysconf.SC_AVPHYS_PAGES)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return uint64(free) * pagesize, nil
|
||||
}
|
||||
|
||||
var kstatMatch = regexp.MustCompile(`(\S+)\s+(\S*)`)
|
||||
|
||||
func nonGlobalZoneMemoryCapacity() (uint64, error) {
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
env:
|
||||
CIRRUS_CLONE_DEPTH: 1
|
||||
GO_VERSION: go1.19.1
|
||||
|
||||
freebsd_12_task:
|
||||
freebsd_instance:
|
||||
image_family: freebsd-12-3
|
||||
install_script: |
|
||||
pkg install -y go
|
||||
GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest
|
||||
bin/${GO_VERSION} download
|
||||
build_script: bin/${GO_VERSION} build -v ./...
|
||||
test_script: bin/${GO_VERSION} test -race ./...
|
||||
|
||||
freebsd_13_task:
|
||||
freebsd_instance:
|
||||
image_family: freebsd-13-0
|
||||
install_script: |
|
||||
pkg install -y go
|
||||
GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest
|
||||
bin/${GO_VERSION} download
|
||||
build_script: bin/${GO_VERSION} build -v ./...
|
||||
test_script: bin/${GO_VERSION} test -race ./...
|
||||
@@ -0,0 +1 @@
|
||||
_obj/
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2018-2022, Tobias Klauser
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
# go-sysconf
|
||||
|
||||
[](https://pkg.go.dev/github.com/tklauser/go-sysconf)
|
||||
[](https://github.com/tklauser/go-sysconf/actions?query=workflow%3ATests)
|
||||
|
||||
`sysconf` for Go, without using cgo or external binaries (e.g. getconf).
|
||||
|
||||
Supported operating systems: Linux, macOS, DragonflyBSD, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos.
|
||||
|
||||
All POSIX.1 and POSIX.2 variables are supported, see [References](#references) for a complete list.
|
||||
|
||||
Additionally, the following non-standard variables are supported on some operating systems:
|
||||
|
||||
| Variable | Supported on |
|
||||
|---|---|
|
||||
| `SC_PHYS_PAGES` | Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos |
|
||||
| `SC_AVPHYS_PAGES` | Linux, OpenBSD, Solaris/Illumos |
|
||||
| `SC_NPROCESSORS_CONF` | Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos |
|
||||
| `SC_NPROCESSORS_ONLN` | Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos |
|
||||
| `SC_UIO_MAXIOV` | Linux |
|
||||
|
||||
## Usage
|
||||
|
||||
```Go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/tklauser/go-sysconf"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// get clock ticks, this will return the same as C.sysconf(C._SC_CLK_TCK)
|
||||
clktck, err := sysconf.Sysconf(sysconf.SC_CLK_TCK)
|
||||
if err == nil {
|
||||
fmt.Printf("SC_CLK_TCK: %v\n", clktck)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## References
|
||||
|
||||
* [POSIX documenation for `sysconf`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/sysconf.html)
|
||||
* [Linux manpage for `sysconf(3)`](http://man7.org/linux/man-pages/man3/sysconf.3.html)
|
||||
* [glibc constants for `sysconf` parameters](https://www.gnu.org/software/libc/manual/html_node/Constants-for-Sysconf.html)
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// Copyright 2018 Tobias Klauser. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package sysconf implements the sysconf(3) function and provides the
|
||||
// associated SC_* constants to query system configuration values.
|
||||
package sysconf
|
||||
|
||||
import "errors"
|
||||
|
||||
//go:generate go run mksysconf.go
|
||||
|
||||
var errInvalid = errors.New("invalid parameter value")
|
||||
|
||||
// Sysconf returns the value of a sysconf(3) runtime system parameter.
|
||||
// The name parameter should be a SC_* constant define in this package. The
|
||||
// implementation is GOOS-specific and certain SC_* constants might not be
|
||||
// defined for all GOOSes.
|
||||
func Sysconf(name int) (int64, error) {
|
||||
return sysconf(name)
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
// Copyright 2018 Tobias Klauser. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build darwin || dragonfly || freebsd || netbsd || openbsd
|
||||
// +build darwin dragonfly freebsd netbsd openbsd
|
||||
|
||||
package sysconf
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
func pathconf(path string, name int) int64 {
|
||||
if val, err := unix.Pathconf(path, name); err == nil {
|
||||
return int64(val)
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
func sysctl32(name string) int64 {
|
||||
if val, err := unix.SysctlUint32(name); err == nil {
|
||||
return int64(val)
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
func sysctl64(name string) int64 {
|
||||
if val, err := unix.SysctlUint64(name); err == nil {
|
||||
return int64(val)
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
func yesno(val int64) int64 {
|
||||
if val == 0 {
|
||||
return -1
|
||||
}
|
||||
return val
|
||||
}
|
||||
+267
@@ -0,0 +1,267 @@
|
||||
// Copyright 2018 Tobias Klauser. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package sysconf
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
const (
|
||||
_HOST_NAME_MAX = _MAXHOSTNAMELEN - 1
|
||||
_LOGIN_NAME_MAX = _MAXLOGNAME
|
||||
_SYMLOOP_MAX = _MAXSYMLINKS
|
||||
)
|
||||
|
||||
// sysconf implements sysconf(3) as in the Darwin libc, version 1244.30.3
|
||||
// (derived from the FreeBSD libc).
|
||||
func sysconf(name int) (int64, error) {
|
||||
switch name {
|
||||
case SC_AIO_LISTIO_MAX:
|
||||
fallthrough
|
||||
case SC_AIO_MAX:
|
||||
return sysctl32("kern.aiomax"), nil
|
||||
case SC_AIO_PRIO_DELTA_MAX:
|
||||
return -1, nil
|
||||
case SC_ARG_MAX:
|
||||
return sysctl32("kern.argmax"), nil
|
||||
case SC_ATEXIT_MAX:
|
||||
return _INT_MAX, nil
|
||||
case SC_CHILD_MAX:
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil {
|
||||
if rlim.Cur != unix.RLIM_INFINITY {
|
||||
return int64(rlim.Cur), nil
|
||||
}
|
||||
}
|
||||
return -1, nil
|
||||
case SC_CLK_TCK:
|
||||
return _CLK_TCK, nil
|
||||
case SC_DELAYTIMER_MAX:
|
||||
return -1, nil
|
||||
case SC_GETGR_R_SIZE_MAX:
|
||||
return 4096, nil
|
||||
case SC_GETPW_R_SIZE_MAX:
|
||||
return 4096, nil
|
||||
case SC_IOV_MAX:
|
||||
return _IOV_MAX, nil
|
||||
case SC_MQ_OPEN_MAX:
|
||||
return -1, nil
|
||||
case SC_MQ_PRIO_MAX:
|
||||
return -1, nil
|
||||
case SC_NGROUPS_MAX:
|
||||
return sysctl32("kern.ngroups"), nil
|
||||
case SC_OPEN_MAX, SC_STREAM_MAX:
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
|
||||
if rlim.Cur != unix.RLIM_INFINITY {
|
||||
return int64(rlim.Cur), nil
|
||||
}
|
||||
}
|
||||
return -1, nil
|
||||
case SC_RTSIG_MAX:
|
||||
return -1, nil
|
||||
case SC_SEM_NSEMS_MAX:
|
||||
return sysctl32("kern.sysv.semmns"), nil
|
||||
case SC_SEM_VALUE_MAX:
|
||||
return _POSIX_SEM_VALUE_MAX, nil
|
||||
case SC_SIGQUEUE_MAX:
|
||||
return -1, nil
|
||||
case SC_THREAD_DESTRUCTOR_ITERATIONS:
|
||||
return _PTHREAD_DESTRUCTOR_ITERATIONS, nil
|
||||
case SC_THREAD_KEYS_MAX:
|
||||
return _PTHREAD_KEYS_MAX, nil
|
||||
case SC_THREAD_PRIO_INHERIT:
|
||||
return _POSIX_THREAD_PRIO_INHERIT, nil
|
||||
case SC_THREAD_PRIO_PROTECT:
|
||||
return _POSIX_THREAD_PRIO_PROTECT, nil
|
||||
case SC_THREAD_STACK_MIN:
|
||||
return _PTHREAD_STACK_MIN, nil
|
||||
case SC_THREAD_THREADS_MAX:
|
||||
return -1, nil
|
||||
case SC_TIMER_MAX:
|
||||
return -1, nil
|
||||
case SC_TTY_NAME_MAX:
|
||||
// should be _PATH_DEV instead of "/"
|
||||
return pathconf("/", _PC_NAME_MAX), nil
|
||||
case SC_TZNAME_MAX:
|
||||
return pathconf(_PATH_ZONEINFO, _PC_NAME_MAX), nil
|
||||
|
||||
case SC_IPV6:
|
||||
if _POSIX_IPV6 == 0 {
|
||||
fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0)
|
||||
if err == nil && fd >= 0 {
|
||||
unix.Close(fd)
|
||||
return int64(200112), nil
|
||||
}
|
||||
return 0, nil
|
||||
}
|
||||
return _POSIX_IPV6, nil
|
||||
case SC_MESSAGE_PASSING:
|
||||
if _POSIX_MESSAGE_PASSING == 0 {
|
||||
return yesno(sysctl32("p1003_1b.message_passing")), nil
|
||||
}
|
||||
return _POSIX_MESSAGE_PASSING, nil
|
||||
case SC_PRIORITIZED_IO:
|
||||
if _POSIX_PRIORITIZED_IO == 0 {
|
||||
return yesno(sysctl32("p1003_1b.prioritized_io")), nil
|
||||
}
|
||||
return _POSIX_PRIORITIZED_IO, nil
|
||||
case SC_PRIORITY_SCHEDULING:
|
||||
if _POSIX_PRIORITY_SCHEDULING == 0 {
|
||||
return yesno(sysctl32("p1003_1b.priority_scheduling")), nil
|
||||
}
|
||||
return _POSIX_PRIORITY_SCHEDULING, nil
|
||||
case SC_REALTIME_SIGNALS:
|
||||
if _POSIX_REALTIME_SIGNALS == 0 {
|
||||
return yesno(sysctl32("p1003_1b.realtime_signals")), nil
|
||||
}
|
||||
return _POSIX_REALTIME_SIGNALS, nil
|
||||
case SC_SAVED_IDS:
|
||||
return yesno(sysctl32("kern.saved_ids")), nil
|
||||
case SC_SEMAPHORES:
|
||||
if _POSIX_SEMAPHORES == 0 {
|
||||
return yesno(sysctl32("p1003_1b.semaphores")), nil
|
||||
}
|
||||
return _POSIX_SEMAPHORES, nil
|
||||
case SC_SPAWN:
|
||||
return _POSIX_SPAWN, nil
|
||||
case SC_SPIN_LOCKS:
|
||||
return _POSIX_SPIN_LOCKS, nil
|
||||
case SC_SPORADIC_SERVER:
|
||||
return _POSIX_SPORADIC_SERVER, nil
|
||||
case SC_SS_REPL_MAX:
|
||||
return _POSIX_SS_REPL_MAX, nil
|
||||
case SC_SYNCHRONIZED_IO:
|
||||
if _POSIX_SYNCHRONIZED_IO == 0 {
|
||||
return yesno(sysctl32("p1003_1b.synchronized_io")), nil
|
||||
}
|
||||
return _POSIX_SYNCHRONIZED_IO, nil
|
||||
case SC_THREAD_ATTR_STACKADDR:
|
||||
return _POSIX_THREAD_ATTR_STACKADDR, nil
|
||||
case SC_THREAD_ATTR_STACKSIZE:
|
||||
return _POSIX_THREAD_ATTR_STACKSIZE, nil
|
||||
case SC_THREAD_CPUTIME:
|
||||
return _POSIX_THREAD_CPUTIME, nil
|
||||
case SC_THREAD_PRIORITY_SCHEDULING:
|
||||
return _POSIX_THREAD_PRIORITY_SCHEDULING, nil
|
||||
case SC_THREAD_PROCESS_SHARED:
|
||||
return _POSIX_THREAD_PROCESS_SHARED, nil
|
||||
case SC_THREAD_SAFE_FUNCTIONS:
|
||||
return _POSIX_THREAD_SAFE_FUNCTIONS, nil
|
||||
case SC_THREAD_SPORADIC_SERVER:
|
||||
return _POSIX_THREAD_SPORADIC_SERVER, nil
|
||||
case SC_TIMERS:
|
||||
if _POSIX_TIMERS == 0 {
|
||||
return yesno(sysctl32("p1003_1b.timers")), nil
|
||||
}
|
||||
return _POSIX_TIMERS, nil
|
||||
case SC_TRACE:
|
||||
return _POSIX_TRACE, nil
|
||||
case SC_TRACE_EVENT_FILTER:
|
||||
return _POSIX_TRACE_EVENT_FILTER, nil
|
||||
case SC_TRACE_EVENT_NAME_MAX:
|
||||
return _POSIX_TRACE_EVENT_NAME_MAX, nil
|
||||
case SC_TRACE_INHERIT:
|
||||
return _POSIX_TRACE_INHERIT, nil
|
||||
case SC_TRACE_LOG:
|
||||
return _POSIX_TRACE_LOG, nil
|
||||
case SC_TRACE_NAME_MAX:
|
||||
return _POSIX_TRACE_NAME_MAX, nil
|
||||
case SC_TRACE_SYS_MAX:
|
||||
return _POSIX_TRACE_SYS_MAX, nil
|
||||
case SC_TRACE_USER_EVENT_MAX:
|
||||
return _POSIX_TRACE_USER_EVENT_MAX, nil
|
||||
case SC_TYPED_MEMORY_OBJECTS:
|
||||
return _POSIX_TYPED_MEMORY_OBJECTS, nil
|
||||
case SC_VERSION:
|
||||
// TODO(tk): darwin libc uses sysctl(CTL_KERN, KERN_POSIX1)
|
||||
return _POSIX_VERSION, nil
|
||||
|
||||
case SC_V6_ILP32_OFF32:
|
||||
if _V6_ILP32_OFF32 == 0 {
|
||||
if unix.SizeofInt*_CHAR_BIT == 32 &&
|
||||
unix.SizeofInt == unix.SizeofLong &&
|
||||
unix.SizeofLong == unix.SizeofPtr &&
|
||||
unix.SizeofPtr == sizeofOffT {
|
||||
return 1, nil
|
||||
}
|
||||
return -1, nil
|
||||
}
|
||||
return _V6_ILP32_OFF32, nil
|
||||
case SC_V6_ILP32_OFFBIG:
|
||||
if _V6_ILP32_OFFBIG == 0 {
|
||||
if unix.SizeofInt*_CHAR_BIT == 32 &&
|
||||
unix.SizeofInt == unix.SizeofLong &&
|
||||
unix.SizeofLong == unix.SizeofPtr &&
|
||||
sizeofOffT*_CHAR_BIT >= 64 {
|
||||
return 1, nil
|
||||
}
|
||||
return -1, nil
|
||||
}
|
||||
return _V6_ILP32_OFFBIG, nil
|
||||
case SC_V6_LP64_OFF64:
|
||||
if _V6_LP64_OFF64 == 0 {
|
||||
if unix.SizeofInt*_CHAR_BIT == 32 &&
|
||||
unix.SizeofLong*_CHAR_BIT == 64 &&
|
||||
unix.SizeofLong == unix.SizeofPtr &&
|
||||
unix.SizeofPtr == sizeofOffT {
|
||||
return 1, nil
|
||||
}
|
||||
return -1, nil
|
||||
}
|
||||
return _V6_LP64_OFF64, nil
|
||||
case SC_V6_LPBIG_OFFBIG:
|
||||
if _V6_LPBIG_OFFBIG == 0 {
|
||||
if unix.SizeofInt*_CHAR_BIT >= 32 &&
|
||||
unix.SizeofLong*_CHAR_BIT >= 64 &&
|
||||
unix.SizeofPtr*_CHAR_BIT >= 64 &&
|
||||
sizeofOffT*_CHAR_BIT >= 64 {
|
||||
return 1, nil
|
||||
}
|
||||
return -1, nil
|
||||
}
|
||||
return _V6_LPBIG_OFFBIG, nil
|
||||
|
||||
case SC_2_CHAR_TERM:
|
||||
return _POSIX2_CHAR_TERM, nil
|
||||
case SC_2_PBS,
|
||||
SC_2_PBS_ACCOUNTING,
|
||||
SC_2_PBS_CHECKPOINT,
|
||||
SC_2_PBS_LOCATE,
|
||||
SC_2_PBS_MESSAGE,
|
||||
SC_2_PBS_TRACK:
|
||||
return _POSIX2_PBS, nil
|
||||
case SC_2_UPE:
|
||||
return _POSIX2_UPE, nil
|
||||
|
||||
case SC_XOPEN_CRYPT:
|
||||
return _XOPEN_CRYPT, nil
|
||||
case SC_XOPEN_ENH_I18N:
|
||||
return _XOPEN_ENH_I18N, nil
|
||||
case SC_XOPEN_REALTIME:
|
||||
return _XOPEN_REALTIME, nil
|
||||
case SC_XOPEN_REALTIME_THREADS:
|
||||
return _XOPEN_REALTIME_THREADS, nil
|
||||
case SC_XOPEN_SHM:
|
||||
return _XOPEN_SHM, nil
|
||||
case SC_XOPEN_STREAMS:
|
||||
return -1, nil
|
||||
case SC_XOPEN_UNIX:
|
||||
return _XOPEN_UNIX, nil
|
||||
case SC_XOPEN_VERSION:
|
||||
return _XOPEN_VERSION, nil
|
||||
case SC_XOPEN_XCU_VERSION:
|
||||
return _XOPEN_XCU_VERSION, nil
|
||||
|
||||
case SC_PHYS_PAGES:
|
||||
return sysctl64("hw.memsize") / int64(unix.Getpagesize()), nil
|
||||
case SC_NPROCESSORS_CONF:
|
||||
fallthrough
|
||||
case SC_NPROCESSORS_ONLN:
|
||||
return sysctl32("hw.ncpu"), nil
|
||||
}
|
||||
|
||||
return sysconfGeneric(name)
|
||||
}
|
||||
+220
@@ -0,0 +1,220 @@
|
||||
// Copyright 2018 Tobias Klauser. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package sysconf
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
const (
|
||||
_HOST_NAME_MAX = _MAXHOSTNAMELEN - 1
|
||||
_LOGIN_NAME_MAX = _MAXLOGNAME
|
||||
_SYMLOOP_MAX = _MAXSYMLINKS
|
||||
)
|
||||
|
||||
// sysconf implements sysconf(3) as in the FreeBSD 12 libc.
|
||||
func sysconf(name int) (int64, error) {
|
||||
switch name {
|
||||
case SC_AIO_LISTIO_MAX:
|
||||
return sysctl32("p1003_1b.aio_listio_max"), nil
|
||||
case SC_AIO_MAX:
|
||||
return sysctl32("p1003_1b.aio_max"), nil
|
||||
case SC_AIO_PRIO_DELTA_MAX:
|
||||
return sysctl32("p1003_1b.aio_prio_delta_max"), nil
|
||||
case SC_ARG_MAX:
|
||||
return sysctl32("kern.argmax"), nil
|
||||
case SC_ATEXIT_MAX:
|
||||
return _ATEXIT_SIZE, nil
|
||||
case SC_CHILD_MAX:
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil {
|
||||
if rlim.Cur != unix.RLIM_INFINITY {
|
||||
return rlim.Cur, nil
|
||||
}
|
||||
}
|
||||
return -1, nil
|
||||
case SC_CLK_TCK:
|
||||
return _CLK_TCK, nil
|
||||
case SC_DELAYTIMER_MAX:
|
||||
return yesno(sysctl32("p1003_1b.delaytimer_max")), nil
|
||||
case SC_GETGR_R_SIZE_MAX, SC_GETPW_R_SIZE_MAX:
|
||||
return -1, nil
|
||||
case SC_IOV_MAX:
|
||||
return sysctl32("kern.iov_max"), nil
|
||||
case SC_MQ_OPEN_MAX:
|
||||
return sysctl32("kern.mqueue.mq_open_max"), nil
|
||||
case SC_MQ_PRIO_MAX:
|
||||
return sysctl32("kern.mqueue.mq_prio_max"), nil
|
||||
case SC_NGROUPS_MAX:
|
||||
return sysctl32("kern.ngroups"), nil
|
||||
case SC_OPEN_MAX:
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
|
||||
if rlim.Cur != unix.RLIM_INFINITY {
|
||||
return rlim.Cur, nil
|
||||
}
|
||||
}
|
||||
return -1, nil
|
||||
case SC_RTSIG_MAX:
|
||||
return yesno(sysctl32("p1003_1b.rtsig_max")), nil
|
||||
case SC_SEM_NSEMS_MAX:
|
||||
return -1, nil
|
||||
case SC_SEM_VALUE_MAX:
|
||||
return -1, nil
|
||||
case SC_SIGQUEUE_MAX:
|
||||
return yesno(sysctl32("p1003_1b.sigqueue_max")), nil
|
||||
case SC_STREAM_MAX:
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
|
||||
if rlim.Cur != unix.RLIM_INFINITY {
|
||||
return rlim.Cur, nil
|
||||
}
|
||||
}
|
||||
return -1, nil
|
||||
case SC_THREAD_DESTRUCTOR_ITERATIONS:
|
||||
return _PTHREAD_DESTRUCTOR_ITERATIONS, nil
|
||||
case SC_THREAD_KEYS_MAX:
|
||||
return _PTHREAD_KEYS_MAX, nil
|
||||
case SC_THREAD_PRIO_INHERIT:
|
||||
return _POSIX_THREAD_PRIO_INHERIT, nil
|
||||
case SC_THREAD_PRIO_PROTECT:
|
||||
return _POSIX_THREAD_PRIO_PROTECT, nil
|
||||
case SC_THREAD_STACK_MIN:
|
||||
return _PTHREAD_STACK_MIN, nil
|
||||
case SC_THREAD_THREADS_MAX:
|
||||
return -1, nil
|
||||
case SC_TIMER_MAX:
|
||||
return yesno(sysctl32("p1003_1b.timer_max")), nil
|
||||
case SC_TTY_NAME_MAX:
|
||||
return pathconf(_PATH_DEV, _PC_NAME_MAX), nil
|
||||
case SC_TZNAME_MAX:
|
||||
return pathconf(_PATH_ZONEINFO, _PC_NAME_MAX), nil
|
||||
|
||||
case SC_ASYNCHRONOUS_IO:
|
||||
if _POSIX_ASYNCHRONOUS_IO == 0 {
|
||||
return sysctl64("p1003_1b.asynchronous_io"), nil
|
||||
}
|
||||
return _POSIX_ASYNCHRONOUS_IO, nil
|
||||
case SC_IPV6:
|
||||
if _POSIX_IPV6 == 0 {
|
||||
fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0)
|
||||
if err == nil && fd >= 0 {
|
||||
unix.Close(fd)
|
||||
return int64(200112), nil
|
||||
}
|
||||
return 0, nil
|
||||
}
|
||||
return _POSIX_IPV6, nil
|
||||
case SC_MESSAGE_PASSING:
|
||||
if _POSIX_MESSAGE_PASSING == 0 {
|
||||
return yesno(sysctl32("p1003_1b.message_passing")), nil
|
||||
}
|
||||
return _POSIX_MESSAGE_PASSING, nil
|
||||
case SC_PRIORITIZED_IO:
|
||||
if _POSIX_PRIORITIZED_IO == 0 {
|
||||
return yesno(sysctl32("p1003_1b.prioritized_io")), nil
|
||||
}
|
||||
return _POSIX_PRIORITIZED_IO, nil
|
||||
case SC_PRIORITY_SCHEDULING:
|
||||
if _POSIX_PRIORITY_SCHEDULING == 0 {
|
||||
return yesno(sysctl32("p1003_1b.priority_scheduling")), nil
|
||||
}
|
||||
return _POSIX_PRIORITY_SCHEDULING, nil
|
||||
case SC_REALTIME_SIGNALS:
|
||||
if _POSIX_REALTIME_SIGNALS == 0 {
|
||||
return yesno(sysctl32("p1003_1b.realtime_signals")), nil
|
||||
}
|
||||
return _POSIX_REALTIME_SIGNALS, nil
|
||||
case SC_SAVED_IDS:
|
||||
return yesno(sysctl32("kern.saved_ids")), nil
|
||||
case SC_SEMAPHORES:
|
||||
if _POSIX_SEMAPHORES == 0 {
|
||||
return yesno(sysctl32("p1003_1b.semaphores")), nil
|
||||
}
|
||||
return _POSIX_SEMAPHORES, nil
|
||||
case SC_SPAWN:
|
||||
return _POSIX_SPAWN, nil
|
||||
case SC_SPIN_LOCKS:
|
||||
return _POSIX_SPIN_LOCKS, nil
|
||||
case SC_SPORADIC_SERVER:
|
||||
return _POSIX_SPORADIC_SERVER, nil
|
||||
case SC_SYNCHRONIZED_IO:
|
||||
if _POSIX_SYNCHRONIZED_IO == 0 {
|
||||
return yesno(sysctl32("p1003_1b.synchronized_io")), nil
|
||||
}
|
||||
return _POSIX_SYNCHRONIZED_IO, nil
|
||||
case SC_THREAD_ATTR_STACKADDR:
|
||||
return _POSIX_THREAD_ATTR_STACKADDR, nil
|
||||
case SC_THREAD_ATTR_STACKSIZE:
|
||||
return _POSIX_THREAD_ATTR_STACKSIZE, nil
|
||||
case SC_THREAD_CPUTIME:
|
||||
return _POSIX_THREAD_CPUTIME, nil
|
||||
case SC_THREAD_PRIORITY_SCHEDULING:
|
||||
return _POSIX_THREAD_PRIORITY_SCHEDULING, nil
|
||||
case SC_THREAD_PROCESS_SHARED:
|
||||
return _POSIX_THREAD_PROCESS_SHARED, nil
|
||||
case SC_THREAD_SAFE_FUNCTIONS:
|
||||
return _POSIX_THREAD_SAFE_FUNCTIONS, nil
|
||||
case SC_THREAD_SPORADIC_SERVER:
|
||||
return _POSIX_THREAD_SPORADIC_SERVER, nil
|
||||
case SC_TIMERS:
|
||||
if _POSIX_TIMERS == 0 {
|
||||
return yesno(sysctl32("p1003_1b.timers")), nil
|
||||
}
|
||||
return _POSIX_TIMERS, nil
|
||||
case SC_TRACE:
|
||||
return _POSIX_TRACE, nil
|
||||
case SC_TYPED_MEMORY_OBJECTS:
|
||||
return _POSIX_TYPED_MEMORY_OBJECTS, nil
|
||||
case SC_VERSION:
|
||||
// TODO(tk): FreeBSD libc uses sysctl(CTL_KERN, KERN_POSIX1)
|
||||
return _POSIX_VERSION, nil
|
||||
|
||||
/* TODO(tk): these need GOARCH-dependent integer size checks
|
||||
case SC_V6_ILP32_OFF32:
|
||||
return _V6_ILP32_OFF32, nil
|
||||
case SC_V6_ILP32_OFFBIG:
|
||||
return _V6_ILP32_OFFBIG, nil
|
||||
case SC_V6_LP64_OFF64:
|
||||
return _V6_LP64_OFF64, nil
|
||||
case SC_V6_LPBIG_OFFBIG:
|
||||
return _V6_LPBIG_OFFBIG, nil
|
||||
*/
|
||||
|
||||
case SC_2_CHAR_TERM:
|
||||
return _POSIX2_CHAR_TERM, nil
|
||||
case SC_2_PBS,
|
||||
SC_2_PBS_ACCOUNTING,
|
||||
SC_2_PBS_CHECKPOINT,
|
||||
SC_2_PBS_LOCATE,
|
||||
SC_2_PBS_MESSAGE,
|
||||
SC_2_PBS_TRACK:
|
||||
return _POSIX2_PBS, nil
|
||||
case SC_2_UPE:
|
||||
return _POSIX2_UPE, nil
|
||||
|
||||
case SC_XOPEN_CRYPT:
|
||||
return _XOPEN_CRYPT, nil
|
||||
case SC_XOPEN_ENH_I18N:
|
||||
return _XOPEN_ENH_I18N, nil
|
||||
case SC_XOPEN_REALTIME:
|
||||
return _XOPEN_REALTIME, nil
|
||||
case SC_XOPEN_REALTIME_THREADS:
|
||||
return _XOPEN_REALTIME_THREADS, nil
|
||||
case SC_XOPEN_SHM:
|
||||
return _XOPEN_SHM, nil
|
||||
case SC_XOPEN_STREAMS:
|
||||
return -1, nil
|
||||
case SC_XOPEN_UNIX:
|
||||
return _XOPEN_UNIX, nil
|
||||
|
||||
case SC_PHYS_PAGES:
|
||||
return sysctl64("hw.availpages"), nil
|
||||
case SC_NPROCESSORS_CONF:
|
||||
fallthrough
|
||||
case SC_NPROCESSORS_ONLN:
|
||||
return sysctl32("hw.ncpu"), nil
|
||||
}
|
||||
|
||||
return sysconfGeneric(name)
|
||||
}
|
||||
+226
@@ -0,0 +1,226 @@
|
||||
// Copyright 2018 Tobias Klauser. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package sysconf
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
const (
|
||||
_HOST_NAME_MAX = _MAXHOSTNAMELEN - 1
|
||||
_LOGIN_NAME_MAX = _MAXLOGNAME
|
||||
_SYMLOOP_MAX = _MAXSYMLINKS
|
||||
)
|
||||
|
||||
// sysconf implements sysconf(3) as in the FreeBSD 12 libc.
|
||||
func sysconf(name int) (int64, error) {
|
||||
switch name {
|
||||
case SC_AIO_LISTIO_MAX:
|
||||
return sysctl32("p1003_1b.aio_listio_max"), nil
|
||||
case SC_AIO_MAX:
|
||||
return sysctl32("p1003_1b.aio_max"), nil
|
||||
case SC_AIO_PRIO_DELTA_MAX:
|
||||
return sysctl32("p1003_1b.aio_prio_delta_max"), nil
|
||||
case SC_ARG_MAX:
|
||||
return sysctl32("kern.argmax"), nil
|
||||
case SC_ATEXIT_MAX:
|
||||
return _ATEXIT_SIZE, nil
|
||||
case SC_CHILD_MAX:
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil {
|
||||
if rlim.Cur != unix.RLIM_INFINITY {
|
||||
return rlim.Cur, nil
|
||||
}
|
||||
}
|
||||
return -1, nil
|
||||
case SC_CLK_TCK:
|
||||
return _CLK_TCK, nil
|
||||
case SC_DELAYTIMER_MAX:
|
||||
return sysctl32("p1003_1b.delaytimer_max"), nil
|
||||
case SC_GETGR_R_SIZE_MAX, SC_GETPW_R_SIZE_MAX:
|
||||
return -1, nil
|
||||
case SC_IOV_MAX:
|
||||
return sysctl32("kern.iov_max"), nil
|
||||
case SC_MQ_OPEN_MAX:
|
||||
return yesno(sysctl32("p1003_1b.mq_open_max")), nil
|
||||
case SC_MQ_PRIO_MAX:
|
||||
return _MQ_PRIO_MAX, nil
|
||||
case SC_NGROUPS_MAX:
|
||||
return sysctl32("kern.ngroups"), nil
|
||||
case SC_OPEN_MAX:
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
|
||||
if rlim.Cur != unix.RLIM_INFINITY {
|
||||
return rlim.Cur, nil
|
||||
}
|
||||
}
|
||||
return -1, nil
|
||||
case SC_RTSIG_MAX:
|
||||
return sysctl32("p1003_1b.rtsig_max"), nil
|
||||
case SC_SEM_NSEMS_MAX:
|
||||
return -1, nil
|
||||
case SC_SEM_VALUE_MAX:
|
||||
return _SEM_VALUE_MAX, nil
|
||||
case SC_SIGQUEUE_MAX:
|
||||
return sysctl32("p1003_1b.sigqueue_max"), nil
|
||||
case SC_STREAM_MAX:
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err != nil {
|
||||
return -1, nil
|
||||
}
|
||||
if rlim.Cur == unix.RLIM_INFINITY {
|
||||
return -1, nil
|
||||
}
|
||||
if rlim.Cur > _LONG_MAX {
|
||||
return -1, unix.EOVERFLOW
|
||||
}
|
||||
if rlim.Cur > _SHRT_MAX {
|
||||
return _SHRT_MAX, nil
|
||||
}
|
||||
return rlim.Cur, nil
|
||||
case SC_THREAD_DESTRUCTOR_ITERATIONS:
|
||||
return _PTHREAD_DESTRUCTOR_ITERATIONS, nil
|
||||
case SC_THREAD_KEYS_MAX:
|
||||
return _PTHREAD_KEYS_MAX, nil
|
||||
case SC_THREAD_PRIO_INHERIT:
|
||||
return _POSIX_THREAD_PRIO_INHERIT, nil
|
||||
case SC_THREAD_PRIO_PROTECT:
|
||||
return _POSIX_THREAD_PRIO_PROTECT, nil
|
||||
case SC_THREAD_STACK_MIN:
|
||||
return _PTHREAD_STACK_MIN, nil
|
||||
case SC_THREAD_THREADS_MAX:
|
||||
return -1, nil
|
||||
case SC_TIMER_MAX:
|
||||
return yesno(sysctl32("p1003_1b.timer_max")), nil
|
||||
case SC_TTY_NAME_MAX:
|
||||
return pathconf(_PATH_DEV, _PC_NAME_MAX), nil
|
||||
case SC_TZNAME_MAX:
|
||||
return pathconf(_PATH_ZONEINFO, _PC_NAME_MAX), nil
|
||||
|
||||
case SC_IPV6:
|
||||
if _POSIX_IPV6 == 0 {
|
||||
fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0)
|
||||
if err == nil && fd >= 0 {
|
||||
unix.Close(fd)
|
||||
return int64(200112), nil
|
||||
}
|
||||
return 0, nil
|
||||
}
|
||||
return _POSIX_IPV6, nil
|
||||
case SC_MESSAGE_PASSING:
|
||||
if _POSIX_MESSAGE_PASSING == 0 {
|
||||
return yesno(sysctl32("p1003_1b.message_passing")), nil
|
||||
}
|
||||
return _POSIX_MESSAGE_PASSING, nil
|
||||
case SC_PRIORITIZED_IO:
|
||||
if _POSIX_PRIORITIZED_IO == 0 {
|
||||
return yesno(sysctl32("p1003_1b.prioritized_io")), nil
|
||||
}
|
||||
return _POSIX_PRIORITIZED_IO, nil
|
||||
case SC_PRIORITY_SCHEDULING:
|
||||
if _POSIX_PRIORITY_SCHEDULING == 0 {
|
||||
return yesno(sysctl32("p1003_1b.priority_scheduling")), nil
|
||||
}
|
||||
return _POSIX_PRIORITY_SCHEDULING, nil
|
||||
case SC_REALTIME_SIGNALS:
|
||||
if _POSIX_REALTIME_SIGNALS == 0 {
|
||||
return yesno(sysctl32("p1003_1b.realtime_signals")), nil
|
||||
}
|
||||
return _POSIX_REALTIME_SIGNALS, nil
|
||||
case SC_SAVED_IDS:
|
||||
return yesno(sysctl32("kern.saved_ids")), nil
|
||||
case SC_SEMAPHORES:
|
||||
if _POSIX_SEMAPHORES == 0 {
|
||||
return yesno(sysctl32("p1003_1b.semaphores")), nil
|
||||
}
|
||||
return _POSIX_SEMAPHORES, nil
|
||||
case SC_SPAWN:
|
||||
return _POSIX_SPAWN, nil
|
||||
case SC_SPIN_LOCKS:
|
||||
return _POSIX_SPIN_LOCKS, nil
|
||||
case SC_SPORADIC_SERVER:
|
||||
return _POSIX_SPORADIC_SERVER, nil
|
||||
case SC_SYNCHRONIZED_IO:
|
||||
if _POSIX_SYNCHRONIZED_IO == 0 {
|
||||
return yesno(sysctl32("p1003_1b.synchronized_io")), nil
|
||||
}
|
||||
return _POSIX_SYNCHRONIZED_IO, nil
|
||||
case SC_THREAD_ATTR_STACKADDR:
|
||||
return _POSIX_THREAD_ATTR_STACKADDR, nil
|
||||
case SC_THREAD_ATTR_STACKSIZE:
|
||||
return _POSIX_THREAD_ATTR_STACKSIZE, nil
|
||||
case SC_THREAD_CPUTIME:
|
||||
return _POSIX_THREAD_CPUTIME, nil
|
||||
case SC_THREAD_PRIORITY_SCHEDULING:
|
||||
return _POSIX_THREAD_PRIORITY_SCHEDULING, nil
|
||||
case SC_THREAD_PROCESS_SHARED:
|
||||
return _POSIX_THREAD_PROCESS_SHARED, nil
|
||||
case SC_THREAD_SAFE_FUNCTIONS:
|
||||
return _POSIX_THREAD_SAFE_FUNCTIONS, nil
|
||||
case SC_TIMERS:
|
||||
if _POSIX_TIMERS == 0 {
|
||||
return yesno(sysctl32("p1003_1b.timers")), nil
|
||||
}
|
||||
return _POSIX_TIMERS, nil
|
||||
case SC_TRACE:
|
||||
return _POSIX_TRACE, nil
|
||||
case SC_TYPED_MEMORY_OBJECTS:
|
||||
return _POSIX_TYPED_MEMORY_OBJECTS, nil
|
||||
case SC_VERSION:
|
||||
// TODO(tk): FreeBSD libc uses sysctl(CTL_KERN, KERN_POSIX1)
|
||||
return _POSIX_VERSION, nil
|
||||
|
||||
/* TODO(tk): these need GOARCH-dependent integer size checks
|
||||
case SC_V6_ILP32_OFF32:
|
||||
return _V6_ILP32_OFF32, nil
|
||||
case SC_V6_ILP32_OFFBIG:
|
||||
return _V6_ILP32_OFFBIG, nil
|
||||
case SC_V6_LP64_OFF64:
|
||||
return _V6_LP64_OFF64, nil
|
||||
case SC_V6_LPBIG_OFFBIG:
|
||||
return _V6_LPBIG_OFFBIG, nil
|
||||
*/
|
||||
|
||||
case SC_2_CHAR_TERM:
|
||||
return _POSIX2_CHAR_TERM, nil
|
||||
case SC_2_PBS,
|
||||
SC_2_PBS_ACCOUNTING,
|
||||
SC_2_PBS_CHECKPOINT,
|
||||
SC_2_PBS_LOCATE,
|
||||
SC_2_PBS_MESSAGE,
|
||||
SC_2_PBS_TRACK:
|
||||
return _POSIX2_PBS, nil
|
||||
case SC_2_UPE:
|
||||
return _POSIX2_UPE, nil
|
||||
|
||||
case SC_XOPEN_CRYPT:
|
||||
return _XOPEN_CRYPT, nil
|
||||
case SC_XOPEN_ENH_I18N:
|
||||
return _XOPEN_ENH_I18N, nil
|
||||
case SC_XOPEN_REALTIME:
|
||||
return _XOPEN_REALTIME, nil
|
||||
case SC_XOPEN_REALTIME_THREADS:
|
||||
return _XOPEN_REALTIME_THREADS, nil
|
||||
case SC_XOPEN_SHM:
|
||||
return _XOPEN_SHM, nil
|
||||
case SC_XOPEN_STREAMS:
|
||||
return -1, nil
|
||||
case SC_XOPEN_UNIX:
|
||||
return _XOPEN_UNIX, nil
|
||||
|
||||
case SC_PHYS_PAGES:
|
||||
if val, err := unix.SysctlUint64("hw.availpages"); err == nil {
|
||||
return int64(val), nil
|
||||
}
|
||||
return -1, nil
|
||||
case SC_NPROCESSORS_CONF:
|
||||
fallthrough
|
||||
case SC_NPROCESSORS_ONLN:
|
||||
if val, err := unix.SysctlUint32("hw.ncpu"); err == nil {
|
||||
return int64(val), nil
|
||||
}
|
||||
return -1, nil
|
||||
}
|
||||
|
||||
return sysconfGeneric(name)
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
// Copyright 2021 Tobias Klauser. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd
|
||||
// +build darwin dragonfly freebsd linux netbsd openbsd
|
||||
|
||||
package sysconf
|
||||
|
||||
import "os"
|
||||
|
||||
func sysconfGeneric(name int) (int64, error) {
|
||||
// POSIX default values
|
||||
if sc, err := sysconfPOSIX(name); err == nil {
|
||||
return sc, nil
|
||||
}
|
||||
|
||||
switch name {
|
||||
case SC_BC_BASE_MAX:
|
||||
return _BC_BASE_MAX, nil
|
||||
case SC_BC_DIM_MAX:
|
||||
return _BC_DIM_MAX, nil
|
||||
case SC_BC_SCALE_MAX:
|
||||
return _BC_SCALE_MAX, nil
|
||||
case SC_BC_STRING_MAX:
|
||||
return _BC_STRING_MAX, nil
|
||||
case SC_COLL_WEIGHTS_MAX:
|
||||
return _COLL_WEIGHTS_MAX, nil
|
||||
case SC_EXPR_NEST_MAX:
|
||||
return _EXPR_NEST_MAX, nil
|
||||
case SC_HOST_NAME_MAX:
|
||||
return _HOST_NAME_MAX, nil
|
||||
case SC_LINE_MAX:
|
||||
return _LINE_MAX, nil
|
||||
case SC_LOGIN_NAME_MAX:
|
||||
return _LOGIN_NAME_MAX, nil
|
||||
case SC_PAGESIZE: // same as SC_PAGE_SIZE
|
||||
return int64(os.Getpagesize()), nil
|
||||
case SC_RE_DUP_MAX:
|
||||
return _RE_DUP_MAX, nil
|
||||
case SC_SYMLOOP_MAX:
|
||||
return _SYMLOOP_MAX, nil
|
||||
}
|
||||
|
||||
return -1, errInvalid
|
||||
}
|
||||
+345
@@ -0,0 +1,345 @@
|
||||
// Copyright 2018 Tobias Klauser. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package sysconf
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/tklauser/numcpus"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
const (
|
||||
// CLK_TCK is a constant on Linux for all architectures except alpha and ia64.
|
||||
// See e.g.
|
||||
// https://git.musl-libc.org/cgit/musl/tree/src/conf/sysconf.c#n30
|
||||
// https://github.com/containerd/cgroups/pull/12
|
||||
// https://lore.kernel.org/lkml/[email protected]/
|
||||
_SYSTEM_CLK_TCK = 100
|
||||
)
|
||||
|
||||
func readProcFsInt64(path string, fallback int64) int64 {
|
||||
data, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
return fallback
|
||||
}
|
||||
i, err := strconv.ParseInt(string(data[:len(data)-1]), 0, 64)
|
||||
if err != nil {
|
||||
return fallback
|
||||
}
|
||||
return i
|
||||
}
|
||||
|
||||
// getMemPages computes mem*unit/os.Getpagesize(), but avoids overflowing int64.
|
||||
func getMemPages(mem uint64, unit uint32) int64 {
|
||||
pageSize := os.Getpagesize()
|
||||
for unit > 1 && pageSize > 1 {
|
||||
unit >>= 1
|
||||
pageSize >>= 1
|
||||
}
|
||||
mem *= uint64(unit)
|
||||
for pageSize > 1 {
|
||||
pageSize >>= 1
|
||||
mem >>= 1
|
||||
}
|
||||
return int64(mem)
|
||||
}
|
||||
|
||||
func getPhysPages() int64 {
|
||||
var si unix.Sysinfo_t
|
||||
err := unix.Sysinfo(&si)
|
||||
if err != nil {
|
||||
return int64(0)
|
||||
}
|
||||
return getMemPages(uint64(si.Totalram), si.Unit)
|
||||
}
|
||||
|
||||
func getAvPhysPages() int64 {
|
||||
var si unix.Sysinfo_t
|
||||
err := unix.Sysinfo(&si)
|
||||
if err != nil {
|
||||
return int64(0)
|
||||
}
|
||||
return getMemPages(uint64(si.Freeram), si.Unit)
|
||||
}
|
||||
|
||||
func getNprocsSysfs() (int64, error) {
|
||||
n, err := numcpus.GetOnline()
|
||||
return int64(n), err
|
||||
}
|
||||
|
||||
func getNprocsProcStat() (int64, error) {
|
||||
f, err := os.Open("/proc/stat")
|
||||
if err != nil {
|
||||
return -1, err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
count := int64(0)
|
||||
s := bufio.NewScanner(f)
|
||||
for s.Scan() {
|
||||
if line := strings.TrimSpace(s.Text()); strings.HasPrefix(line, "cpu") {
|
||||
l := strings.SplitN(line, " ", 2)
|
||||
_, err := strconv.ParseInt(l[0][3:], 10, 64)
|
||||
if err == nil {
|
||||
count++
|
||||
}
|
||||
} else {
|
||||
// The current format of /proc/stat has all the
|
||||
// cpu* lines at the beginning. Assume this
|
||||
// stays this way.
|
||||
break
|
||||
}
|
||||
}
|
||||
return count, nil
|
||||
}
|
||||
|
||||
func getNprocs() int64 {
|
||||
count, err := getNprocsSysfs()
|
||||
if err == nil {
|
||||
return count
|
||||
}
|
||||
|
||||
count, err = getNprocsProcStat()
|
||||
if err == nil {
|
||||
return count
|
||||
}
|
||||
|
||||
// default to the value determined at runtime startup if all else fails
|
||||
return int64(runtime.NumCPU())
|
||||
}
|
||||
|
||||
func getNprocsConf() int64 {
|
||||
count, err := numcpus.GetConfigured()
|
||||
if err == nil {
|
||||
return int64(count)
|
||||
}
|
||||
|
||||
// TODO(tk): fall back to reading /proc/cpuinfo on legacy systems
|
||||
// without sysfs?
|
||||
|
||||
return getNprocs()
|
||||
}
|
||||
|
||||
func hasClock(clockid int32) bool {
|
||||
var res unix.Timespec
|
||||
if err := unix.ClockGetres(clockid, &res); err != nil {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func max(a, b int64) int64 {
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func sysconf(name int) (int64, error) {
|
||||
switch name {
|
||||
case SC_AIO_LISTIO_MAX:
|
||||
return -1, nil
|
||||
case SC_AIO_MAX:
|
||||
return -1, nil
|
||||
case SC_AIO_PRIO_DELTA_MAX:
|
||||
return _AIO_PRIO_DELTA_MAX, nil
|
||||
case SC_ARG_MAX:
|
||||
argMax := int64(_POSIX_ARG_MAX)
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_STACK, &rlim); err == nil {
|
||||
argMax = max(argMax, int64(rlim.Cur/4))
|
||||
}
|
||||
return argMax, nil
|
||||
case SC_ATEXIT_MAX:
|
||||
return _INT_MAX, nil
|
||||
case SC_CHILD_MAX:
|
||||
childMax := int64(-1)
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil && rlim.Cur != unix.RLIM_INFINITY {
|
||||
childMax = int64(rlim.Cur)
|
||||
}
|
||||
return childMax, nil
|
||||
case SC_CLK_TCK:
|
||||
return _SYSTEM_CLK_TCK, nil
|
||||
case SC_DELAYTIMER_MAX:
|
||||
return _DELAYTIMER_MAX, nil
|
||||
case SC_GETGR_R_SIZE_MAX:
|
||||
return _NSS_BUFLEN_GROUP, nil
|
||||
case SC_GETPW_R_SIZE_MAX:
|
||||
return _NSS_BUFLEN_PASSWD, nil
|
||||
case SC_MQ_OPEN_MAX:
|
||||
return -1, nil
|
||||
case SC_MQ_PRIO_MAX:
|
||||
return _MQ_PRIO_MAX, nil
|
||||
case SC_NGROUPS_MAX:
|
||||
return readProcFsInt64("/proc/sys/kernel/ngroups_max", _NGROUPS_MAX), nil
|
||||
case SC_OPEN_MAX:
|
||||
openMax := int64(_OPEN_MAX)
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
|
||||
openMax = int64(rlim.Cur)
|
||||
}
|
||||
return openMax, nil
|
||||
case SC_RTSIG_MAX:
|
||||
return _RTSIG_MAX, nil
|
||||
case SC_SEM_NSEMS_MAX:
|
||||
return -1, nil
|
||||
case SC_SEM_VALUE_MAX:
|
||||
return _SEM_VALUE_MAX, nil
|
||||
case SC_SIGQUEUE_MAX:
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_SIGPENDING, &rlim); err == nil {
|
||||
return int64(rlim.Cur), nil
|
||||
}
|
||||
return readProcFsInt64("/proc/sys/kernel/rtsig-max", _POSIX_SIGQUEUE_MAX), nil
|
||||
case SC_STREAM_MAX:
|
||||
return _STREAM_MAX, nil
|
||||
case SC_THREAD_DESTRUCTOR_ITERATIONS:
|
||||
return _POSIX_THREAD_DESTRUCTOR_ITERATIONS, nil
|
||||
case SC_THREAD_KEYS_MAX:
|
||||
return _PTHREAD_KEYS_MAX, nil
|
||||
case SC_THREAD_PRIO_INHERIT:
|
||||
return _POSIX_THREAD_PRIO_INHERIT, nil
|
||||
case SC_THREAD_PRIO_PROTECT:
|
||||
return _POSIX_THREAD_PRIO_PROTECT, nil
|
||||
case SC_THREAD_STACK_MIN:
|
||||
return _PTHREAD_STACK_MIN, nil
|
||||
case SC_THREAD_THREADS_MAX:
|
||||
return -1, nil
|
||||
case SC_TIMER_MAX:
|
||||
return -1, nil
|
||||
case SC_TTY_NAME_MAX:
|
||||
return _TTY_NAME_MAX, nil
|
||||
case SC_TZNAME_MAX:
|
||||
return -1, nil
|
||||
|
||||
case SC_CPUTIME:
|
||||
if hasClock(unix.CLOCK_PROCESS_CPUTIME_ID) {
|
||||
return _POSIX_VERSION, nil
|
||||
}
|
||||
return -1, nil
|
||||
case SC_MONOTONIC_CLOCK:
|
||||
if hasClock(unix.CLOCK_MONOTONIC) {
|
||||
return _POSIX_VERSION, nil
|
||||
}
|
||||
return -1, nil
|
||||
case SC_SAVED_IDS:
|
||||
return _POSIX_SAVED_IDS, nil
|
||||
case SC_SPAWN:
|
||||
return _POSIX_SPAWN, nil
|
||||
case SC_SPIN_LOCKS:
|
||||
return _POSIX_SPIN_LOCKS, nil
|
||||
case SC_SPORADIC_SERVER:
|
||||
return _POSIX_SPORADIC_SERVER, nil
|
||||
case SC_SYNCHRONIZED_IO:
|
||||
return _POSIX_SYNCHRONIZED_IO, nil
|
||||
case SC_THREAD_ATTR_STACKADDR:
|
||||
return _POSIX_THREAD_ATTR_STACKADDR, nil
|
||||
case SC_THREAD_ATTR_STACKSIZE:
|
||||
return _POSIX_THREAD_ATTR_STACKSIZE, nil
|
||||
case SC_THREAD_CPUTIME:
|
||||
if hasClock(unix.CLOCK_THREAD_CPUTIME_ID) {
|
||||
return _POSIX_VERSION, nil
|
||||
}
|
||||
return -1, nil
|
||||
case SC_THREAD_PRIORITY_SCHEDULING:
|
||||
return _POSIX_THREAD_PRIORITY_SCHEDULING, nil
|
||||
case SC_THREAD_PROCESS_SHARED:
|
||||
return _POSIX_THREAD_PROCESS_SHARED, nil
|
||||
case SC_THREAD_SAFE_FUNCTIONS:
|
||||
return _POSIX_THREAD_SAFE_FUNCTIONS, nil
|
||||
case SC_THREAD_SPORADIC_SERVER:
|
||||
return _POSIX_THREAD_SPORADIC_SERVER, nil
|
||||
case SC_TRACE:
|
||||
return _POSIX_TRACE, nil
|
||||
case SC_TRACE_EVENT_FILTER:
|
||||
return _POSIX_TRACE_EVENT_FILTER, nil
|
||||
case SC_TRACE_EVENT_NAME_MAX:
|
||||
return -1, nil
|
||||
case SC_TRACE_INHERIT:
|
||||
return _POSIX_TRACE_INHERIT, nil
|
||||
case SC_TRACE_LOG:
|
||||
return _POSIX_TRACE_LOG, nil
|
||||
case SC_TRACE_NAME_MAX:
|
||||
return -1, nil
|
||||
case SC_TRACE_SYS_MAX:
|
||||
return -1, nil
|
||||
case SC_TRACE_USER_EVENT_MAX:
|
||||
return -1, nil
|
||||
case SC_TYPED_MEMORY_OBJECTS:
|
||||
return _POSIX_TYPED_MEMORY_OBJECTS, nil
|
||||
|
||||
case SC_V7_ILP32_OFF32:
|
||||
return _POSIX_V7_ILP32_OFF32, nil
|
||||
case SC_V7_ILP32_OFFBIG:
|
||||
return _POSIX_V7_ILP32_OFFBIG, nil
|
||||
case SC_V7_LP64_OFF64:
|
||||
return _POSIX_V7_LP64_OFF64, nil
|
||||
case SC_V7_LPBIG_OFFBIG:
|
||||
return _POSIX_V7_LPBIG_OFFBIG, nil
|
||||
|
||||
case SC_V6_ILP32_OFF32:
|
||||
return _POSIX_V6_ILP32_OFF32, nil
|
||||
case SC_V6_ILP32_OFFBIG:
|
||||
return _POSIX_V6_ILP32_OFFBIG, nil
|
||||
case SC_V6_LP64_OFF64:
|
||||
return _POSIX_V6_LP64_OFF64, nil
|
||||
case SC_V6_LPBIG_OFFBIG:
|
||||
return _POSIX_V6_LPBIG_OFFBIG, nil
|
||||
|
||||
case SC_2_C_VERSION:
|
||||
return _POSIX2_C_VERSION, nil
|
||||
case SC_2_CHAR_TERM:
|
||||
return _POSIX2_CHAR_TERM, nil
|
||||
case SC_2_PBS,
|
||||
SC_2_PBS_ACCOUNTING,
|
||||
SC_2_PBS_CHECKPOINT,
|
||||
SC_2_PBS_LOCATE,
|
||||
SC_2_PBS_MESSAGE,
|
||||
SC_2_PBS_TRACK:
|
||||
return -1, nil
|
||||
case SC_2_UPE:
|
||||
return -1, nil
|
||||
|
||||
case SC_XOPEN_CRYPT:
|
||||
// removed in glibc 2.28
|
||||
return -1, nil
|
||||
case SC_XOPEN_ENH_I18N:
|
||||
return _XOPEN_ENH_I18N, nil
|
||||
case SC_XOPEN_REALTIME:
|
||||
return _XOPEN_REALTIME, nil
|
||||
case SC_XOPEN_REALTIME_THREADS:
|
||||
return _XOPEN_REALTIME_THREADS, nil
|
||||
case SC_XOPEN_SHM:
|
||||
return _XOPEN_SHM, nil
|
||||
case SC_XOPEN_STREAMS:
|
||||
return -1, nil
|
||||
case SC_XOPEN_UNIX:
|
||||
return _XOPEN_UNIX, nil
|
||||
case SC_XOPEN_VERSION:
|
||||
return _XOPEN_VERSION, nil
|
||||
case SC_XOPEN_XCU_VERSION:
|
||||
return _XOPEN_XCU_VERSION, nil
|
||||
|
||||
case SC_PHYS_PAGES:
|
||||
return getPhysPages(), nil
|
||||
case SC_AVPHYS_PAGES:
|
||||
return getAvPhysPages(), nil
|
||||
case SC_NPROCESSORS_CONF:
|
||||
return getNprocsConf(), nil
|
||||
case SC_NPROCESSORS_ONLN:
|
||||
return getNprocs(), nil
|
||||
case SC_UIO_MAXIOV: // same as _SC_IOV_MAX
|
||||
return _UIO_MAXIOV, nil
|
||||
}
|
||||
|
||||
return sysconfGeneric(name)
|
||||
}
|
||||
+250
@@ -0,0 +1,250 @@
|
||||
// Copyright 2018 Tobias Klauser. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package sysconf
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
const (
|
||||
_HOST_NAME_MAX = _MAXHOSTNAMELEN
|
||||
_LOGIN_NAME_MAX = _MAXLOGNAME + 1
|
||||
_SYMLOOP_MAX = _MAXSYMLINKS
|
||||
|
||||
_POSIX2_C_BIND = 1
|
||||
_POSIX2_C_DEV = -1
|
||||
_POSIX2_CHAR_TERM = -1
|
||||
_POSIX2_FORT_DEV = -1
|
||||
_POSIX2_FORT_RUN = -1
|
||||
_POSIX2_LOCALEDEF = -1
|
||||
_POSIX2_SW_DEV = -1
|
||||
_POSIX2_UPE = -1
|
||||
)
|
||||
|
||||
var (
|
||||
clktck int64
|
||||
clktckOnce sync.Once
|
||||
)
|
||||
|
||||
func sysconfPOSIX(name int) (int64, error) {
|
||||
// NetBSD does not define all _POSIX_* values used in sysconf_posix.go
|
||||
// The supported ones are handled in sysconf below.
|
||||
return -1, errInvalid
|
||||
}
|
||||
|
||||
func sysconf(name int) (int64, error) {
|
||||
// NetBSD uses sysctl to get some of these values. For the user.* namespace,
|
||||
// calls get handled by user_sysctl in /usr/src/lib/libc/gen/sysctl.c
|
||||
// Duplicate the relevant values here.
|
||||
|
||||
switch name {
|
||||
|
||||
// 1003.1
|
||||
case SC_ARG_MAX:
|
||||
return sysctl32("kern.argmax"), nil
|
||||
case SC_CHILD_MAX:
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil {
|
||||
if rlim.Cur != unix.RLIM_INFINITY {
|
||||
return int64(rlim.Cur), nil
|
||||
}
|
||||
}
|
||||
return -1, nil
|
||||
case SC_CLK_TCK:
|
||||
clktckOnce.Do(func() {
|
||||
clktck = -1
|
||||
if ci, err := unix.SysctlClockinfo("kern.clockrate"); err == nil {
|
||||
clktck = int64(ci.Hz)
|
||||
}
|
||||
})
|
||||
return clktck, nil
|
||||
case SC_NGROUPS_MAX:
|
||||
return sysctl32("kern.ngroups"), nil
|
||||
case SC_JOB_CONTROL:
|
||||
return sysctl32("kern.job_control"), nil
|
||||
case SC_OPEN_MAX:
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
|
||||
return int64(rlim.Cur), nil
|
||||
}
|
||||
return -1, nil
|
||||
case SC_STREAM_MAX:
|
||||
// sysctl("user.stream_max")
|
||||
return _FOPEN_MAX, nil
|
||||
case SC_TZNAME_MAX:
|
||||
// sysctl("user.tzname_max")
|
||||
return _NAME_MAX, nil
|
||||
case SC_SAVED_IDS:
|
||||
return yesno(sysctl32("kern.saved_ids")), nil
|
||||
case SC_VERSION:
|
||||
return sysctl32("kern.posix1version"), nil
|
||||
|
||||
// 1003.1b
|
||||
case SC_FSYNC:
|
||||
return sysctl32("kern.fsync"), nil
|
||||
case SC_SYNCHRONIZED_IO:
|
||||
return sysctl32("kern.synchronized_io"), nil
|
||||
case SC_MAPPED_FILES:
|
||||
return sysctl32("kern.mapped_files"), nil
|
||||
case SC_MEMLOCK:
|
||||
return sysctl32("kern.memlock"), nil
|
||||
case SC_MEMLOCK_RANGE:
|
||||
return sysctl32("kern.memlock_range"), nil
|
||||
case SC_MEMORY_PROTECTION:
|
||||
return sysctl32("kern.memory_protection"), nil
|
||||
case SC_MONOTONIC_CLOCK:
|
||||
return sysctl32("kern.monotonic_clock"), nil
|
||||
case SC_SEMAPHORES:
|
||||
return sysctl32("kern.posix_semaphores"), nil
|
||||
case SC_TIMERS:
|
||||
return sysctl32("kern.posix_timers"), nil
|
||||
|
||||
// 1003.1c
|
||||
case SC_LOGIN_NAME_MAX:
|
||||
return sysctl32("kern.login_name_max"), nil
|
||||
case SC_THREADS:
|
||||
return sysctl32("kern.posix_threads"), nil
|
||||
|
||||
// 1003.1j
|
||||
case SC_BARRIERS:
|
||||
return yesno(sysctl32("kern.posix_barriers")), nil
|
||||
case SC_SPIN_LOCKS:
|
||||
return yesno(sysctl32("kern.posix_spin_locks")), nil
|
||||
case SC_READER_WRITER_LOCKS:
|
||||
return yesno(sysctl32("kern.posix_reader_writer_locks")), nil
|
||||
|
||||
// 1003.2
|
||||
case SC_2_VERSION:
|
||||
// sysctl user.posix2_version
|
||||
return _POSIX2_VERSION, nil
|
||||
case SC_2_C_BIND:
|
||||
// sysctl user.posix2_c_bind
|
||||
return _POSIX2_C_BIND, nil
|
||||
case SC_2_C_DEV:
|
||||
// sysctl user.posix2_c_dev
|
||||
return _POSIX2_C_DEV, nil
|
||||
case SC_2_CHAR_TERM:
|
||||
// sysctl user.posix2_char_term
|
||||
return _POSIX2_CHAR_TERM, nil
|
||||
case SC_2_FORT_DEV:
|
||||
// sysctl user.posix2_fort_dev
|
||||
return _POSIX2_FORT_DEV, nil
|
||||
case SC_2_FORT_RUN:
|
||||
// sysctl user.posix2_fort_run
|
||||
return _POSIX2_FORT_RUN, nil
|
||||
case SC_2_LOCALEDEF:
|
||||
// sysctl user.posix2_localedef
|
||||
return _POSIX2_LOCALEDEF, nil
|
||||
case SC_2_SW_DEV:
|
||||
// sysctl user.posix2_sw_dev
|
||||
return _POSIX2_SW_DEV, nil
|
||||
case SC_2_UPE:
|
||||
// sysctl user.posix2_upe
|
||||
return _POSIX2_UPE, nil
|
||||
|
||||
// XPG 4.2
|
||||
case SC_IOV_MAX:
|
||||
return sysctl32("kern.iov_max"), nil
|
||||
case SC_XOPEN_SHM:
|
||||
return yesno(sysctl32("kern.ipc.sysvshm")), nil
|
||||
|
||||
// 1003.1-2001, XSI Option Group
|
||||
case SC_AIO_LISTIO_MAX:
|
||||
return sysctl32("kern.aio_listio_max"), nil
|
||||
case SC_AIO_MAX:
|
||||
return sysctl32("kern.aio_max"), nil
|
||||
case SC_ASYNCHRONOUS_IO:
|
||||
return yesno(sysctl32("kern.posix_aio")), nil
|
||||
case SC_MESSAGE_PASSING:
|
||||
return yesno(sysctl32("kern.posix_msg")), nil
|
||||
case SC_MQ_OPEN_MAX:
|
||||
return sysctl32("kern.mqueue.mq_open_max"), nil
|
||||
case SC_MQ_PRIO_MAX:
|
||||
return sysctl32("kern.mqueue.mq_prio_max"), nil
|
||||
case SC_PRIORITY_SCHEDULING:
|
||||
return yesno(sysctl32("kern.posix_sched")), nil
|
||||
case SC_ATEXIT_MAX:
|
||||
// sysctl("user.atexit_max")
|
||||
return -1, nil // TODO
|
||||
|
||||
// 1003.1-2001, TSF
|
||||
case SC_GETGR_R_SIZE_MAX:
|
||||
return _GETGR_R_SIZE_MAX, nil
|
||||
case SC_GETPW_R_SIZE_MAX:
|
||||
return _GETPW_R_SIZE_MAX, nil
|
||||
|
||||
// Unsorted
|
||||
case SC_HOST_NAME_MAX:
|
||||
return _MAXHOSTNAMELEN, nil
|
||||
case SC_PASS_MAX:
|
||||
return _PASSWORD_LEN, nil
|
||||
case SC_REGEXP:
|
||||
return _POSIX_REGEXP, nil
|
||||
case SC_SHARED_MEMORY_OBJECTS:
|
||||
return _POSIX_SHARED_MEMORY_OBJECTS, nil
|
||||
case SC_SHELL:
|
||||
return _POSIX_SHELL, nil
|
||||
case SC_SPAWN:
|
||||
return _POSIX_SPAWN, nil
|
||||
|
||||
// Extensions
|
||||
case SC_NPROCESSORS_CONF:
|
||||
return sysctl32("hw.ncpu"), nil
|
||||
case SC_NPROCESSORS_ONLN:
|
||||
return sysctl32("hw.ncpuonline"), nil
|
||||
|
||||
// Linux/Solaris
|
||||
case SC_PHYS_PAGES:
|
||||
return sysctl64("hw.physmem64") / int64(unix.Getpagesize()), nil
|
||||
|
||||
// Native
|
||||
case SC_SCHED_RT_TS:
|
||||
return sysctl32("kern.sched.rtts"), nil
|
||||
case SC_SCHED_PRI_MIN:
|
||||
return sysctl32("kern.sched.pri_min"), nil
|
||||
case SC_SCHED_PRI_MAX:
|
||||
return sysctl32("kern.sched.pri_max"), nil
|
||||
case SC_THREAD_DESTRUCTOR_ITERATIONS:
|
||||
return _POSIX_THREAD_DESTRUCTOR_ITERATIONS, nil
|
||||
case SC_THREAD_KEYS_MAX:
|
||||
return _POSIX_THREAD_KEYS_MAX, nil
|
||||
case SC_THREAD_STACK_MIN:
|
||||
return int64(unix.Getpagesize()), nil
|
||||
case SC_THREAD_THREADS_MAX:
|
||||
return sysctl32("kern.maxproc"), nil
|
||||
case SC_THREAD_ATTR_STACKADDR:
|
||||
return _POSIX_THREAD_ATTR_STACKADDR, nil
|
||||
case SC_THREAD_ATTR_STACKSIZE:
|
||||
return _POSIX_THREAD_ATTR_STACKSIZE, nil
|
||||
case SC_THREAD_SAFE_FUNCTIONS:
|
||||
return _POSIX_THREAD_SAFE_FUNCTIONS, nil
|
||||
case SC_THREAD_PRIO_PROTECT:
|
||||
return _POSIX_THREAD_PRIO_PROTECT, nil
|
||||
case SC_THREAD_PRIORITY_SCHEDULING,
|
||||
SC_THREAD_PRIO_INHERIT,
|
||||
SC_THREAD_PROCESS_SHARED:
|
||||
return -1, nil
|
||||
case SC_TTY_NAME_MAX:
|
||||
return pathconf(_PATH_DEV, _PC_NAME_MAX), nil
|
||||
case SC_TIMER_MAX:
|
||||
return _POSIX_TIMER_MAX, nil
|
||||
case SC_SEM_NSEMS_MAX:
|
||||
return _LONG_MAX, nil
|
||||
case SC_CPUTIME:
|
||||
return _POSIX_CPUTIME, nil
|
||||
case SC_THREAD_CPUTIME:
|
||||
return _POSIX_THREAD_CPUTIME, nil
|
||||
case SC_DELAYTIMER_MAX:
|
||||
return _POSIX_DELAYTIMER_MAX, nil
|
||||
case SC_SIGQUEUE_MAX:
|
||||
return _POSIX_SIGQUEUE_MAX, nil
|
||||
case SC_REALTIME_SIGNALS:
|
||||
return 200112, nil
|
||||
}
|
||||
|
||||
return sysconfGeneric(name)
|
||||
}
|
||||
+271
@@ -0,0 +1,271 @@
|
||||
// Copyright 2018 Tobias Klauser. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package sysconf
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
// sysconf implements sysconf(3) as in the OpenBSD 6.3 libc.
|
||||
func sysconf(name int) (int64, error) {
|
||||
switch name {
|
||||
case SC_AIO_LISTIO_MAX,
|
||||
SC_AIO_MAX,
|
||||
SC_AIO_PRIO_DELTA_MAX:
|
||||
return -1, nil
|
||||
case SC_ARG_MAX:
|
||||
return sysctl32("kern.argmax"), nil
|
||||
case SC_ATEXIT_MAX:
|
||||
return -1, nil
|
||||
case SC_CHILD_MAX:
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil {
|
||||
if rlim.Cur != unix.RLIM_INFINITY {
|
||||
return int64(rlim.Cur), nil
|
||||
}
|
||||
}
|
||||
return -1, nil
|
||||
case SC_CLK_TCK:
|
||||
return _CLK_TCK, nil
|
||||
case SC_DELAYTIMER_MAX:
|
||||
return -1, nil
|
||||
case SC_GETGR_R_SIZE_MAX:
|
||||
return _GR_BUF_LEN, nil
|
||||
case SC_GETPW_R_SIZE_MAX:
|
||||
return _PW_BUF_LEN, nil
|
||||
case SC_IOV_MAX:
|
||||
return _IOV_MAX, nil
|
||||
case SC_LOGIN_NAME_MAX:
|
||||
return _LOGIN_NAME_MAX, nil
|
||||
case SC_NGROUPS_MAX:
|
||||
return sysctl32("kern.ngroups"), nil
|
||||
case SC_OPEN_MAX:
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
|
||||
if rlim.Cur != unix.RLIM_INFINITY {
|
||||
return int64(rlim.Cur), nil
|
||||
}
|
||||
}
|
||||
return -1, nil
|
||||
case SC_SEM_NSEMS_MAX:
|
||||
return -1, nil
|
||||
case SC_SEM_VALUE_MAX:
|
||||
return _SEM_VALUE_MAX, nil
|
||||
case SC_SIGQUEUE_MAX:
|
||||
return -1, nil
|
||||
case SC_STREAM_MAX:
|
||||
var rlim unix.Rlimit
|
||||
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
|
||||
if rlim.Cur != unix.RLIM_INFINITY {
|
||||
if rlim.Cur > _SHRT_MAX {
|
||||
return _SHRT_MAX, nil
|
||||
}
|
||||
return int64(rlim.Cur), nil
|
||||
}
|
||||
}
|
||||
return -1, nil
|
||||
case SC_THREAD_DESTRUCTOR_ITERATIONS:
|
||||
return _PTHREAD_DESTRUCTOR_ITERATIONS, nil
|
||||
case SC_THREAD_KEYS_MAX:
|
||||
return _PTHREAD_KEYS_MAX, nil
|
||||
case SC_THREAD_STACK_MIN:
|
||||
return _PTHREAD_STACK_MIN, nil
|
||||
case SC_THREAD_THREADS_MAX:
|
||||
return -1, nil
|
||||
case SC_TIMER_MAX:
|
||||
return -1, nil
|
||||
case SC_TTY_NAME_MAX:
|
||||
return _TTY_NAME_MAX, nil
|
||||
case SC_TZNAME_MAX:
|
||||
return _NAME_MAX, nil
|
||||
|
||||
case SC_BARRIERS:
|
||||
return _POSIX_BARRIERS, nil
|
||||
case SC_FSYNC:
|
||||
return _POSIX_FSYNC, nil
|
||||
case SC_IPV6:
|
||||
if _POSIX_IPV6 == 0 {
|
||||
fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0)
|
||||
if err == nil && fd >= 0 {
|
||||
unix.Close(fd)
|
||||
return int64(200112), nil
|
||||
}
|
||||
return 0, nil
|
||||
}
|
||||
return _POSIX_IPV6, nil
|
||||
case SC_JOB_CONTROL:
|
||||
return _POSIX_JOB_CONTROL, nil
|
||||
case SC_MAPPED_FILES:
|
||||
return _POSIX_MAPPED_FILES, nil
|
||||
case SC_MONOTONIC_CLOCK:
|
||||
return _POSIX_MONOTONIC_CLOCK, nil
|
||||
case SC_SAVED_IDS:
|
||||
return _POSIX_SAVED_IDS, nil
|
||||
case SC_SEMAPHORES:
|
||||
return _POSIX_SEMAPHORES, nil
|
||||
case SC_SPAWN:
|
||||
return _POSIX_SPAWN, nil
|
||||
case SC_SPIN_LOCKS:
|
||||
return _POSIX_SPIN_LOCKS, nil
|
||||
case SC_SPORADIC_SERVER:
|
||||
return _POSIX_SPORADIC_SERVER, nil
|
||||
case SC_SYNCHRONIZED_IO:
|
||||
return _POSIX_SYNCHRONIZED_IO, nil
|
||||
case SC_THREAD_ATTR_STACKADDR:
|
||||
return _POSIX_THREAD_ATTR_STACKADDR, nil
|
||||
case SC_THREAD_ATTR_STACKSIZE:
|
||||
return _POSIX_THREAD_ATTR_STACKSIZE, nil
|
||||
case SC_THREAD_CPUTIME:
|
||||
return _POSIX_THREAD_CPUTIME, nil
|
||||
case SC_THREAD_PRIO_INHERIT:
|
||||
return _POSIX_THREAD_PRIO_INHERIT, nil
|
||||
case SC_THREAD_PRIO_PROTECT:
|
||||
return _POSIX_THREAD_PRIO_PROTECT, nil
|
||||
case SC_THREAD_PRIORITY_SCHEDULING:
|
||||
return _POSIX_THREAD_PRIORITY_SCHEDULING, nil
|
||||
case SC_THREAD_PROCESS_SHARED:
|
||||
return _POSIX_THREAD_PROCESS_SHARED, nil
|
||||
case SC_THREAD_ROBUST_PRIO_INHERIT:
|
||||
return _POSIX_THREAD_ROBUST_PRIO_INHERIT, nil
|
||||
case SC_THREAD_ROBUST_PRIO_PROTECT:
|
||||
return _POSIX_THREAD_ROBUST_PRIO_PROTECT, nil
|
||||
case SC_THREAD_SAFE_FUNCTIONS:
|
||||
return _POSIX_THREAD_SAFE_FUNCTIONS, nil
|
||||
case SC_THREAD_SPORADIC_SERVER:
|
||||
return _POSIX_THREAD_SPORADIC_SERVER, nil
|
||||
case SC_THREADS:
|
||||
return _POSIX_THREADS, nil
|
||||
case SC_TIMEOUTS:
|
||||
return _POSIX_TIMEOUTS, nil
|
||||
case SC_TIMERS:
|
||||
return _POSIX_TIMERS, nil
|
||||
case SC_TRACE,
|
||||
SC_TRACE_EVENT_FILTER,
|
||||
SC_TRACE_EVENT_NAME_MAX,
|
||||
SC_TRACE_INHERIT,
|
||||
SC_TRACE_LOG:
|
||||
return _POSIX_TRACE, nil
|
||||
case SC_TYPED_MEMORY_OBJECTS:
|
||||
return _POSIX_TYPED_MEMORY_OBJECTS, nil
|
||||
|
||||
case SC_V7_ILP32_OFF32:
|
||||
return _POSIX_V7_ILP32_OFF32, nil
|
||||
case SC_V7_ILP32_OFFBIG:
|
||||
if _POSIX_V7_ILP32_OFFBIG == 0 {
|
||||
if unix.SizeofInt*_CHAR_BIT == 32 &&
|
||||
unix.SizeofLong*_CHAR_BIT == 32 &&
|
||||
unix.SizeofPtr*_CHAR_BIT == 32 &&
|
||||
sizeofOffT*_CHAR_BIT >= 64 {
|
||||
return 1, nil
|
||||
}
|
||||
return -1, nil
|
||||
}
|
||||
return _POSIX_V7_ILP32_OFFBIG, nil
|
||||
case SC_V7_LP64_OFF64:
|
||||
if _POSIX_V7_LP64_OFF64 == 0 {
|
||||
if unix.SizeofInt*_CHAR_BIT == 32 &&
|
||||
unix.SizeofLong*_CHAR_BIT == 64 &&
|
||||
unix.SizeofPtr*_CHAR_BIT == 64 &&
|
||||
sizeofOffT*_CHAR_BIT == 64 {
|
||||
return 1, nil
|
||||
}
|
||||
return -1, nil
|
||||
}
|
||||
return _POSIX_V7_LP64_OFF64, nil
|
||||
case SC_V7_LPBIG_OFFBIG:
|
||||
if _POSIX_V7_LPBIG_OFFBIG == 0 {
|
||||
if unix.SizeofInt*_CHAR_BIT >= 32 &&
|
||||
unix.SizeofLong*_CHAR_BIT >= 64 &&
|
||||
unix.SizeofPtr*_CHAR_BIT >= 64 &&
|
||||
sizeofOffT*_CHAR_BIT >= 64 {
|
||||
return 1, nil
|
||||
}
|
||||
return -1, nil
|
||||
}
|
||||
return _POSIX_V7_LPBIG_OFFBIG, nil
|
||||
|
||||
case SC_V6_ILP32_OFF32:
|
||||
return _POSIX_V6_ILP32_OFF32, nil
|
||||
case SC_V6_ILP32_OFFBIG:
|
||||
if _POSIX_V6_ILP32_OFFBIG == 0 {
|
||||
if unix.SizeofInt*_CHAR_BIT == 32 &&
|
||||
unix.SizeofLong*_CHAR_BIT == 32 &&
|
||||
unix.SizeofPtr*_CHAR_BIT == 32 &&
|
||||
sizeofOffT*_CHAR_BIT >= 64 {
|
||||
return 1, nil
|
||||
}
|
||||
return -1, nil
|
||||
}
|
||||
return _POSIX_V6_ILP32_OFFBIG, nil
|
||||
case SC_V6_LP64_OFF64:
|
||||
if _POSIX_V6_LP64_OFF64 == 0 {
|
||||
if unix.SizeofInt*_CHAR_BIT == 32 &&
|
||||
unix.SizeofLong*_CHAR_BIT == 64 &&
|
||||
unix.SizeofPtr*_CHAR_BIT == 64 &&
|
||||
sizeofOffT*_CHAR_BIT == 64 {
|
||||
return 1, nil
|
||||
}
|
||||
return -1, nil
|
||||
}
|
||||
return _POSIX_V6_LP64_OFF64, nil
|
||||
case SC_V6_LPBIG_OFFBIG:
|
||||
if _POSIX_V6_LPBIG_OFFBIG == 0 {
|
||||
if unix.SizeofInt*_CHAR_BIT >= 32 &&
|
||||
unix.SizeofLong*_CHAR_BIT >= 64 &&
|
||||
unix.SizeofPtr*_CHAR_BIT >= 64 &&
|
||||
sizeofOffT*_CHAR_BIT >= 64 {
|
||||
return 1, nil
|
||||
}
|
||||
return -1, nil
|
||||
}
|
||||
return _POSIX_V6_LPBIG_OFFBIG, nil
|
||||
|
||||
case SC_2_CHAR_TERM:
|
||||
return _POSIX2_CHAR_TERM, nil
|
||||
case SC_2_PBS,
|
||||
SC_2_PBS_ACCOUNTING,
|
||||
SC_2_PBS_CHECKPOINT,
|
||||
SC_2_PBS_LOCATE,
|
||||
SC_2_PBS_MESSAGE,
|
||||
SC_2_PBS_TRACK:
|
||||
return _POSIX2_PBS, nil
|
||||
case SC_2_UPE:
|
||||
return _POSIX2_UPE, nil
|
||||
case SC_2_VERSION:
|
||||
return _POSIX2_VERSION, nil
|
||||
|
||||
case SC_XOPEN_CRYPT:
|
||||
return _XOPEN_CRYPT, nil
|
||||
case SC_XOPEN_ENH_I18N:
|
||||
return _XOPEN_ENH_I18N, nil
|
||||
case SC_XOPEN_REALTIME:
|
||||
return _XOPEN_REALTIME, nil
|
||||
case SC_XOPEN_REALTIME_THREADS:
|
||||
return _XOPEN_REALTIME_THREADS, nil
|
||||
case SC_XOPEN_SHM:
|
||||
return _XOPEN_SHM, nil
|
||||
case SC_XOPEN_STREAMS:
|
||||
return _XOPEN_STREAMS, nil
|
||||
case SC_XOPEN_UNIX:
|
||||
return _XOPEN_UNIX, nil
|
||||
case SC_XOPEN_UUCP:
|
||||
return _XOPEN_UUCP, nil
|
||||
|
||||
case SC_AVPHYS_PAGES:
|
||||
if uvm, err := unix.SysctlUvmexp("vm.uvmexp"); err == nil {
|
||||
return int64(uvm.Free), nil
|
||||
}
|
||||
return -1, nil
|
||||
case SC_PHYS_PAGES:
|
||||
return sysctl64("hw.physmem") / int64(unix.Getpagesize()), nil
|
||||
case SC_NPROCESSORS_CONF:
|
||||
return sysctl32("hw.ncpu"), nil
|
||||
case SC_NPROCESSORS_ONLN:
|
||||
if val, err := unix.SysctlUint32("hw.ncpuonline"); err == nil {
|
||||
return int64(val), nil
|
||||
}
|
||||
return sysctl32("hw.ncpu"), nil
|
||||
}
|
||||
|
||||
return sysconfGeneric(name)
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
// Copyright 2018 Tobias Klauser. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build darwin || dragonfly || freebsd || linux || openbsd
|
||||
// +build darwin dragonfly freebsd linux openbsd
|
||||
|
||||
package sysconf
|
||||
|
||||
func sysconfPOSIX(name int) (int64, error) {
|
||||
switch name {
|
||||
case SC_ADVISORY_INFO:
|
||||
return _POSIX_ADVISORY_INFO, nil
|
||||
case SC_ASYNCHRONOUS_IO:
|
||||
return _POSIX_ASYNCHRONOUS_IO, nil
|
||||
case SC_BARRIERS:
|
||||
return _POSIX_BARRIERS, nil
|
||||
case SC_CLOCK_SELECTION:
|
||||
return _POSIX_CLOCK_SELECTION, nil
|
||||
case SC_CPUTIME:
|
||||
return _POSIX_CPUTIME, nil
|
||||
case SC_FSYNC:
|
||||
return _POSIX_FSYNC, nil
|
||||
case SC_IPV6:
|
||||
return _POSIX_IPV6, nil
|
||||
case SC_JOB_CONTROL:
|
||||
return _POSIX_JOB_CONTROL, nil
|
||||
case SC_MAPPED_FILES:
|
||||
return _POSIX_MAPPED_FILES, nil
|
||||
case SC_MEMLOCK:
|
||||
return _POSIX_MEMLOCK, nil
|
||||
case SC_MEMLOCK_RANGE:
|
||||
return _POSIX_MEMLOCK_RANGE, nil
|
||||
case SC_MONOTONIC_CLOCK:
|
||||
return _POSIX_MONOTONIC_CLOCK, nil
|
||||
case SC_MEMORY_PROTECTION:
|
||||
return _POSIX_MEMORY_PROTECTION, nil
|
||||
case SC_MESSAGE_PASSING:
|
||||
return _POSIX_MESSAGE_PASSING, nil
|
||||
case SC_PRIORITIZED_IO:
|
||||
return _POSIX_PRIORITIZED_IO, nil
|
||||
case SC_PRIORITY_SCHEDULING:
|
||||
return _POSIX_PRIORITY_SCHEDULING, nil
|
||||
case SC_RAW_SOCKETS:
|
||||
return _POSIX_RAW_SOCKETS, nil
|
||||
case SC_READER_WRITER_LOCKS:
|
||||
return _POSIX_READER_WRITER_LOCKS, nil
|
||||
case SC_REALTIME_SIGNALS:
|
||||
return _POSIX_REALTIME_SIGNALS, nil
|
||||
case SC_REGEXP:
|
||||
return _POSIX_REGEXP, nil
|
||||
case SC_SEMAPHORES:
|
||||
return _POSIX_SEMAPHORES, nil
|
||||
case SC_SHARED_MEMORY_OBJECTS:
|
||||
return _POSIX_SHARED_MEMORY_OBJECTS, nil
|
||||
case SC_SHELL:
|
||||
return _POSIX_SHELL, nil
|
||||
case SC_THREADS:
|
||||
return _POSIX_THREADS, nil
|
||||
case SC_TIMEOUTS:
|
||||
return _POSIX_TIMEOUTS, nil
|
||||
case SC_TIMERS:
|
||||
return _POSIX_TIMERS, nil
|
||||
case SC_VERSION:
|
||||
return _POSIX_VERSION, nil
|
||||
|
||||
case SC_2_C_BIND:
|
||||
return _POSIX2_C_BIND, nil
|
||||
case SC_2_C_DEV:
|
||||
return _POSIX2_C_DEV, nil
|
||||
case SC_2_FORT_DEV:
|
||||
return -1, nil
|
||||
case SC_2_FORT_RUN:
|
||||
return -1, nil
|
||||
case SC_2_LOCALEDEF:
|
||||
return _POSIX2_LOCALEDEF, nil
|
||||
case SC_2_SW_DEV:
|
||||
return _POSIX2_SW_DEV, nil
|
||||
case SC_2_VERSION:
|
||||
return _POSIX2_VERSION, nil
|
||||
}
|
||||
return -1, errInvalid
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// Copyright 2021 Tobias Klauser. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package sysconf
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
func sysconf(name int) (int64, error) {
|
||||
if name < 0 {
|
||||
return -1, errInvalid
|
||||
}
|
||||
return unix.Sysconf(name)
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// Copyright 2021 Tobias Klauser. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris
|
||||
// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
|
||||
|
||||
package sysconf
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func sysconf(name int) (int64, error) {
|
||||
return -1, fmt.Errorf("unsupported on %s", runtime.GOOS)
|
||||
}
|
||||
+254
@@ -0,0 +1,254 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_defs_darwin.go
|
||||
|
||||
//go:build darwin
|
||||
// +build darwin
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
SC_AIO_LISTIO_MAX = 0x2a
|
||||
SC_AIO_MAX = 0x2b
|
||||
SC_AIO_PRIO_DELTA_MAX = 0x2c
|
||||
SC_ARG_MAX = 0x1
|
||||
SC_ATEXIT_MAX = 0x6b
|
||||
SC_BC_BASE_MAX = 0x9
|
||||
SC_BC_DIM_MAX = 0xa
|
||||
SC_BC_SCALE_MAX = 0xb
|
||||
SC_BC_STRING_MAX = 0xc
|
||||
SC_CHILD_MAX = 0x2
|
||||
SC_CLK_TCK = 0x3
|
||||
SC_COLL_WEIGHTS_MAX = 0xd
|
||||
SC_DELAYTIMER_MAX = 0x2d
|
||||
SC_EXPR_NEST_MAX = 0xe
|
||||
SC_GETGR_R_SIZE_MAX = 0x46
|
||||
SC_GETPW_R_SIZE_MAX = 0x47
|
||||
SC_HOST_NAME_MAX = 0x48
|
||||
SC_IOV_MAX = 0x38
|
||||
SC_LINE_MAX = 0xf
|
||||
SC_LOGIN_NAME_MAX = 0x49
|
||||
SC_MQ_OPEN_MAX = 0x2e
|
||||
SC_MQ_PRIO_MAX = 0x4b
|
||||
SC_NGROUPS_MAX = 0x4
|
||||
SC_OPEN_MAX = 0x5
|
||||
SC_PAGE_SIZE = 0x1d
|
||||
SC_PAGESIZE = 0x1d
|
||||
SC_THREAD_DESTRUCTOR_ITERATIONS = 0x55
|
||||
SC_THREAD_KEYS_MAX = 0x56
|
||||
SC_THREAD_STACK_MIN = 0x5d
|
||||
SC_THREAD_THREADS_MAX = 0x5e
|
||||
SC_RE_DUP_MAX = 0x10
|
||||
SC_RTSIG_MAX = 0x30
|
||||
SC_SEM_NSEMS_MAX = 0x31
|
||||
SC_SEM_VALUE_MAX = 0x32
|
||||
SC_SIGQUEUE_MAX = 0x33
|
||||
SC_STREAM_MAX = 0x1a
|
||||
SC_SYMLOOP_MAX = 0x78
|
||||
SC_TIMER_MAX = 0x34
|
||||
SC_TTY_NAME_MAX = 0x65
|
||||
SC_TZNAME_MAX = 0x1b
|
||||
|
||||
SC_ADVISORY_INFO = 0x41
|
||||
SC_ASYNCHRONOUS_IO = 0x1c
|
||||
SC_BARRIERS = 0x42
|
||||
SC_CLOCK_SELECTION = 0x43
|
||||
SC_CPUTIME = 0x44
|
||||
SC_FSYNC = 0x26
|
||||
SC_IPV6 = 0x76
|
||||
SC_JOB_CONTROL = 0x6
|
||||
SC_MAPPED_FILES = 0x2f
|
||||
SC_MEMLOCK = 0x1e
|
||||
SC_MEMLOCK_RANGE = 0x1f
|
||||
SC_MEMORY_PROTECTION = 0x20
|
||||
SC_MESSAGE_PASSING = 0x21
|
||||
SC_MONOTONIC_CLOCK = 0x4a
|
||||
SC_PRIORITIZED_IO = 0x22
|
||||
SC_PRIORITY_SCHEDULING = 0x23
|
||||
SC_RAW_SOCKETS = 0x77
|
||||
SC_READER_WRITER_LOCKS = 0x4c
|
||||
SC_REALTIME_SIGNALS = 0x24
|
||||
SC_REGEXP = 0x4d
|
||||
SC_SAVED_IDS = 0x7
|
||||
SC_SEMAPHORES = 0x25
|
||||
SC_SHARED_MEMORY_OBJECTS = 0x27
|
||||
SC_SHELL = 0x4e
|
||||
SC_SPAWN = 0x4f
|
||||
SC_SPIN_LOCKS = 0x50
|
||||
SC_SPORADIC_SERVER = 0x51
|
||||
SC_SS_REPL_MAX = 0x7e
|
||||
SC_SYNCHRONIZED_IO = 0x28
|
||||
SC_THREAD_ATTR_STACKADDR = 0x52
|
||||
SC_THREAD_ATTR_STACKSIZE = 0x53
|
||||
SC_THREAD_CPUTIME = 0x54
|
||||
SC_THREAD_PRIO_INHERIT = 0x57
|
||||
SC_THREAD_PRIO_PROTECT = 0x58
|
||||
SC_THREAD_PRIORITY_SCHEDULING = 0x59
|
||||
SC_THREAD_PROCESS_SHARED = 0x5a
|
||||
SC_THREAD_SAFE_FUNCTIONS = 0x5b
|
||||
SC_THREAD_SPORADIC_SERVER = 0x5c
|
||||
SC_THREADS = 0x60
|
||||
SC_TIMEOUTS = 0x5f
|
||||
SC_TIMERS = 0x29
|
||||
SC_TRACE = 0x61
|
||||
SC_TRACE_EVENT_FILTER = 0x62
|
||||
SC_TRACE_EVENT_NAME_MAX = 0x7f
|
||||
SC_TRACE_INHERIT = 0x63
|
||||
SC_TRACE_LOG = 0x64
|
||||
SC_TRACE_NAME_MAX = 0x80
|
||||
SC_TRACE_SYS_MAX = 0x81
|
||||
SC_TRACE_USER_EVENT_MAX = 0x82
|
||||
SC_TYPED_MEMORY_OBJECTS = 0x66
|
||||
SC_VERSION = 0x8
|
||||
|
||||
SC_V6_ILP32_OFF32 = 0x67
|
||||
SC_V6_ILP32_OFFBIG = 0x68
|
||||
SC_V6_LP64_OFF64 = 0x69
|
||||
SC_V6_LPBIG_OFFBIG = 0x6a
|
||||
|
||||
SC_2_C_BIND = 0x12
|
||||
SC_2_C_DEV = 0x13
|
||||
SC_2_CHAR_TERM = 0x14
|
||||
SC_2_FORT_DEV = 0x15
|
||||
SC_2_FORT_RUN = 0x16
|
||||
SC_2_LOCALEDEF = 0x17
|
||||
SC_2_PBS = 0x3b
|
||||
SC_2_PBS_ACCOUNTING = 0x3c
|
||||
SC_2_PBS_CHECKPOINT = 0x3d
|
||||
SC_2_PBS_LOCATE = 0x3e
|
||||
SC_2_PBS_MESSAGE = 0x3f
|
||||
SC_2_PBS_TRACK = 0x40
|
||||
SC_2_SW_DEV = 0x18
|
||||
SC_2_UPE = 0x19
|
||||
SC_2_VERSION = 0x11
|
||||
|
||||
SC_XOPEN_CRYPT = 0x6c
|
||||
SC_XOPEN_ENH_I18N = 0x6d
|
||||
SC_XOPEN_REALTIME = 0x6f
|
||||
SC_XOPEN_REALTIME_THREADS = 0x70
|
||||
SC_XOPEN_SHM = 0x71
|
||||
SC_XOPEN_STREAMS = 0x72
|
||||
SC_XOPEN_UNIX = 0x73
|
||||
SC_XOPEN_VERSION = 0x74
|
||||
SC_XOPEN_XCU_VERSION = 0x79
|
||||
|
||||
SC_PHYS_PAGES = 0xc8
|
||||
SC_NPROCESSORS_CONF = 0x39
|
||||
SC_NPROCESSORS_ONLN = 0x3a
|
||||
)
|
||||
|
||||
const (
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0x2
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_IOV_MAX = 0x400
|
||||
_LINE_MAX = 0x800
|
||||
_NAME_MAX = 0xff
|
||||
_RE_DUP_MAX = 0xff
|
||||
|
||||
_CLK_TCK = 0x64
|
||||
|
||||
_MAXHOSTNAMELEN = 0x100
|
||||
_MAXLOGNAME = 0xff
|
||||
_MAXSYMLINKS = 0x20
|
||||
|
||||
_POSIX_ADVISORY_INFO = -0x1
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = -0x1
|
||||
_POSIX_BARRIERS = -0x1
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = -0x1
|
||||
_POSIX_CPUTIME = -0x1
|
||||
_POSIX_FSYNC = 0x30db0
|
||||
_POSIX_IPV6 = 0x30db0
|
||||
_POSIX_JOB_CONTROL = 0x30db0
|
||||
_POSIX_MAPPED_FILES = 0x30db0
|
||||
_POSIX_MEMLOCK = -0x1
|
||||
_POSIX_MEMLOCK_RANGE = -0x1
|
||||
_POSIX_MEMORY_PROTECTION = 0x30db0
|
||||
_POSIX_MESSAGE_PASSING = -0x1
|
||||
_POSIX_MONOTONIC_CLOCK = -0x1
|
||||
_POSIX_PRIORITIZED_IO = -0x1
|
||||
_POSIX_PRIORITY_SCHEDULING = -0x1
|
||||
_POSIX_RAW_SOCKETS = -0x1
|
||||
_POSIX_READER_WRITER_LOCKS = 0x30db0
|
||||
_POSIX_REALTIME_SIGNALS = -0x1
|
||||
_POSIX_REGEXP = 0x30db0
|
||||
_POSIX_SEM_VALUE_MAX = 0x7fff
|
||||
_POSIX_SEMAPHORES = -0x1
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_SHELL = 0x30db0
|
||||
_POSIX_SIGQUEUE_MAX = 0x20
|
||||
_POSIX_SPAWN = -0x1
|
||||
_POSIX_SPIN_LOCKS = -0x1
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SS_REPL_MAX = 0x4
|
||||
_POSIX_SYNCHRONIZED_IO = -0x1
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x30db0
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x30db0
|
||||
_POSIX_THREAD_CPUTIME = -0x1
|
||||
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_POSIX_THREAD_KEYS_MAX = 0x80
|
||||
_POSIX_THREAD_PRIO_INHERIT = -0x1
|
||||
_POSIX_THREAD_PRIO_PROTECT = -0x1
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = -0x1
|
||||
_POSIX_THREAD_PROCESS_SHARED = 0x30db0
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x30db0
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x30db0
|
||||
_POSIX_TIMEOUTS = -0x1
|
||||
_POSIX_TIMERS = -0x1
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TRACE_EVENT_FILTER = -0x1
|
||||
_POSIX_TRACE_EVENT_NAME_MAX = 0x1e
|
||||
_POSIX_TRACE_INHERIT = -0x1
|
||||
_POSIX_TRACE_LOG = -0x1
|
||||
_POSIX_TRACE_NAME_MAX = 0x8
|
||||
_POSIX_TRACE_SYS_MAX = 0x8
|
||||
_POSIX_TRACE_USER_EVENT_MAX = 0x20
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x30db0
|
||||
|
||||
_V6_ILP32_OFF32 = -0x1
|
||||
_V6_ILP32_OFFBIG = -0x1
|
||||
_V6_LP64_OFF64 = 0x1
|
||||
_V6_LPBIG_OFFBIG = 0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x30db0
|
||||
_POSIX2_C_DEV = 0x30db0
|
||||
_POSIX2_CHAR_TERM = 0x30db0
|
||||
_POSIX2_LOCALEDEF = 0x30db0
|
||||
_POSIX2_PBS = -0x1
|
||||
_POSIX2_SW_DEV = 0x30db0
|
||||
_POSIX2_UPE = 0x30db0
|
||||
_POSIX2_VERSION = 0x30db0
|
||||
|
||||
_XOPEN_CRYPT = 0x1
|
||||
_XOPEN_ENH_I18N = 0x1
|
||||
_XOPEN_REALTIME = -0x1
|
||||
_XOPEN_REALTIME_THREADS = -0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = 0x1
|
||||
_XOPEN_VERSION = 0x258
|
||||
_XOPEN_XCU_VERSION = 0x4
|
||||
|
||||
_PTHREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_PTHREAD_KEYS_MAX = 0x200
|
||||
_PTHREAD_STACK_MIN = 0x2000
|
||||
)
|
||||
|
||||
const (
|
||||
_PC_NAME_MAX = 0x4
|
||||
|
||||
_PATH_ZONEINFO = "/usr/share/zoneinfo"
|
||||
)
|
||||
|
||||
const (
|
||||
_CHAR_BIT = 0x8
|
||||
|
||||
_INT_MAX = 0x7fffffff
|
||||
|
||||
sizeofOffT = 0x8
|
||||
)
|
||||
+228
@@ -0,0 +1,228 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_defs_dragonfly.go
|
||||
|
||||
//go:build dragonfly
|
||||
// +build dragonfly
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
SC_AIO_LISTIO_MAX = 0x2a
|
||||
SC_AIO_MAX = 0x2b
|
||||
SC_AIO_PRIO_DELTA_MAX = 0x2c
|
||||
SC_ARG_MAX = 0x1
|
||||
SC_ATEXIT_MAX = 0x6b
|
||||
SC_BC_BASE_MAX = 0x9
|
||||
SC_BC_DIM_MAX = 0xa
|
||||
SC_BC_SCALE_MAX = 0xb
|
||||
SC_BC_STRING_MAX = 0xc
|
||||
SC_CHILD_MAX = 0x2
|
||||
SC_CLK_TCK = 0x3
|
||||
SC_COLL_WEIGHTS_MAX = 0xd
|
||||
SC_DELAYTIMER_MAX = 0x2d
|
||||
SC_EXPR_NEST_MAX = 0xe
|
||||
SC_GETGR_R_SIZE_MAX = 0x46
|
||||
SC_GETPW_R_SIZE_MAX = 0x47
|
||||
SC_HOST_NAME_MAX = 0x48
|
||||
SC_IOV_MAX = 0x38
|
||||
SC_LINE_MAX = 0xf
|
||||
SC_LOGIN_NAME_MAX = 0x49
|
||||
SC_MQ_OPEN_MAX = 0x2e
|
||||
SC_MQ_PRIO_MAX = 0x4b
|
||||
SC_NGROUPS_MAX = 0x4
|
||||
SC_OPEN_MAX = 0x5
|
||||
SC_PAGE_SIZE = 0x2f
|
||||
SC_PAGESIZE = 0x2f
|
||||
SC_RE_DUP_MAX = 0x10
|
||||
SC_RTSIG_MAX = 0x30
|
||||
SC_SEM_NSEMS_MAX = 0x31
|
||||
SC_SEM_VALUE_MAX = 0x32
|
||||
SC_SIGQUEUE_MAX = 0x33
|
||||
SC_STREAM_MAX = 0x1a
|
||||
SC_SYMLOOP_MAX = 0x78
|
||||
SC_THREAD_DESTRUCTOR_ITERATIONS = 0x55
|
||||
SC_THREAD_KEYS_MAX = 0x56
|
||||
SC_THREAD_STACK_MIN = 0x5d
|
||||
SC_THREAD_THREADS_MAX = 0x5e
|
||||
SC_TIMER_MAX = 0x34
|
||||
SC_TTY_NAME_MAX = 0x65
|
||||
SC_TZNAME_MAX = 0x1b
|
||||
|
||||
SC_ADVISORY_INFO = 0x41
|
||||
SC_ASYNCHRONOUS_IO = 0x1c
|
||||
SC_BARRIERS = 0x42
|
||||
SC_CLOCK_SELECTION = 0x43
|
||||
SC_CPUTIME = 0x44
|
||||
SC_FSYNC = 0x26
|
||||
SC_IPV6 = 0x76
|
||||
SC_JOB_CONTROL = 0x6
|
||||
SC_MAPPED_FILES = 0x1d
|
||||
SC_MEMLOCK = 0x1e
|
||||
SC_MEMLOCK_RANGE = 0x1f
|
||||
SC_MEMORY_PROTECTION = 0x20
|
||||
SC_MESSAGE_PASSING = 0x21
|
||||
SC_MONOTONIC_CLOCK = 0x4a
|
||||
SC_PRIORITIZED_IO = 0x22
|
||||
SC_PRIORITY_SCHEDULING = 0x23
|
||||
SC_RAW_SOCKETS = 0x77
|
||||
SC_READER_WRITER_LOCKS = 0x4c
|
||||
SC_REALTIME_SIGNALS = 0x24
|
||||
SC_REGEXP = 0x4d
|
||||
SC_SAVED_IDS = 0x7
|
||||
SC_SEMAPHORES = 0x25
|
||||
SC_SHARED_MEMORY_OBJECTS = 0x27
|
||||
SC_SHELL = 0x4e
|
||||
SC_SPAWN = 0x4f
|
||||
SC_SPIN_LOCKS = 0x50
|
||||
SC_SPORADIC_SERVER = 0x51
|
||||
SC_SYNCHRONIZED_IO = 0x28
|
||||
SC_THREAD_ATTR_STACKADDR = 0x52
|
||||
SC_THREAD_ATTR_STACKSIZE = 0x53
|
||||
SC_THREAD_CPUTIME = 0x54
|
||||
SC_THREAD_PRIO_INHERIT = 0x57
|
||||
SC_THREAD_PRIO_PROTECT = 0x58
|
||||
SC_THREAD_PRIORITY_SCHEDULING = 0x59
|
||||
SC_THREAD_PROCESS_SHARED = 0x5a
|
||||
SC_THREAD_SAFE_FUNCTIONS = 0x5b
|
||||
SC_THREAD_SPORADIC_SERVER = 0x5c
|
||||
SC_THREADS = 0x60
|
||||
SC_TIMEOUTS = 0x5f
|
||||
SC_TIMERS = 0x29
|
||||
SC_TRACE = 0x61
|
||||
SC_TRACE_EVENT_FILTER = 0x62
|
||||
SC_TRACE_INHERIT = 0x63
|
||||
SC_TRACE_LOG = 0x64
|
||||
SC_TYPED_MEMORY_OBJECTS = 0x66
|
||||
SC_VERSION = 0x8
|
||||
|
||||
SC_V6_ILP32_OFF32 = 0x67
|
||||
SC_V6_ILP32_OFFBIG = 0x68
|
||||
SC_V6_LP64_OFF64 = 0x69
|
||||
SC_V6_LPBIG_OFFBIG = 0x6a
|
||||
|
||||
SC_2_C_BIND = 0x12
|
||||
SC_2_C_DEV = 0x13
|
||||
SC_2_CHAR_TERM = 0x14
|
||||
SC_2_FORT_DEV = 0x15
|
||||
SC_2_FORT_RUN = 0x16
|
||||
SC_2_LOCALEDEF = 0x17
|
||||
SC_2_PBS = 0x3b
|
||||
SC_2_PBS_ACCOUNTING = 0x3c
|
||||
SC_2_PBS_CHECKPOINT = 0x3d
|
||||
SC_2_PBS_LOCATE = 0x3e
|
||||
SC_2_PBS_MESSAGE = 0x3f
|
||||
SC_2_PBS_TRACK = 0x40
|
||||
SC_2_SW_DEV = 0x18
|
||||
SC_2_UPE = 0x19
|
||||
SC_2_VERSION = 0x11
|
||||
|
||||
SC_XOPEN_CRYPT = 0x6c
|
||||
SC_XOPEN_ENH_I18N = 0x6d
|
||||
SC_XOPEN_REALTIME = 0x6f
|
||||
SC_XOPEN_REALTIME_THREADS = 0x70
|
||||
SC_XOPEN_SHM = 0x71
|
||||
SC_XOPEN_STREAMS = 0x72
|
||||
SC_XOPEN_UNIX = 0x73
|
||||
SC_XOPEN_VERSION = 0x74
|
||||
SC_XOPEN_XCU_VERSION = 0x75
|
||||
|
||||
SC_PHYS_PAGES = 0x79
|
||||
SC_NPROCESSORS_CONF = 0x39
|
||||
SC_NPROCESSORS_ONLN = 0x3a
|
||||
)
|
||||
|
||||
const (
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0xa
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_LINE_MAX = 0x800
|
||||
_RE_DUP_MAX = 0xff
|
||||
|
||||
_CLK_TCK = 0x80
|
||||
|
||||
_MAXHOSTNAMELEN = 0x100
|
||||
_MAXLOGNAME = 0x11
|
||||
_MAXSYMLINKS = 0x20
|
||||
_ATEXIT_SIZE = 0x20
|
||||
|
||||
_POSIX_ADVISORY_INFO = -0x1
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = 0x0
|
||||
_POSIX_BARRIERS = 0x30db0
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = -0x1
|
||||
_POSIX_CPUTIME = 0x30db0
|
||||
_POSIX_FSYNC = 0x30db0
|
||||
_POSIX_IPV6 = 0x0
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x30db0
|
||||
_POSIX_MEMLOCK = -0x1
|
||||
_POSIX_MEMLOCK_RANGE = 0x30db0
|
||||
_POSIX_MEMORY_PROTECTION = 0x30db0
|
||||
_POSIX_MESSAGE_PASSING = 0x30db0
|
||||
_POSIX_MONOTONIC_CLOCK = 0x30db0
|
||||
_POSIX_PRIORITIZED_IO = -0x1
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x30db0
|
||||
_POSIX_RAW_SOCKETS = 0x30db0
|
||||
_POSIX_READER_WRITER_LOCKS = 0x30db0
|
||||
_POSIX_REALTIME_SIGNALS = 0x30db0
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SEM_VALUE_MAX = 0x7fff
|
||||
_POSIX_SEMAPHORES = 0x30db0
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x30db0
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SPAWN = 0x30db0
|
||||
_POSIX_SPIN_LOCKS = 0x30db0
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = -0x1
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x30db0
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x30db0
|
||||
_POSIX_THREAD_CPUTIME = 0x30db0
|
||||
_POSIX_THREAD_PRIO_INHERIT = 0x30db0
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x30db0
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x30db0
|
||||
_POSIX_THREAD_PROCESS_SHARED = -0x1
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = -0x1
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x30db0
|
||||
_POSIX_TIMEOUTS = 0x30db0
|
||||
_POSIX_TIMERS = 0x30db0
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x30db0
|
||||
|
||||
_V6_ILP32_OFF32 = -0x1
|
||||
_V6_ILP32_OFFBIG = 0x0
|
||||
_V6_LP64_OFF64 = 0x0
|
||||
_V6_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x31069
|
||||
_POSIX2_C_DEV = 0x31069
|
||||
_POSIX2_CHAR_TERM = 0x1
|
||||
_POSIX2_LOCALEDEF = 0x31069
|
||||
_POSIX2_PBS = -0x1
|
||||
_POSIX2_SW_DEV = 0x31069
|
||||
_POSIX2_UPE = 0x31069
|
||||
_POSIX2_VERSION = 0x30a2c
|
||||
|
||||
_XOPEN_CRYPT = -0x1
|
||||
_XOPEN_ENH_I18N = -0x1
|
||||
_XOPEN_REALTIME = -0x1
|
||||
_XOPEN_REALTIME_THREADS = -0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = -0x1
|
||||
|
||||
_PTHREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_PTHREAD_KEYS_MAX = 0x100
|
||||
_PTHREAD_STACK_MIN = 0x4000
|
||||
)
|
||||
|
||||
const (
|
||||
_PC_NAME_MAX = 0x4
|
||||
|
||||
_PATH_DEV = "/dev/"
|
||||
_PATH_ZONEINFO = "/usr/share/zoneinfo"
|
||||
)
|
||||
+229
@@ -0,0 +1,229 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_defs_freebsd.go
|
||||
|
||||
//go:build freebsd
|
||||
// +build freebsd
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
SC_AIO_LISTIO_MAX = 0x2a
|
||||
SC_AIO_MAX = 0x2b
|
||||
SC_AIO_PRIO_DELTA_MAX = 0x2c
|
||||
SC_ARG_MAX = 0x1
|
||||
SC_ATEXIT_MAX = 0x6b
|
||||
SC_BC_BASE_MAX = 0x9
|
||||
SC_BC_DIM_MAX = 0xa
|
||||
SC_BC_SCALE_MAX = 0xb
|
||||
SC_BC_STRING_MAX = 0xc
|
||||
SC_CHILD_MAX = 0x2
|
||||
SC_CLK_TCK = 0x3
|
||||
SC_COLL_WEIGHTS_MAX = 0xd
|
||||
SC_DELAYTIMER_MAX = 0x2d
|
||||
SC_EXPR_NEST_MAX = 0xe
|
||||
SC_GETGR_R_SIZE_MAX = 0x46
|
||||
SC_GETPW_R_SIZE_MAX = 0x47
|
||||
SC_HOST_NAME_MAX = 0x48
|
||||
SC_IOV_MAX = 0x38
|
||||
SC_LINE_MAX = 0xf
|
||||
SC_LOGIN_NAME_MAX = 0x49
|
||||
SC_MQ_OPEN_MAX = 0x2e
|
||||
SC_MQ_PRIO_MAX = 0x4b
|
||||
SC_NGROUPS_MAX = 0x4
|
||||
SC_OPEN_MAX = 0x5
|
||||
SC_PAGE_SIZE = 0x2f
|
||||
SC_PAGESIZE = 0x2f
|
||||
SC_RE_DUP_MAX = 0x10
|
||||
SC_RTSIG_MAX = 0x30
|
||||
SC_SEM_NSEMS_MAX = 0x31
|
||||
SC_SEM_VALUE_MAX = 0x32
|
||||
SC_SIGQUEUE_MAX = 0x33
|
||||
SC_STREAM_MAX = 0x1a
|
||||
SC_SYMLOOP_MAX = 0x78
|
||||
SC_THREAD_DESTRUCTOR_ITERATIONS = 0x55
|
||||
SC_THREAD_KEYS_MAX = 0x56
|
||||
SC_THREAD_STACK_MIN = 0x5d
|
||||
SC_THREAD_THREADS_MAX = 0x5e
|
||||
SC_TIMER_MAX = 0x34
|
||||
SC_TTY_NAME_MAX = 0x65
|
||||
SC_TZNAME_MAX = 0x1b
|
||||
|
||||
SC_ADVISORY_INFO = 0x41
|
||||
SC_ASYNCHRONOUS_IO = 0x1c
|
||||
SC_BARRIERS = 0x42
|
||||
SC_CLOCK_SELECTION = 0x43
|
||||
SC_CPUTIME = 0x44
|
||||
SC_FSYNC = 0x26
|
||||
SC_IPV6 = 0x76
|
||||
SC_JOB_CONTROL = 0x6
|
||||
SC_MAPPED_FILES = 0x1d
|
||||
SC_MEMLOCK = 0x1e
|
||||
SC_MEMLOCK_RANGE = 0x1f
|
||||
SC_MEMORY_PROTECTION = 0x20
|
||||
SC_MESSAGE_PASSING = 0x21
|
||||
SC_MONOTONIC_CLOCK = 0x4a
|
||||
SC_PRIORITIZED_IO = 0x22
|
||||
SC_PRIORITY_SCHEDULING = 0x23
|
||||
SC_RAW_SOCKETS = 0x77
|
||||
SC_READER_WRITER_LOCKS = 0x4c
|
||||
SC_REALTIME_SIGNALS = 0x24
|
||||
SC_REGEXP = 0x4d
|
||||
SC_SAVED_IDS = 0x7
|
||||
SC_SEMAPHORES = 0x25
|
||||
SC_SHARED_MEMORY_OBJECTS = 0x27
|
||||
SC_SHELL = 0x4e
|
||||
SC_SPAWN = 0x4f
|
||||
SC_SPIN_LOCKS = 0x50
|
||||
SC_SPORADIC_SERVER = 0x51
|
||||
SC_SYNCHRONIZED_IO = 0x28
|
||||
SC_THREAD_ATTR_STACKADDR = 0x52
|
||||
SC_THREAD_ATTR_STACKSIZE = 0x53
|
||||
SC_THREAD_CPUTIME = 0x54
|
||||
SC_THREAD_PRIO_INHERIT = 0x57
|
||||
SC_THREAD_PRIO_PROTECT = 0x58
|
||||
SC_THREAD_PRIORITY_SCHEDULING = 0x59
|
||||
SC_THREAD_PROCESS_SHARED = 0x5a
|
||||
SC_THREAD_SAFE_FUNCTIONS = 0x5b
|
||||
SC_THREAD_SPORADIC_SERVER = 0x5c
|
||||
SC_THREADS = 0x60
|
||||
SC_TIMEOUTS = 0x5f
|
||||
SC_TIMERS = 0x29
|
||||
SC_TRACE = 0x61
|
||||
SC_TRACE_EVENT_FILTER = 0x62
|
||||
SC_TRACE_INHERIT = 0x63
|
||||
SC_TRACE_LOG = 0x64
|
||||
SC_TYPED_MEMORY_OBJECTS = 0x66
|
||||
SC_VERSION = 0x8
|
||||
|
||||
SC_V6_ILP32_OFF32 = 0x67
|
||||
SC_V6_ILP32_OFFBIG = 0x68
|
||||
SC_V6_LP64_OFF64 = 0x69
|
||||
SC_V6_LPBIG_OFFBIG = 0x6a
|
||||
|
||||
SC_2_C_BIND = 0x12
|
||||
SC_2_C_DEV = 0x13
|
||||
SC_2_CHAR_TERM = 0x14
|
||||
SC_2_FORT_DEV = 0x15
|
||||
SC_2_FORT_RUN = 0x16
|
||||
SC_2_LOCALEDEF = 0x17
|
||||
SC_2_PBS = 0x3b
|
||||
SC_2_PBS_ACCOUNTING = 0x3c
|
||||
SC_2_PBS_CHECKPOINT = 0x3d
|
||||
SC_2_PBS_LOCATE = 0x3e
|
||||
SC_2_PBS_MESSAGE = 0x3f
|
||||
SC_2_PBS_TRACK = 0x40
|
||||
SC_2_SW_DEV = 0x18
|
||||
SC_2_UPE = 0x19
|
||||
SC_2_VERSION = 0x11
|
||||
|
||||
SC_XOPEN_CRYPT = 0x6c
|
||||
SC_XOPEN_ENH_I18N = 0x6d
|
||||
SC_XOPEN_REALTIME = 0x6f
|
||||
SC_XOPEN_REALTIME_THREADS = 0x70
|
||||
SC_XOPEN_SHM = 0x71
|
||||
SC_XOPEN_STREAMS = 0x72
|
||||
SC_XOPEN_UNIX = 0x73
|
||||
SC_XOPEN_VERSION = 0x74
|
||||
SC_XOPEN_XCU_VERSION = 0x75
|
||||
|
||||
SC_PHYS_PAGES = 0x79
|
||||
SC_NPROCESSORS_CONF = 0x39
|
||||
SC_NPROCESSORS_ONLN = 0x3a
|
||||
)
|
||||
|
||||
const (
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0xa
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_LINE_MAX = 0x800
|
||||
_MQ_PRIO_MAX = 0x40
|
||||
_RE_DUP_MAX = 0xff
|
||||
_SEM_VALUE_MAX = 0x7fffffff
|
||||
|
||||
_CLK_TCK = 0x80
|
||||
|
||||
_MAXHOSTNAMELEN = 0x100
|
||||
_MAXLOGNAME = 0x21
|
||||
_MAXSYMLINKS = 0x20
|
||||
_ATEXIT_SIZE = 0x20
|
||||
|
||||
_POSIX_ADVISORY_INFO = 0x30db0
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = 0x30db0
|
||||
_POSIX_BARRIERS = 0x30db0
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = -0x1
|
||||
_POSIX_CPUTIME = 0x30db0
|
||||
_POSIX_FSYNC = 0x30db0
|
||||
_POSIX_IPV6 = 0x0
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x30db0
|
||||
_POSIX_MEMLOCK = -0x1
|
||||
_POSIX_MEMLOCK_RANGE = 0x30db0
|
||||
_POSIX_MEMORY_PROTECTION = 0x30db0
|
||||
_POSIX_MESSAGE_PASSING = 0x30db0
|
||||
_POSIX_MONOTONIC_CLOCK = 0x30db0
|
||||
_POSIX_PRIORITIZED_IO = -0x1
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x0
|
||||
_POSIX_RAW_SOCKETS = 0x30db0
|
||||
_POSIX_READER_WRITER_LOCKS = 0x30db0
|
||||
_POSIX_REALTIME_SIGNALS = 0x30db0
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SEM_VALUE_MAX = 0x7fff
|
||||
_POSIX_SEMAPHORES = 0x30db0
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x30db0
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SPAWN = 0x30db0
|
||||
_POSIX_SPIN_LOCKS = 0x30db0
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = -0x1
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x30db0
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x30db0
|
||||
_POSIX_THREAD_CPUTIME = 0x30db0
|
||||
_POSIX_THREAD_PRIO_INHERIT = 0x30db0
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x30db0
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x30db0
|
||||
_POSIX_THREAD_PROCESS_SHARED = 0x30db0
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = -0x1
|
||||
_POSIX_THREADS = 0x30db0
|
||||
_POSIX_TIMEOUTS = 0x30db0
|
||||
_POSIX_TIMERS = 0x30db0
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x30db0
|
||||
|
||||
_V6_ILP32_OFF32 = -0x1
|
||||
_V6_ILP32_OFFBIG = 0x0
|
||||
_V6_LP64_OFF64 = 0x0
|
||||
_V6_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x30db0
|
||||
_POSIX2_C_DEV = -0x1
|
||||
_POSIX2_CHAR_TERM = 0x1
|
||||
_POSIX2_LOCALEDEF = -0x1
|
||||
_POSIX2_PBS = -0x1
|
||||
_POSIX2_SW_DEV = -0x1
|
||||
_POSIX2_UPE = 0x30db0
|
||||
_POSIX2_VERSION = 0x30a2c
|
||||
|
||||
_XOPEN_CRYPT = -0x1
|
||||
_XOPEN_ENH_I18N = -0x1
|
||||
_XOPEN_REALTIME = -0x1
|
||||
_XOPEN_REALTIME_THREADS = -0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = -0x1
|
||||
|
||||
_PTHREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_PTHREAD_KEYS_MAX = 0x100
|
||||
_PTHREAD_STACK_MIN = 0x800
|
||||
)
|
||||
|
||||
const (
|
||||
_PC_NAME_MAX = 0x4
|
||||
|
||||
_PATH_DEV = "/dev/"
|
||||
_PATH_ZONEINFO = "/usr/share/zoneinfo"
|
||||
)
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_defs_linux.go
|
||||
|
||||
//go:build linux
|
||||
// +build linux
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
SC_AIO_LISTIO_MAX = 0x17
|
||||
SC_AIO_MAX = 0x18
|
||||
SC_AIO_PRIO_DELTA_MAX = 0x19
|
||||
SC_ARG_MAX = 0x0
|
||||
SC_ATEXIT_MAX = 0x57
|
||||
SC_BC_BASE_MAX = 0x24
|
||||
SC_BC_DIM_MAX = 0x25
|
||||
SC_BC_SCALE_MAX = 0x26
|
||||
SC_BC_STRING_MAX = 0x27
|
||||
SC_CHILD_MAX = 0x1
|
||||
SC_CLK_TCK = 0x2
|
||||
SC_COLL_WEIGHTS_MAX = 0x28
|
||||
SC_DELAYTIMER_MAX = 0x1a
|
||||
SC_EXPR_NEST_MAX = 0x2a
|
||||
SC_GETGR_R_SIZE_MAX = 0x45
|
||||
SC_GETPW_R_SIZE_MAX = 0x46
|
||||
SC_HOST_NAME_MAX = 0xb4
|
||||
SC_IOV_MAX = 0x3c
|
||||
SC_LINE_MAX = 0x2b
|
||||
SC_LOGIN_NAME_MAX = 0x47
|
||||
SC_MQ_OPEN_MAX = 0x1b
|
||||
SC_MQ_PRIO_MAX = 0x1c
|
||||
SC_NGROUPS_MAX = 0x3
|
||||
SC_OPEN_MAX = 0x4
|
||||
SC_PAGE_SIZE = 0x1e
|
||||
SC_PAGESIZE = 0x1e
|
||||
SC_THREAD_DESTRUCTOR_ITERATIONS = 0x49
|
||||
SC_THREAD_KEYS_MAX = 0x4a
|
||||
SC_THREAD_STACK_MIN = 0x4b
|
||||
SC_THREAD_THREADS_MAX = 0x4c
|
||||
SC_RE_DUP_MAX = 0x2c
|
||||
SC_RTSIG_MAX = 0x1f
|
||||
SC_SEM_NSEMS_MAX = 0x20
|
||||
SC_SEM_VALUE_MAX = 0x21
|
||||
SC_SIGQUEUE_MAX = 0x22
|
||||
SC_STREAM_MAX = 0x5
|
||||
SC_SYMLOOP_MAX = 0xad
|
||||
SC_TIMER_MAX = 0x23
|
||||
SC_TTY_NAME_MAX = 0x48
|
||||
SC_TZNAME_MAX = 0x6
|
||||
|
||||
SC_ADVISORY_INFO = 0x84
|
||||
SC_ASYNCHRONOUS_IO = 0xc
|
||||
SC_BARRIERS = 0x85
|
||||
SC_CLOCK_SELECTION = 0x89
|
||||
SC_CPUTIME = 0x8a
|
||||
SC_FSYNC = 0xf
|
||||
SC_IPV6 = 0xeb
|
||||
SC_JOB_CONTROL = 0x7
|
||||
SC_MAPPED_FILES = 0x10
|
||||
SC_MEMLOCK = 0x11
|
||||
SC_MEMLOCK_RANGE = 0x12
|
||||
SC_MEMORY_PROTECTION = 0x13
|
||||
SC_MESSAGE_PASSING = 0x14
|
||||
SC_MONOTONIC_CLOCK = 0x95
|
||||
SC_PRIORITIZED_IO = 0xd
|
||||
SC_PRIORITY_SCHEDULING = 0xa
|
||||
SC_RAW_SOCKETS = 0xec
|
||||
SC_READER_WRITER_LOCKS = 0x99
|
||||
SC_REALTIME_SIGNALS = 0x9
|
||||
SC_REGEXP = 0x9b
|
||||
SC_SAVED_IDS = 0x8
|
||||
SC_SEMAPHORES = 0x15
|
||||
SC_SHARED_MEMORY_OBJECTS = 0x16
|
||||
SC_SHELL = 0x9d
|
||||
SC_SPAWN = 0x9f
|
||||
SC_SPIN_LOCKS = 0x9a
|
||||
SC_SPORADIC_SERVER = 0xa0
|
||||
SC_SS_REPL_MAX = 0xf1
|
||||
SC_SYNCHRONIZED_IO = 0xe
|
||||
SC_THREAD_ATTR_STACKADDR = 0x4d
|
||||
SC_THREAD_ATTR_STACKSIZE = 0x4e
|
||||
SC_THREAD_CPUTIME = 0x8b
|
||||
SC_THREAD_PRIO_INHERIT = 0x50
|
||||
SC_THREAD_PRIO_PROTECT = 0x51
|
||||
SC_THREAD_PRIORITY_SCHEDULING = 0x4f
|
||||
SC_THREAD_PROCESS_SHARED = 0x52
|
||||
SC_THREAD_ROBUST_PRIO_INHERIT = 0xf7
|
||||
SC_THREAD_ROBUST_PRIO_PROTECT = 0xf8
|
||||
SC_THREAD_SAFE_FUNCTIONS = 0x44
|
||||
SC_THREAD_SPORADIC_SERVER = 0xa1
|
||||
SC_THREADS = 0x43
|
||||
SC_TIMEOUTS = 0xa4
|
||||
SC_TIMERS = 0xb
|
||||
SC_TRACE = 0xb5
|
||||
SC_TRACE_EVENT_FILTER = 0xb6
|
||||
SC_TRACE_EVENT_NAME_MAX = 0xf2
|
||||
SC_TRACE_INHERIT = 0xb7
|
||||
SC_TRACE_LOG = 0xb8
|
||||
SC_TRACE_NAME_MAX = 0xf3
|
||||
SC_TRACE_SYS_MAX = 0xf4
|
||||
SC_TRACE_USER_EVENT_MAX = 0xf5
|
||||
SC_TYPED_MEMORY_OBJECTS = 0xa5
|
||||
SC_VERSION = 0x1d
|
||||
|
||||
SC_V7_ILP32_OFF32 = 0xed
|
||||
SC_V7_ILP32_OFFBIG = 0xee
|
||||
SC_V7_LP64_OFF64 = 0xef
|
||||
SC_V7_LPBIG_OFFBIG = 0xf0
|
||||
|
||||
SC_V6_ILP32_OFF32 = 0xb0
|
||||
SC_V6_ILP32_OFFBIG = 0xb1
|
||||
SC_V6_LP64_OFF64 = 0xb2
|
||||
SC_V6_LPBIG_OFFBIG = 0xb3
|
||||
|
||||
SC_2_C_BIND = 0x2f
|
||||
SC_2_C_DEV = 0x30
|
||||
SC_2_C_VERSION = 0x60
|
||||
SC_2_CHAR_TERM = 0x5f
|
||||
SC_2_FORT_DEV = 0x31
|
||||
SC_2_FORT_RUN = 0x32
|
||||
SC_2_LOCALEDEF = 0x34
|
||||
SC_2_PBS = 0xa8
|
||||
SC_2_PBS_ACCOUNTING = 0xa9
|
||||
SC_2_PBS_CHECKPOINT = 0xaf
|
||||
SC_2_PBS_LOCATE = 0xaa
|
||||
SC_2_PBS_MESSAGE = 0xab
|
||||
SC_2_PBS_TRACK = 0xac
|
||||
SC_2_SW_DEV = 0x33
|
||||
SC_2_UPE = 0x61
|
||||
SC_2_VERSION = 0x2e
|
||||
|
||||
SC_XOPEN_CRYPT = 0x5c
|
||||
SC_XOPEN_ENH_I18N = 0x5d
|
||||
SC_XOPEN_REALTIME = 0x82
|
||||
SC_XOPEN_REALTIME_THREADS = 0x83
|
||||
SC_XOPEN_SHM = 0x5e
|
||||
SC_XOPEN_STREAMS = 0xf6
|
||||
SC_XOPEN_UNIX = 0x5b
|
||||
SC_XOPEN_VERSION = 0x59
|
||||
SC_XOPEN_XCU_VERSION = 0x5a
|
||||
|
||||
SC_PHYS_PAGES = 0x55
|
||||
SC_AVPHYS_PAGES = 0x56
|
||||
SC_NPROCESSORS_CONF = 0x53
|
||||
SC_NPROCESSORS_ONLN = 0x54
|
||||
SC_UIO_MAXIOV = 0x3c
|
||||
)
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_defs_netbsd.go
|
||||
|
||||
//go:build netbsd
|
||||
// +build netbsd
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
SC_ARG_MAX = 0x1
|
||||
SC_CHILD_MAX = 0x2
|
||||
SC_NGROUPS_MAX = 0x4
|
||||
SC_OPEN_MAX = 0x5
|
||||
SC_JOB_CONTROL = 0x6
|
||||
SC_SAVED_IDS = 0x7
|
||||
SC_VERSION = 0x8
|
||||
SC_BC_BASE_MAX = 0x9
|
||||
SC_BC_DIM_MAX = 0xa
|
||||
SC_BC_SCALE_MAX = 0xb
|
||||
SC_BC_STRING_MAX = 0xc
|
||||
SC_COLL_WEIGHTS_MAX = 0xd
|
||||
SC_EXPR_NEST_MAX = 0xe
|
||||
SC_LINE_MAX = 0xf
|
||||
SC_RE_DUP_MAX = 0x10
|
||||
SC_2_VERSION = 0x11
|
||||
SC_2_C_BIND = 0x12
|
||||
SC_2_C_DEV = 0x13
|
||||
SC_2_CHAR_TERM = 0x14
|
||||
SC_2_FORT_DEV = 0x15
|
||||
SC_2_FORT_RUN = 0x16
|
||||
SC_2_LOCALEDEF = 0x17
|
||||
SC_2_SW_DEV = 0x18
|
||||
SC_2_UPE = 0x19
|
||||
SC_STREAM_MAX = 0x1a
|
||||
SC_TZNAME_MAX = 0x1b
|
||||
SC_PAGESIZE = 0x1c
|
||||
SC_PAGE_SIZE = 0x1c
|
||||
SC_FSYNC = 0x1d
|
||||
SC_XOPEN_SHM = 0x1e
|
||||
SC_SYNCHRONIZED_IO = 0x1f
|
||||
SC_IOV_MAX = 0x20
|
||||
SC_MAPPED_FILES = 0x21
|
||||
SC_MEMLOCK = 0x22
|
||||
SC_MEMLOCK_RANGE = 0x23
|
||||
SC_MEMORY_PROTECTION = 0x24
|
||||
SC_LOGIN_NAME_MAX = 0x25
|
||||
SC_MONOTONIC_CLOCK = 0x26
|
||||
SC_CLK_TCK = 0x27
|
||||
SC_ATEXIT_MAX = 0x28
|
||||
SC_THREADS = 0x29
|
||||
SC_SEMAPHORES = 0x2a
|
||||
SC_BARRIERS = 0x2b
|
||||
SC_TIMERS = 0x2c
|
||||
SC_SPIN_LOCKS = 0x2d
|
||||
SC_READER_WRITER_LOCKS = 0x2e
|
||||
SC_GETGR_R_SIZE_MAX = 0x2f
|
||||
SC_GETPW_R_SIZE_MAX = 0x30
|
||||
SC_CLOCK_SELECTION = 0x31
|
||||
SC_ASYNCHRONOUS_IO = 0x32
|
||||
SC_AIO_LISTIO_MAX = 0x33
|
||||
SC_AIO_MAX = 0x34
|
||||
SC_MESSAGE_PASSING = 0x35
|
||||
SC_MQ_OPEN_MAX = 0x36
|
||||
SC_MQ_PRIO_MAX = 0x37
|
||||
SC_PRIORITY_SCHEDULING = 0x38
|
||||
SC_THREAD_DESTRUCTOR_ITERATIONS = 0x39
|
||||
SC_THREAD_KEYS_MAX = 0x3a
|
||||
SC_THREAD_STACK_MIN = 0x3b
|
||||
SC_THREAD_THREADS_MAX = 0x3c
|
||||
SC_THREAD_ATTR_STACKADDR = 0x3d
|
||||
SC_THREAD_ATTR_STACKSIZE = 0x3e
|
||||
SC_THREAD_PRIORITY_SCHEDULING = 0x3f
|
||||
SC_THREAD_PRIO_INHERIT = 0x40
|
||||
SC_THREAD_PRIO_PROTECT = 0x41
|
||||
SC_THREAD_PROCESS_SHARED = 0x42
|
||||
SC_THREAD_SAFE_FUNCTIONS = 0x43
|
||||
SC_TTY_NAME_MAX = 0x44
|
||||
SC_HOST_NAME_MAX = 0x45
|
||||
SC_PASS_MAX = 0x46
|
||||
SC_REGEXP = 0x47
|
||||
SC_SHELL = 0x48
|
||||
SC_SYMLOOP_MAX = 0x49
|
||||
|
||||
SC_V6_ILP32_OFF32 = 0x4a
|
||||
SC_V6_ILP32_OFFBIG = 0x4b
|
||||
SC_V6_LP64_OFF64 = 0x4c
|
||||
SC_V6_LPBIG_OFFBIG = 0x4d
|
||||
SC_2_PBS = 0x50
|
||||
SC_2_PBS_ACCOUNTING = 0x51
|
||||
SC_2_PBS_CHECKPOINT = 0x52
|
||||
SC_2_PBS_LOCATE = 0x53
|
||||
SC_2_PBS_MESSAGE = 0x54
|
||||
SC_2_PBS_TRACK = 0x55
|
||||
|
||||
SC_SPAWN = 0x56
|
||||
SC_SHARED_MEMORY_OBJECTS = 0x57
|
||||
|
||||
SC_TIMER_MAX = 0x58
|
||||
SC_SEM_NSEMS_MAX = 0x59
|
||||
SC_CPUTIME = 0x5a
|
||||
SC_THREAD_CPUTIME = 0x5b
|
||||
SC_DELAYTIMER_MAX = 0x5c
|
||||
SC_SIGQUEUE_MAX = 0x5d
|
||||
SC_REALTIME_SIGNALS = 0x5e
|
||||
|
||||
SC_PHYS_PAGES = 0x79
|
||||
|
||||
SC_NPROCESSORS_CONF = 0x3e9
|
||||
SC_NPROCESSORS_ONLN = 0x3ea
|
||||
|
||||
SC_SCHED_RT_TS = 0x7d1
|
||||
SC_SCHED_PRI_MIN = 0x7d2
|
||||
SC_SCHED_PRI_MAX = 0x7d3
|
||||
)
|
||||
|
||||
const (
|
||||
_MAXHOSTNAMELEN = 0x100
|
||||
_MAXLOGNAME = 0x10
|
||||
_MAXSYMLINKS = 0x20
|
||||
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CPUTIME = 0x30db0
|
||||
_POSIX_DELAYTIMER_MAX = 0x20
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x30db0
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x0
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SIGQUEUE_MAX = 0x20
|
||||
_POSIX_SPAWN = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x30db0
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x30db0
|
||||
_POSIX_THREAD_CPUTIME = 0x30db0
|
||||
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_POSIX_THREAD_KEYS_MAX = 0x80
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x30db0
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x30db0
|
||||
_POSIX_TIMER_MAX = 0x20
|
||||
_POSIX_VERSION = 0x30db0
|
||||
|
||||
_POSIX2_VERSION = 0x30db0
|
||||
|
||||
_FOPEN_MAX = 0x14
|
||||
_NAME_MAX = 0x1ff
|
||||
_RE_DUP_MAX = 0xff
|
||||
|
||||
_BC_BASE_MAX = 0x7fffffff
|
||||
_BC_DIM_MAX = 0xffff
|
||||
_BC_SCALE_MAX = 0x7fffffff
|
||||
_BC_STRING_MAX = 0x7fffffff
|
||||
_COLL_WEIGHTS_MAX = 0x2
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_LINE_MAX = 0x800
|
||||
|
||||
_GETGR_R_SIZE_MAX = 0x400
|
||||
_GETPW_R_SIZE_MAX = 0x400
|
||||
|
||||
_PATH_DEV = "/dev/"
|
||||
_PATH_ZONEINFO = "/usr/share/zoneinfo"
|
||||
|
||||
_PASSWORD_LEN = 0x80
|
||||
)
|
||||
|
||||
const _PC_NAME_MAX = 0x4
|
||||
+263
@@ -0,0 +1,263 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_defs_openbsd.go
|
||||
|
||||
//go:build openbsd
|
||||
// +build openbsd
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
SC_AIO_LISTIO_MAX = 0x2a
|
||||
SC_AIO_MAX = 0x2b
|
||||
SC_AIO_PRIO_DELTA_MAX = 0x2c
|
||||
SC_ARG_MAX = 0x1
|
||||
SC_ATEXIT_MAX = 0x2e
|
||||
SC_BC_BASE_MAX = 0x9
|
||||
SC_BC_DIM_MAX = 0xa
|
||||
SC_BC_SCALE_MAX = 0xb
|
||||
SC_BC_STRING_MAX = 0xc
|
||||
SC_CHILD_MAX = 0x2
|
||||
SC_CLK_TCK = 0x3
|
||||
SC_COLL_WEIGHTS_MAX = 0xd
|
||||
SC_DELAYTIMER_MAX = 0x32
|
||||
SC_EXPR_NEST_MAX = 0xe
|
||||
SC_GETGR_R_SIZE_MAX = 0x64
|
||||
SC_GETPW_R_SIZE_MAX = 0x65
|
||||
SC_HOST_NAME_MAX = 0x21
|
||||
SC_IOV_MAX = 0x33
|
||||
SC_LINE_MAX = 0xf
|
||||
SC_LOGIN_NAME_MAX = 0x66
|
||||
SC_MQ_OPEN_MAX = 0x3a
|
||||
SC_MQ_PRIO_MAX = 0x3b
|
||||
SC_NGROUPS_MAX = 0x4
|
||||
SC_OPEN_MAX = 0x5
|
||||
SC_PAGE_SIZE = 0x1c
|
||||
SC_PAGESIZE = 0x1c
|
||||
SC_THREAD_DESTRUCTOR_ITERATIONS = 0x50
|
||||
SC_THREAD_KEYS_MAX = 0x51
|
||||
SC_THREAD_STACK_MIN = 0x59
|
||||
SC_THREAD_THREADS_MAX = 0x5a
|
||||
SC_RE_DUP_MAX = 0x10
|
||||
SC_SEM_NSEMS_MAX = 0x1f
|
||||
SC_SEM_VALUE_MAX = 0x20
|
||||
SC_SIGQUEUE_MAX = 0x46
|
||||
SC_STREAM_MAX = 0x1a
|
||||
SC_SYMLOOP_MAX = 0x4c
|
||||
SC_TIMER_MAX = 0x5d
|
||||
SC_TTY_NAME_MAX = 0x6b
|
||||
SC_TZNAME_MAX = 0x1b
|
||||
|
||||
SC_ADVISORY_INFO = 0x29
|
||||
SC_ASYNCHRONOUS_IO = 0x2d
|
||||
SC_BARRIERS = 0x2f
|
||||
SC_CLOCK_SELECTION = 0x30
|
||||
SC_CPUTIME = 0x31
|
||||
SC_FSYNC = 0x1d
|
||||
SC_IPV6 = 0x34
|
||||
SC_JOB_CONTROL = 0x6
|
||||
SC_MAPPED_FILES = 0x35
|
||||
SC_MEMLOCK = 0x36
|
||||
SC_MEMLOCK_RANGE = 0x37
|
||||
SC_MEMORY_PROTECTION = 0x38
|
||||
SC_MESSAGE_PASSING = 0x39
|
||||
SC_MONOTONIC_CLOCK = 0x22
|
||||
SC_PRIORITIZED_IO = 0x3c
|
||||
SC_PRIORITY_SCHEDULING = 0x3d
|
||||
SC_RAW_SOCKETS = 0x3e
|
||||
SC_READER_WRITER_LOCKS = 0x3f
|
||||
SC_REALTIME_SIGNALS = 0x40
|
||||
SC_REGEXP = 0x41
|
||||
SC_SAVED_IDS = 0x7
|
||||
SC_SEMAPHORES = 0x43
|
||||
SC_SHARED_MEMORY_OBJECTS = 0x44
|
||||
SC_SHELL = 0x45
|
||||
SC_SPAWN = 0x47
|
||||
SC_SPIN_LOCKS = 0x48
|
||||
SC_SPORADIC_SERVER = 0x49
|
||||
SC_SS_REPL_MAX = 0x4a
|
||||
SC_SYNCHRONIZED_IO = 0x4b
|
||||
SC_THREAD_ATTR_STACKADDR = 0x4d
|
||||
SC_THREAD_ATTR_STACKSIZE = 0x4e
|
||||
SC_THREAD_CPUTIME = 0x4f
|
||||
SC_THREAD_PRIO_INHERIT = 0x52
|
||||
SC_THREAD_PRIO_PROTECT = 0x53
|
||||
SC_THREAD_PRIORITY_SCHEDULING = 0x54
|
||||
SC_THREAD_PROCESS_SHARED = 0x55
|
||||
SC_THREAD_ROBUST_PRIO_INHERIT = 0x56
|
||||
SC_THREAD_ROBUST_PRIO_PROTECT = 0x57
|
||||
SC_THREAD_SAFE_FUNCTIONS = 0x67
|
||||
SC_THREAD_SPORADIC_SERVER = 0x58
|
||||
SC_THREADS = 0x5b
|
||||
SC_TIMEOUTS = 0x5c
|
||||
SC_TIMERS = 0x5e
|
||||
SC_TRACE = 0x5f
|
||||
SC_TRACE_EVENT_FILTER = 0x60
|
||||
SC_TRACE_EVENT_NAME_MAX = 0x61
|
||||
SC_TRACE_INHERIT = 0x62
|
||||
SC_TRACE_LOG = 0x63
|
||||
SC_TRACE_NAME_MAX = 0x68
|
||||
SC_TRACE_SYS_MAX = 0x69
|
||||
SC_TRACE_USER_EVENT_MAX = 0x6a
|
||||
SC_TYPED_MEMORY_OBJECTS = 0x6c
|
||||
SC_VERSION = 0x8
|
||||
|
||||
SC_V7_ILP32_OFF32 = 0x71
|
||||
SC_V7_ILP32_OFFBIG = 0x72
|
||||
SC_V7_LP64_OFF64 = 0x73
|
||||
SC_V7_LPBIG_OFFBIG = 0x74
|
||||
|
||||
SC_V6_ILP32_OFF32 = 0x6d
|
||||
SC_V6_ILP32_OFFBIG = 0x6e
|
||||
SC_V6_LP64_OFF64 = 0x6f
|
||||
SC_V6_LPBIG_OFFBIG = 0x70
|
||||
|
||||
SC_2_C_BIND = 0x12
|
||||
SC_2_C_DEV = 0x13
|
||||
SC_2_CHAR_TERM = 0x14
|
||||
SC_2_FORT_DEV = 0x15
|
||||
SC_2_FORT_RUN = 0x16
|
||||
SC_2_LOCALEDEF = 0x17
|
||||
SC_2_PBS = 0x23
|
||||
SC_2_PBS_ACCOUNTING = 0x24
|
||||
SC_2_PBS_CHECKPOINT = 0x25
|
||||
SC_2_PBS_LOCATE = 0x26
|
||||
SC_2_PBS_MESSAGE = 0x27
|
||||
SC_2_PBS_TRACK = 0x28
|
||||
SC_2_SW_DEV = 0x18
|
||||
SC_2_UPE = 0x19
|
||||
SC_2_VERSION = 0x11
|
||||
|
||||
SC_XOPEN_CRYPT = 0x75
|
||||
SC_XOPEN_ENH_I18N = 0x76
|
||||
SC_XOPEN_REALTIME = 0x78
|
||||
SC_XOPEN_REALTIME_THREADS = 0x79
|
||||
SC_XOPEN_SHM = 0x1e
|
||||
SC_XOPEN_STREAMS = 0x7a
|
||||
SC_XOPEN_UNIX = 0x7b
|
||||
SC_XOPEN_UUCP = 0x7c
|
||||
SC_XOPEN_VERSION = 0x7d
|
||||
|
||||
SC_AVPHYS_PAGES = 0x1f5
|
||||
SC_PHYS_PAGES = 0x1f4
|
||||
SC_NPROCESSORS_CONF = 0x1f6
|
||||
SC_NPROCESSORS_ONLN = 0x1f7
|
||||
)
|
||||
|
||||
const (
|
||||
_HOST_NAME_MAX = 0xff
|
||||
_IOV_MAX = 0x400
|
||||
_LOGIN_NAME_MAX = 0x20
|
||||
_PTHREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_PTHREAD_KEYS_MAX = 0x100
|
||||
_PTHREAD_STACK_MIN = 0x1000
|
||||
_PTHREAD_THREADS_MAX = 0xffffffffffffffff
|
||||
_SEM_VALUE_MAX = 0xffffffff
|
||||
_SYMLOOP_MAX = 0x20
|
||||
_TTY_NAME_MAX = 0x104
|
||||
|
||||
_GR_BUF_LEN = 0xa40
|
||||
_PW_BUF_LEN = 0x400
|
||||
|
||||
_CLK_TCK = 0x64
|
||||
|
||||
_POSIX_ADVISORY_INFO = -0x1
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = -0x1
|
||||
_POSIX_BARRIERS = 0x30db0
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = -0x1
|
||||
_POSIX_CPUTIME = 0x31069
|
||||
_POSIX_FSYNC = 0x30db0
|
||||
_POSIX_IPV6 = 0x0
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x30db0
|
||||
_POSIX_MEMLOCK = 0x30db0
|
||||
_POSIX_MEMLOCK_RANGE = 0x30db0
|
||||
_POSIX_MEMORY_PROTECTION = 0x30db0
|
||||
_POSIX_MESSAGE_PASSING = -0x1
|
||||
_POSIX_MONOTONIC_CLOCK = 0x30db0
|
||||
_POSIX_PRIORITIZED_IO = -0x1
|
||||
_POSIX_PRIORITY_SCHEDULING = -0x1
|
||||
_POSIX_RAW_SOCKETS = 0x30db0
|
||||
_POSIX_READER_WRITER_LOCKS = 0x30db0
|
||||
_POSIX_REALTIME_SIGNALS = -0x1
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SAVED_IDS = 0x1
|
||||
_POSIX_SEMAPHORES = 0x30db0
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SPAWN = 0x30db0
|
||||
_POSIX_SPIN_LOCKS = 0x30db0
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = -0x1
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x30db0
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x30db0
|
||||
_POSIX_THREAD_CPUTIME = 0x31069
|
||||
_POSIX_THREAD_KEYS_MAX = 0x80
|
||||
_POSIX_THREAD_PRIO_INHERIT = -0x1
|
||||
_POSIX_THREAD_PRIO_PROTECT = -0x1
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = -0x1
|
||||
_POSIX_THREAD_PROCESS_SHARED = -0x1
|
||||
_POSIX_THREAD_ROBUST_PRIO_INHERIT = -0x1
|
||||
_POSIX_THREAD_ROBUST_PRIO_PROTECT = -0x1
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x30db0
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x30db0
|
||||
_POSIX_TIMERS = -0x1
|
||||
_POSIX_TIMEOUTS = 0x30db0
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x31069
|
||||
|
||||
_POSIX_V7_ILP32_OFF32 = -0x1
|
||||
_POSIX_V7_ILP32_OFFBIG = 0x0
|
||||
_POSIX_V7_LP64_OFF64 = 0x0
|
||||
_POSIX_V7_LPBIG_OFFBIG = 0x0
|
||||
|
||||
_POSIX_V6_ILP32_OFF32 = -0x1
|
||||
_POSIX_V6_ILP32_OFFBIG = 0x0
|
||||
_POSIX_V6_LP64_OFF64 = 0x0
|
||||
_POSIX_V6_LPBIG_OFFBIG = 0x0
|
||||
|
||||
_POSIX2_C_BIND = 0x30db0
|
||||
_POSIX2_C_DEV = -0x1
|
||||
_POSIX2_CHAR_TERM = 0x1
|
||||
_POSIX2_LOCALEDEF = -0x1
|
||||
_POSIX2_PBS = -0x1
|
||||
_POSIX2_SW_DEV = 0x30db0
|
||||
_POSIX2_UPE = 0x30db0
|
||||
_POSIX2_VERSION = 0x31069
|
||||
|
||||
_XOPEN_CRYPT = 0x1
|
||||
_XOPEN_ENH_I18N = -0x1
|
||||
_XOPEN_REALTIME = -0x1
|
||||
_XOPEN_REALTIME_THREADS = -0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_STREAMS = -0x1
|
||||
_XOPEN_UNIX = -0x1
|
||||
_XOPEN_UUCP = -0x1
|
||||
|
||||
_FOPEN_MAX = 0x14
|
||||
_NAME_MAX = 0xff
|
||||
_RE_DUP_MAX = 0xff
|
||||
|
||||
_BC_BASE_MAX = 0x7fffffff
|
||||
_BC_DIM_MAX = 0xffff
|
||||
_BC_SCALE_MAX = 0x7fffffff
|
||||
_BC_STRING_MAX = 0x7fffffff
|
||||
_COLL_WEIGHTS_MAX = 0x2
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_LINE_MAX = 0x800
|
||||
|
||||
_SHRT_MAX = 0x7fff
|
||||
|
||||
_PATH_ZONEINFO = "/usr/share/zoneinfo"
|
||||
)
|
||||
|
||||
const (
|
||||
_CHAR_BIT = 0x8
|
||||
|
||||
_INT_MAX = 0x7fffffff
|
||||
|
||||
sizeofOffT = 0x8
|
||||
)
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_defs_solaris.go
|
||||
|
||||
//go:build solaris
|
||||
// +build solaris
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
SC_AIO_LISTIO_MAX = 0x12
|
||||
SC_AIO_MAX = 0x13
|
||||
SC_AIO_PRIO_DELTA_MAX = 0x14
|
||||
SC_ARG_MAX = 0x1
|
||||
SC_ATEXIT_MAX = 0x4c
|
||||
SC_BC_BASE_MAX = 0x36
|
||||
SC_BC_DIM_MAX = 0x37
|
||||
SC_BC_SCALE_MAX = 0x38
|
||||
SC_BC_STRING_MAX = 0x39
|
||||
SC_CHILD_MAX = 0x2
|
||||
SC_CLK_TCK = 0x3
|
||||
SC_COLL_WEIGHTS_MAX = 0x3a
|
||||
SC_DELAYTIMER_MAX = 0x16
|
||||
SC_EXPR_NEST_MAX = 0x3b
|
||||
SC_GETGR_R_SIZE_MAX = 0x239
|
||||
SC_GETPW_R_SIZE_MAX = 0x23a
|
||||
SC_HOST_NAME_MAX = 0x2df
|
||||
SC_IOV_MAX = 0x4d
|
||||
SC_LINE_MAX = 0x3c
|
||||
SC_LOGIN_NAME_MAX = 0x23b
|
||||
SC_MQ_OPEN_MAX = 0x1d
|
||||
SC_MQ_PRIO_MAX = 0x1e
|
||||
SC_NGROUPS_MAX = 0x4
|
||||
SC_OPEN_MAX = 0x5
|
||||
SC_PAGE_SIZE = 0xb
|
||||
SC_PAGESIZE = 0xb
|
||||
SC_THREAD_DESTRUCTOR_ITERATIONS = 0x238
|
||||
SC_THREAD_KEYS_MAX = 0x23c
|
||||
SC_THREAD_STACK_MIN = 0x23d
|
||||
SC_THREAD_THREADS_MAX = 0x23e
|
||||
SC_RE_DUP_MAX = 0x3d
|
||||
SC_RTSIG_MAX = 0x22
|
||||
SC_SEM_NSEMS_MAX = 0x24
|
||||
SC_SEM_VALUE_MAX = 0x25
|
||||
SC_SIGQUEUE_MAX = 0x27
|
||||
SC_STREAM_MAX = 0x10
|
||||
SC_SYMLOOP_MAX = 0x2e8
|
||||
SC_TIMER_MAX = 0x2c
|
||||
SC_TTY_NAME_MAX = 0x23f
|
||||
SC_TZNAME_MAX = 0x11
|
||||
|
||||
SC_ADVISORY_INFO = 0x2db
|
||||
SC_ASYNCHRONOUS_IO = 0x15
|
||||
SC_BARRIERS = 0x2dc
|
||||
SC_CLOCK_SELECTION = 0x2dd
|
||||
SC_CPUTIME = 0x2de
|
||||
SC_FSYNC = 0x17
|
||||
SC_IPV6 = 0x2fa
|
||||
SC_JOB_CONTROL = 0x6
|
||||
SC_MAPPED_FILES = 0x18
|
||||
SC_MEMLOCK = 0x19
|
||||
SC_MEMLOCK_RANGE = 0x1a
|
||||
SC_MEMORY_PROTECTION = 0x1b
|
||||
SC_MESSAGE_PASSING = 0x1c
|
||||
SC_MONOTONIC_CLOCK = 0x2e0
|
||||
SC_PRIORITIZED_IO = 0x1f
|
||||
SC_PRIORITY_SCHEDULING = 0x20
|
||||
SC_RAW_SOCKETS = 0x2fb
|
||||
SC_READER_WRITER_LOCKS = 0x2e1
|
||||
SC_REALTIME_SIGNALS = 0x21
|
||||
SC_REGEXP = 0x2e2
|
||||
SC_SAVED_IDS = 0x7
|
||||
SC_SEMAPHORES = 0x23
|
||||
SC_SHARED_MEMORY_OBJECTS = 0x26
|
||||
SC_SHELL = 0x2e3
|
||||
SC_SPAWN = 0x2e4
|
||||
SC_SPIN_LOCKS = 0x2e5
|
||||
SC_SPORADIC_SERVER = 0x2e6
|
||||
SC_SS_REPL_MAX = 0x2e7
|
||||
SC_SYNCHRONIZED_IO = 0x2a
|
||||
SC_THREAD_ATTR_STACKADDR = 0x241
|
||||
SC_THREAD_ATTR_STACKSIZE = 0x242
|
||||
SC_THREAD_CPUTIME = 0x2e9
|
||||
SC_THREAD_PRIO_INHERIT = 0x244
|
||||
SC_THREAD_PRIO_PROTECT = 0x245
|
||||
SC_THREAD_PRIORITY_SCHEDULING = 0x243
|
||||
SC_THREAD_PROCESS_SHARED = 0x246
|
||||
SC_THREAD_SAFE_FUNCTIONS = 0x247
|
||||
SC_THREAD_SPORADIC_SERVER = 0x2ea
|
||||
SC_THREADS = 0x240
|
||||
SC_TIMEOUTS = 0x2eb
|
||||
SC_TIMERS = 0x2b
|
||||
SC_TRACE = 0x2ec
|
||||
SC_TRACE_EVENT_FILTER = 0x2ed
|
||||
SC_TRACE_EVENT_NAME_MAX = 0x2ee
|
||||
SC_TRACE_INHERIT = 0x2ef
|
||||
SC_TRACE_LOG = 0x2f0
|
||||
SC_TRACE_NAME_MAX = 0x2f1
|
||||
SC_TRACE_SYS_MAX = 0x2f2
|
||||
SC_TRACE_USER_EVENT_MAX = 0x2f3
|
||||
SC_TYPED_MEMORY_OBJECTS = 0x2f4
|
||||
SC_VERSION = 0x8
|
||||
|
||||
SC_V6_ILP32_OFF32 = 0x2f5
|
||||
SC_V6_ILP32_OFFBIG = 0x2f6
|
||||
SC_V6_LP64_OFF64 = 0x2f7
|
||||
SC_V6_LPBIG_OFFBIG = 0x2f8
|
||||
|
||||
SC_2_C_BIND = 0x2d
|
||||
SC_2_C_DEV = 0x2e
|
||||
SC_2_C_VERSION = 0x2f
|
||||
SC_2_CHAR_TERM = 0x42
|
||||
SC_2_FORT_DEV = 0x30
|
||||
SC_2_FORT_RUN = 0x31
|
||||
SC_2_LOCALEDEF = 0x32
|
||||
SC_2_PBS = 0x2d4
|
||||
SC_2_PBS_ACCOUNTING = 0x2d5
|
||||
SC_2_PBS_CHECKPOINT = 0x2d6
|
||||
SC_2_PBS_LOCATE = 0x2d8
|
||||
SC_2_PBS_MESSAGE = 0x2d9
|
||||
SC_2_PBS_TRACK = 0x2da
|
||||
SC_2_SW_DEV = 0x33
|
||||
SC_2_UPE = 0x34
|
||||
SC_2_VERSION = 0x35
|
||||
|
||||
SC_XOPEN_CRYPT = 0x3e
|
||||
SC_XOPEN_ENH_I18N = 0x3f
|
||||
SC_XOPEN_REALTIME = 0x2ce
|
||||
SC_XOPEN_REALTIME_THREADS = 0x2cf
|
||||
SC_XOPEN_SHM = 0x40
|
||||
SC_XOPEN_STREAMS = 0x2f9
|
||||
SC_XOPEN_UNIX = 0x4e
|
||||
SC_XOPEN_VERSION = 0xc
|
||||
SC_XOPEN_XCU_VERSION = 0x43
|
||||
|
||||
SC_PHYS_PAGES = 0x1f4
|
||||
SC_AVPHYS_PAGES = 0x1f5
|
||||
SC_NPROCESSORS_CONF = 0xe
|
||||
SC_NPROCESSORS_ONLN = 0xf
|
||||
)
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_freebsd.go
|
||||
|
||||
//go:build freebsd && 386
|
||||
// +build freebsd,386
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_LONG_MAX = 0x7fffffff
|
||||
_SHRT_MAX = 0x7fff
|
||||
)
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_freebsd.go
|
||||
|
||||
//go:build freebsd && amd64
|
||||
// +build freebsd,amd64
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_LONG_MAX = 0x7fffffffffffffff
|
||||
_SHRT_MAX = 0x7fff
|
||||
)
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_freebsd.go
|
||||
|
||||
//go:build freebsd && arm
|
||||
// +build freebsd,arm
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_LONG_MAX = 0x7fffffff
|
||||
_SHRT_MAX = 0x7fff
|
||||
)
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_freebsd.go
|
||||
|
||||
//go:build freebsd && arm64
|
||||
// +build freebsd,arm64
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_LONG_MAX = 0x7fffffffffffffff
|
||||
_SHRT_MAX = 0x7fff
|
||||
)
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_freebsd.go
|
||||
|
||||
//go:build freebsd && riscv64
|
||||
// +build freebsd,riscv64
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_LONG_MAX = 0x7fffffffffffffff
|
||||
_SHRT_MAX = 0x7fff
|
||||
)
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_linux.go
|
||||
|
||||
//go:build linux && 386
|
||||
// +build linux,386
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_AIO_PRIO_DELTA_MAX = 0x14
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0xff
|
||||
_DELAYTIMER_MAX = 0x7fffffff
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_HOST_NAME_MAX = 0x40
|
||||
_LINE_MAX = 0x800
|
||||
_LOGIN_NAME_MAX = 0x100
|
||||
_MQ_PRIO_MAX = 0x8000
|
||||
_NGROUPS_MAX = 0x10000
|
||||
_NSS_BUFLEN_GROUP = 0x400
|
||||
_NSS_BUFLEN_PASSWD = 0x400
|
||||
_OPEN_MAX = 0x100
|
||||
_PTHREAD_KEYS_MAX = 0x400
|
||||
_PTHREAD_STACK_MIN = 0x4000
|
||||
_RE_DUP_MAX = 0x7fff
|
||||
_RTSIG_MAX = 0x20
|
||||
_SEM_VALUE_MAX = 0x7fffffff
|
||||
_STREAM_MAX = 0x10
|
||||
_SYMLOOP_MAX = -0x1
|
||||
_TTY_NAME_MAX = 0x20
|
||||
|
||||
_UIO_MAXIOV = 0x400
|
||||
|
||||
_INT_MAX = 0x7fffffff
|
||||
|
||||
_POSIX_ADVISORY_INFO = 0x31069
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = 0x31069
|
||||
_POSIX_BARRIERS = 0x31069
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = 0x31069
|
||||
_POSIX_CPUTIME = 0x0
|
||||
_POSIX_FSYNC = 0x31069
|
||||
_POSIX_IPV6 = 0x31069
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x31069
|
||||
_POSIX_MEMLOCK = 0x31069
|
||||
_POSIX_MEMLOCK_RANGE = 0x31069
|
||||
_POSIX_MEMORY_PROTECTION = 0x31069
|
||||
_POSIX_MESSAGE_PASSING = 0x31069
|
||||
_POSIX_MONOTONIC_CLOCK = 0x0
|
||||
_POSIX_PRIORITIZED_IO = 0x31069
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_RAW_SOCKETS = 0x31069
|
||||
_POSIX_READER_WRITER_LOCKS = 0x31069
|
||||
_POSIX_REALTIME_SIGNALS = 0x31069
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SAVED_IDS = 0x1
|
||||
_POSIX_SEMAPHORES = 0x31069
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SIGQUEUE_MAX = 0x20
|
||||
_POSIX_SPAWN = 0x31069
|
||||
_POSIX_SPIN_LOCKS = 0x31069
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
|
||||
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_POSIX_THREAD_PRIO_INHERIT = 0x31069
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x31069
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_THREAD_PROCESS_SHARED = 0x31069
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x31069
|
||||
_POSIX_TIMEOUTS = 0x31069
|
||||
_POSIX_TIMERS = 0x31069
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TRACE_EVENT_FILTER = -0x1
|
||||
_POSIX_TRACE_INHERIT = -0x1
|
||||
_POSIX_TRACE_LOG = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x31069
|
||||
|
||||
_POSIX_V7_ILP32_OFF32 = 0x1
|
||||
_POSIX_V7_ILP32_OFFBIG = 0x1
|
||||
_POSIX_V7_LP64_OFF64 = -0x1
|
||||
_POSIX_V7_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX_V6_ILP32_OFF32 = 0x1
|
||||
_POSIX_V6_ILP32_OFFBIG = 0x1
|
||||
_POSIX_V6_LP64_OFF64 = -0x1
|
||||
_POSIX_V6_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x31069
|
||||
_POSIX2_C_DEV = 0x31069
|
||||
_POSIX2_C_VERSION = 0x31069
|
||||
_POSIX2_CHAR_TERM = 0x31069
|
||||
_POSIX2_LOCALEDEF = 0x31069
|
||||
_POSIX2_SW_DEV = 0x31069
|
||||
_POSIX2_VERSION = 0x31069
|
||||
|
||||
_XOPEN_ENH_I18N = 0x1
|
||||
_XOPEN_REALTIME = 0x1
|
||||
_XOPEN_REALTIME_THREADS = 0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = 0x1
|
||||
_XOPEN_VERSION = 0x2bc
|
||||
_XOPEN_XCU_VERSION = 0x4
|
||||
)
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_linux.go
|
||||
|
||||
//go:build linux && amd64
|
||||
// +build linux,amd64
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_AIO_PRIO_DELTA_MAX = 0x14
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0xff
|
||||
_DELAYTIMER_MAX = 0x7fffffff
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_HOST_NAME_MAX = 0x40
|
||||
_LINE_MAX = 0x800
|
||||
_LOGIN_NAME_MAX = 0x100
|
||||
_MQ_PRIO_MAX = 0x8000
|
||||
_NGROUPS_MAX = 0x10000
|
||||
_NSS_BUFLEN_GROUP = 0x400
|
||||
_NSS_BUFLEN_PASSWD = 0x400
|
||||
_OPEN_MAX = 0x100
|
||||
_PTHREAD_KEYS_MAX = 0x400
|
||||
_PTHREAD_STACK_MIN = 0x4000
|
||||
_RE_DUP_MAX = 0x7fff
|
||||
_RTSIG_MAX = 0x20
|
||||
_SEM_VALUE_MAX = 0x7fffffff
|
||||
_STREAM_MAX = 0x10
|
||||
_SYMLOOP_MAX = -0x1
|
||||
_TTY_NAME_MAX = 0x20
|
||||
|
||||
_UIO_MAXIOV = 0x400
|
||||
|
||||
_INT_MAX = 0x7fffffff
|
||||
|
||||
_POSIX_ADVISORY_INFO = 0x31069
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = 0x31069
|
||||
_POSIX_BARRIERS = 0x31069
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = 0x31069
|
||||
_POSIX_CPUTIME = 0x0
|
||||
_POSIX_FSYNC = 0x31069
|
||||
_POSIX_IPV6 = 0x31069
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x31069
|
||||
_POSIX_MEMLOCK = 0x31069
|
||||
_POSIX_MEMLOCK_RANGE = 0x31069
|
||||
_POSIX_MEMORY_PROTECTION = 0x31069
|
||||
_POSIX_MESSAGE_PASSING = 0x31069
|
||||
_POSIX_MONOTONIC_CLOCK = 0x0
|
||||
_POSIX_PRIORITIZED_IO = 0x31069
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_RAW_SOCKETS = 0x31069
|
||||
_POSIX_READER_WRITER_LOCKS = 0x31069
|
||||
_POSIX_REALTIME_SIGNALS = 0x31069
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SAVED_IDS = 0x1
|
||||
_POSIX_SEMAPHORES = 0x31069
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SIGQUEUE_MAX = 0x20
|
||||
_POSIX_SPAWN = 0x31069
|
||||
_POSIX_SPIN_LOCKS = 0x31069
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
|
||||
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_POSIX_THREAD_PRIO_INHERIT = 0x31069
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x31069
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_THREAD_PROCESS_SHARED = 0x31069
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x31069
|
||||
_POSIX_TIMEOUTS = 0x31069
|
||||
_POSIX_TIMERS = 0x31069
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TRACE_EVENT_FILTER = -0x1
|
||||
_POSIX_TRACE_INHERIT = -0x1
|
||||
_POSIX_TRACE_LOG = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x31069
|
||||
|
||||
_POSIX_V7_ILP32_OFF32 = -0x1
|
||||
_POSIX_V7_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V7_LP64_OFF64 = 0x1
|
||||
_POSIX_V7_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX_V6_ILP32_OFF32 = -0x1
|
||||
_POSIX_V6_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V6_LP64_OFF64 = 0x1
|
||||
_POSIX_V6_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x31069
|
||||
_POSIX2_C_DEV = 0x31069
|
||||
_POSIX2_C_VERSION = 0x31069
|
||||
_POSIX2_CHAR_TERM = 0x31069
|
||||
_POSIX2_LOCALEDEF = 0x31069
|
||||
_POSIX2_SW_DEV = 0x31069
|
||||
_POSIX2_VERSION = 0x31069
|
||||
|
||||
_XOPEN_ENH_I18N = 0x1
|
||||
_XOPEN_REALTIME = 0x1
|
||||
_XOPEN_REALTIME_THREADS = 0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = 0x1
|
||||
_XOPEN_VERSION = 0x2bc
|
||||
_XOPEN_XCU_VERSION = 0x4
|
||||
)
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_linux.go
|
||||
|
||||
//go:build linux && arm
|
||||
// +build linux,arm
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_AIO_PRIO_DELTA_MAX = 0x14
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0xff
|
||||
_DELAYTIMER_MAX = 0x7fffffff
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_HOST_NAME_MAX = 0x40
|
||||
_LINE_MAX = 0x800
|
||||
_LOGIN_NAME_MAX = 0x100
|
||||
_MQ_PRIO_MAX = 0x8000
|
||||
_NGROUPS_MAX = 0x10000
|
||||
_NSS_BUFLEN_GROUP = 0x400
|
||||
_NSS_BUFLEN_PASSWD = 0x400
|
||||
_OPEN_MAX = 0x100
|
||||
_PTHREAD_KEYS_MAX = 0x400
|
||||
_PTHREAD_STACK_MIN = 0x4000
|
||||
_RE_DUP_MAX = 0x7fff
|
||||
_RTSIG_MAX = 0x20
|
||||
_SEM_VALUE_MAX = 0x7fffffff
|
||||
_STREAM_MAX = 0x10
|
||||
_SYMLOOP_MAX = -0x1
|
||||
_TTY_NAME_MAX = 0x20
|
||||
|
||||
_UIO_MAXIOV = 0x400
|
||||
|
||||
_INT_MAX = 0x7fffffff
|
||||
|
||||
_POSIX_ADVISORY_INFO = 0x31069
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = 0x31069
|
||||
_POSIX_BARRIERS = 0x31069
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = 0x31069
|
||||
_POSIX_CPUTIME = 0x0
|
||||
_POSIX_FSYNC = 0x31069
|
||||
_POSIX_IPV6 = 0x31069
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x31069
|
||||
_POSIX_MEMLOCK = 0x31069
|
||||
_POSIX_MEMLOCK_RANGE = 0x31069
|
||||
_POSIX_MEMORY_PROTECTION = 0x31069
|
||||
_POSIX_MESSAGE_PASSING = 0x31069
|
||||
_POSIX_MONOTONIC_CLOCK = 0x0
|
||||
_POSIX_PRIORITIZED_IO = 0x31069
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_RAW_SOCKETS = 0x31069
|
||||
_POSIX_READER_WRITER_LOCKS = 0x31069
|
||||
_POSIX_REALTIME_SIGNALS = 0x31069
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SAVED_IDS = 0x1
|
||||
_POSIX_SEMAPHORES = 0x31069
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SIGQUEUE_MAX = 0x20
|
||||
_POSIX_SPAWN = 0x31069
|
||||
_POSIX_SPIN_LOCKS = 0x31069
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
|
||||
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_POSIX_THREAD_PRIO_INHERIT = 0x31069
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x31069
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_THREAD_PROCESS_SHARED = 0x31069
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x31069
|
||||
_POSIX_TIMEOUTS = 0x31069
|
||||
_POSIX_TIMERS = 0x31069
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TRACE_EVENT_FILTER = -0x1
|
||||
_POSIX_TRACE_INHERIT = -0x1
|
||||
_POSIX_TRACE_LOG = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x31069
|
||||
|
||||
_POSIX_V7_ILP32_OFF32 = 0x1
|
||||
_POSIX_V7_ILP32_OFFBIG = 0x1
|
||||
_POSIX_V7_LP64_OFF64 = -0x1
|
||||
_POSIX_V7_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX_V6_ILP32_OFF32 = 0x1
|
||||
_POSIX_V6_ILP32_OFFBIG = 0x1
|
||||
_POSIX_V6_LP64_OFF64 = -0x1
|
||||
_POSIX_V6_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x31069
|
||||
_POSIX2_C_DEV = 0x31069
|
||||
_POSIX2_C_VERSION = 0x31069
|
||||
_POSIX2_CHAR_TERM = 0x31069
|
||||
_POSIX2_LOCALEDEF = 0x31069
|
||||
_POSIX2_SW_DEV = 0x31069
|
||||
_POSIX2_VERSION = 0x31069
|
||||
|
||||
_XOPEN_ENH_I18N = 0x1
|
||||
_XOPEN_REALTIME = 0x1
|
||||
_XOPEN_REALTIME_THREADS = 0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = 0x1
|
||||
_XOPEN_VERSION = 0x2bc
|
||||
_XOPEN_XCU_VERSION = 0x4
|
||||
)
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_linux.go
|
||||
|
||||
//go:build linux && arm64
|
||||
// +build linux,arm64
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_AIO_PRIO_DELTA_MAX = 0x14
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0xff
|
||||
_DELAYTIMER_MAX = 0x7fffffff
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_HOST_NAME_MAX = 0x40
|
||||
_LINE_MAX = 0x800
|
||||
_LOGIN_NAME_MAX = 0x100
|
||||
_MQ_PRIO_MAX = 0x8000
|
||||
_NGROUPS_MAX = 0x10000
|
||||
_NSS_BUFLEN_GROUP = 0x400
|
||||
_NSS_BUFLEN_PASSWD = 0x400
|
||||
_OPEN_MAX = 0x100
|
||||
_PTHREAD_KEYS_MAX = 0x400
|
||||
_PTHREAD_STACK_MIN = 0x20000
|
||||
_RE_DUP_MAX = 0x7fff
|
||||
_RTSIG_MAX = 0x20
|
||||
_SEM_VALUE_MAX = 0x7fffffff
|
||||
_STREAM_MAX = 0x10
|
||||
_SYMLOOP_MAX = -0x1
|
||||
_TTY_NAME_MAX = 0x20
|
||||
|
||||
_UIO_MAXIOV = 0x400
|
||||
|
||||
_INT_MAX = 0x7fffffff
|
||||
|
||||
_POSIX_ADVISORY_INFO = 0x31069
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = 0x31069
|
||||
_POSIX_BARRIERS = 0x31069
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = 0x31069
|
||||
_POSIX_CPUTIME = 0x0
|
||||
_POSIX_FSYNC = 0x31069
|
||||
_POSIX_IPV6 = 0x31069
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x31069
|
||||
_POSIX_MEMLOCK = 0x31069
|
||||
_POSIX_MEMLOCK_RANGE = 0x31069
|
||||
_POSIX_MEMORY_PROTECTION = 0x31069
|
||||
_POSIX_MESSAGE_PASSING = 0x31069
|
||||
_POSIX_MONOTONIC_CLOCK = 0x0
|
||||
_POSIX_PRIORITIZED_IO = 0x31069
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_RAW_SOCKETS = 0x31069
|
||||
_POSIX_READER_WRITER_LOCKS = 0x31069
|
||||
_POSIX_REALTIME_SIGNALS = 0x31069
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SAVED_IDS = 0x1
|
||||
_POSIX_SEMAPHORES = 0x31069
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SIGQUEUE_MAX = 0x20
|
||||
_POSIX_SPAWN = 0x31069
|
||||
_POSIX_SPIN_LOCKS = 0x31069
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
|
||||
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_POSIX_THREAD_PRIO_INHERIT = 0x31069
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x31069
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_THREAD_PROCESS_SHARED = 0x31069
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x31069
|
||||
_POSIX_TIMEOUTS = 0x31069
|
||||
_POSIX_TIMERS = 0x31069
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TRACE_EVENT_FILTER = -0x1
|
||||
_POSIX_TRACE_INHERIT = -0x1
|
||||
_POSIX_TRACE_LOG = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x31069
|
||||
|
||||
_POSIX_V7_ILP32_OFF32 = -0x1
|
||||
_POSIX_V7_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V7_LP64_OFF64 = 0x1
|
||||
_POSIX_V7_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX_V6_ILP32_OFF32 = -0x1
|
||||
_POSIX_V6_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V6_LP64_OFF64 = 0x1
|
||||
_POSIX_V6_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x31069
|
||||
_POSIX2_C_DEV = 0x31069
|
||||
_POSIX2_C_VERSION = 0x31069
|
||||
_POSIX2_CHAR_TERM = 0x31069
|
||||
_POSIX2_LOCALEDEF = 0x31069
|
||||
_POSIX2_SW_DEV = 0x31069
|
||||
_POSIX2_VERSION = 0x31069
|
||||
|
||||
_XOPEN_ENH_I18N = 0x1
|
||||
_XOPEN_REALTIME = 0x1
|
||||
_XOPEN_REALTIME_THREADS = 0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = 0x1
|
||||
_XOPEN_VERSION = 0x2bc
|
||||
_XOPEN_XCU_VERSION = 0x4
|
||||
)
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_linux.go
|
||||
|
||||
//go:build linux && loong64
|
||||
// +build linux,loong64
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_AIO_PRIO_DELTA_MAX = 0x14
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0xff
|
||||
_DELAYTIMER_MAX = 0x7fffffff
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_HOST_NAME_MAX = 0x40
|
||||
_LINE_MAX = 0x800
|
||||
_LOGIN_NAME_MAX = 0x100
|
||||
_MQ_PRIO_MAX = 0x8000
|
||||
_NGROUPS_MAX = 0x10000
|
||||
_NSS_BUFLEN_GROUP = 0x400
|
||||
_NSS_BUFLEN_PASSWD = 0x400
|
||||
_OPEN_MAX = 0x100
|
||||
_PTHREAD_KEYS_MAX = 0x400
|
||||
_PTHREAD_STACK_MIN = 0x20000
|
||||
_RE_DUP_MAX = 0x7fff
|
||||
_RTSIG_MAX = 0x20
|
||||
_SEM_VALUE_MAX = 0x7fffffff
|
||||
_STREAM_MAX = 0x10
|
||||
_SYMLOOP_MAX = -0x1
|
||||
_TTY_NAME_MAX = 0x20
|
||||
|
||||
_UIO_MAXIOV = 0x400
|
||||
|
||||
_INT_MAX = 0x7fffffff
|
||||
|
||||
_POSIX_ADVISORY_INFO = 0x31069
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = 0x31069
|
||||
_POSIX_BARRIERS = 0x31069
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = 0x31069
|
||||
_POSIX_CPUTIME = 0x0
|
||||
_POSIX_FSYNC = 0x31069
|
||||
_POSIX_IPV6 = 0x31069
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x31069
|
||||
_POSIX_MEMLOCK = 0x31069
|
||||
_POSIX_MEMLOCK_RANGE = 0x31069
|
||||
_POSIX_MEMORY_PROTECTION = 0x31069
|
||||
_POSIX_MESSAGE_PASSING = 0x31069
|
||||
_POSIX_MONOTONIC_CLOCK = 0x0
|
||||
_POSIX_PRIORITIZED_IO = 0x31069
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_RAW_SOCKETS = 0x31069
|
||||
_POSIX_READER_WRITER_LOCKS = 0x31069
|
||||
_POSIX_REALTIME_SIGNALS = 0x31069
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SAVED_IDS = 0x1
|
||||
_POSIX_SEMAPHORES = 0x31069
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SIGQUEUE_MAX = 0x20
|
||||
_POSIX_SPAWN = 0x31069
|
||||
_POSIX_SPIN_LOCKS = 0x31069
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
|
||||
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_POSIX_THREAD_PRIO_INHERIT = 0x31069
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x31069
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_THREAD_PROCESS_SHARED = 0x31069
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x31069
|
||||
_POSIX_TIMEOUTS = 0x31069
|
||||
_POSIX_TIMERS = 0x31069
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TRACE_EVENT_FILTER = -0x1
|
||||
_POSIX_TRACE_INHERIT = -0x1
|
||||
_POSIX_TRACE_LOG = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x31069
|
||||
|
||||
_POSIX_V7_ILP32_OFF32 = -0x1
|
||||
_POSIX_V7_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V7_LP64_OFF64 = 0x1
|
||||
_POSIX_V7_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX_V6_ILP32_OFF32 = -0x1
|
||||
_POSIX_V6_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V6_LP64_OFF64 = 0x1
|
||||
_POSIX_V6_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x31069
|
||||
_POSIX2_C_DEV = 0x31069
|
||||
_POSIX2_C_VERSION = 0x31069
|
||||
_POSIX2_CHAR_TERM = 0x31069
|
||||
_POSIX2_LOCALEDEF = 0x31069
|
||||
_POSIX2_SW_DEV = 0x31069
|
||||
_POSIX2_VERSION = 0x31069
|
||||
|
||||
_XOPEN_ENH_I18N = 0x1
|
||||
_XOPEN_REALTIME = 0x1
|
||||
_XOPEN_REALTIME_THREADS = 0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = 0x1
|
||||
_XOPEN_VERSION = 0x2bc
|
||||
_XOPEN_XCU_VERSION = 0x4
|
||||
)
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_linux.go
|
||||
|
||||
//go:build linux && mips
|
||||
// +build linux,mips
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_AIO_PRIO_DELTA_MAX = 0x14
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0xff
|
||||
_DELAYTIMER_MAX = 0x7fffffff
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_HOST_NAME_MAX = 0x40
|
||||
_LINE_MAX = 0x800
|
||||
_LOGIN_NAME_MAX = 0x100
|
||||
_MQ_PRIO_MAX = 0x8000
|
||||
_NGROUPS_MAX = 0x10000
|
||||
_NSS_BUFLEN_GROUP = 0x400
|
||||
_NSS_BUFLEN_PASSWD = 0x400
|
||||
_OPEN_MAX = 0x100
|
||||
_PTHREAD_KEYS_MAX = 0x400
|
||||
_PTHREAD_STACK_MIN = 0x20000
|
||||
_RE_DUP_MAX = 0x7fff
|
||||
_RTSIG_MAX = 0x20
|
||||
_SEM_VALUE_MAX = 0x7fffffff
|
||||
_STREAM_MAX = 0x10
|
||||
_SYMLOOP_MAX = -0x1
|
||||
_TTY_NAME_MAX = 0x20
|
||||
|
||||
_UIO_MAXIOV = 0x400
|
||||
|
||||
_INT_MAX = 0x7fffffff
|
||||
|
||||
_POSIX_ADVISORY_INFO = 0x31069
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = 0x31069
|
||||
_POSIX_BARRIERS = 0x31069
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = 0x31069
|
||||
_POSIX_CPUTIME = 0x0
|
||||
_POSIX_FSYNC = 0x31069
|
||||
_POSIX_IPV6 = 0x31069
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x31069
|
||||
_POSIX_MEMLOCK = 0x31069
|
||||
_POSIX_MEMLOCK_RANGE = 0x31069
|
||||
_POSIX_MEMORY_PROTECTION = 0x31069
|
||||
_POSIX_MESSAGE_PASSING = 0x31069
|
||||
_POSIX_MONOTONIC_CLOCK = 0x0
|
||||
_POSIX_PRIORITIZED_IO = 0x31069
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_RAW_SOCKETS = 0x31069
|
||||
_POSIX_READER_WRITER_LOCKS = 0x31069
|
||||
_POSIX_REALTIME_SIGNALS = 0x31069
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SAVED_IDS = 0x1
|
||||
_POSIX_SEMAPHORES = 0x31069
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SIGQUEUE_MAX = 0x20
|
||||
_POSIX_SPAWN = 0x31069
|
||||
_POSIX_SPIN_LOCKS = 0x31069
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
|
||||
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_POSIX_THREAD_PRIO_INHERIT = 0x31069
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x31069
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_THREAD_PROCESS_SHARED = 0x31069
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x31069
|
||||
_POSIX_TIMEOUTS = 0x31069
|
||||
_POSIX_TIMERS = 0x31069
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TRACE_EVENT_FILTER = -0x1
|
||||
_POSIX_TRACE_INHERIT = -0x1
|
||||
_POSIX_TRACE_LOG = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x31069
|
||||
|
||||
_POSIX_V7_ILP32_OFF32 = 0x1
|
||||
_POSIX_V7_ILP32_OFFBIG = 0x1
|
||||
_POSIX_V7_LP64_OFF64 = -0x1
|
||||
_POSIX_V7_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX_V6_ILP32_OFF32 = 0x1
|
||||
_POSIX_V6_ILP32_OFFBIG = 0x1
|
||||
_POSIX_V6_LP64_OFF64 = -0x1
|
||||
_POSIX_V6_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x31069
|
||||
_POSIX2_C_DEV = 0x31069
|
||||
_POSIX2_C_VERSION = 0x31069
|
||||
_POSIX2_CHAR_TERM = 0x31069
|
||||
_POSIX2_LOCALEDEF = 0x31069
|
||||
_POSIX2_SW_DEV = 0x31069
|
||||
_POSIX2_VERSION = 0x31069
|
||||
|
||||
_XOPEN_ENH_I18N = 0x1
|
||||
_XOPEN_REALTIME = 0x1
|
||||
_XOPEN_REALTIME_THREADS = 0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = 0x1
|
||||
_XOPEN_VERSION = 0x2bc
|
||||
_XOPEN_XCU_VERSION = 0x4
|
||||
)
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_linux.go
|
||||
|
||||
//go:build linux && mips64
|
||||
// +build linux,mips64
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_AIO_PRIO_DELTA_MAX = 0x14
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0xff
|
||||
_DELAYTIMER_MAX = 0x7fffffff
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_HOST_NAME_MAX = 0x40
|
||||
_LINE_MAX = 0x800
|
||||
_LOGIN_NAME_MAX = 0x100
|
||||
_MQ_PRIO_MAX = 0x8000
|
||||
_NGROUPS_MAX = 0x10000
|
||||
_NSS_BUFLEN_GROUP = 0x400
|
||||
_NSS_BUFLEN_PASSWD = 0x400
|
||||
_OPEN_MAX = 0x100
|
||||
_PTHREAD_KEYS_MAX = 0x400
|
||||
_PTHREAD_STACK_MIN = 0x20000
|
||||
_RE_DUP_MAX = 0x7fff
|
||||
_RTSIG_MAX = 0x20
|
||||
_SEM_VALUE_MAX = 0x7fffffff
|
||||
_STREAM_MAX = 0x10
|
||||
_SYMLOOP_MAX = -0x1
|
||||
_TTY_NAME_MAX = 0x20
|
||||
|
||||
_UIO_MAXIOV = 0x400
|
||||
|
||||
_INT_MAX = 0x7fffffff
|
||||
|
||||
_POSIX_ADVISORY_INFO = 0x31069
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = 0x31069
|
||||
_POSIX_BARRIERS = 0x31069
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = 0x31069
|
||||
_POSIX_CPUTIME = 0x0
|
||||
_POSIX_FSYNC = 0x31069
|
||||
_POSIX_IPV6 = 0x31069
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x31069
|
||||
_POSIX_MEMLOCK = 0x31069
|
||||
_POSIX_MEMLOCK_RANGE = 0x31069
|
||||
_POSIX_MEMORY_PROTECTION = 0x31069
|
||||
_POSIX_MESSAGE_PASSING = 0x31069
|
||||
_POSIX_MONOTONIC_CLOCK = 0x0
|
||||
_POSIX_PRIORITIZED_IO = 0x31069
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_RAW_SOCKETS = 0x31069
|
||||
_POSIX_READER_WRITER_LOCKS = 0x31069
|
||||
_POSIX_REALTIME_SIGNALS = 0x31069
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SAVED_IDS = 0x1
|
||||
_POSIX_SEMAPHORES = 0x31069
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SIGQUEUE_MAX = 0x20
|
||||
_POSIX_SPAWN = 0x31069
|
||||
_POSIX_SPIN_LOCKS = 0x31069
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
|
||||
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_POSIX_THREAD_PRIO_INHERIT = 0x31069
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x31069
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_THREAD_PROCESS_SHARED = 0x31069
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x31069
|
||||
_POSIX_TIMEOUTS = 0x31069
|
||||
_POSIX_TIMERS = 0x31069
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TRACE_EVENT_FILTER = -0x1
|
||||
_POSIX_TRACE_INHERIT = -0x1
|
||||
_POSIX_TRACE_LOG = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x31069
|
||||
|
||||
_POSIX_V7_ILP32_OFF32 = -0x1
|
||||
_POSIX_V7_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V7_LP64_OFF64 = 0x1
|
||||
_POSIX_V7_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX_V6_ILP32_OFF32 = -0x1
|
||||
_POSIX_V6_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V6_LP64_OFF64 = 0x1
|
||||
_POSIX_V6_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x31069
|
||||
_POSIX2_C_DEV = 0x31069
|
||||
_POSIX2_C_VERSION = 0x31069
|
||||
_POSIX2_CHAR_TERM = 0x31069
|
||||
_POSIX2_LOCALEDEF = 0x31069
|
||||
_POSIX2_SW_DEV = 0x31069
|
||||
_POSIX2_VERSION = 0x31069
|
||||
|
||||
_XOPEN_ENH_I18N = 0x1
|
||||
_XOPEN_REALTIME = 0x1
|
||||
_XOPEN_REALTIME_THREADS = 0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = 0x1
|
||||
_XOPEN_VERSION = 0x2bc
|
||||
_XOPEN_XCU_VERSION = 0x4
|
||||
)
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_linux.go
|
||||
|
||||
//go:build linux && mips64le
|
||||
// +build linux,mips64le
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_AIO_PRIO_DELTA_MAX = 0x14
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0xff
|
||||
_DELAYTIMER_MAX = 0x7fffffff
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_HOST_NAME_MAX = 0x40
|
||||
_LINE_MAX = 0x800
|
||||
_LOGIN_NAME_MAX = 0x100
|
||||
_MQ_PRIO_MAX = 0x8000
|
||||
_NGROUPS_MAX = 0x10000
|
||||
_NSS_BUFLEN_GROUP = 0x400
|
||||
_NSS_BUFLEN_PASSWD = 0x400
|
||||
_OPEN_MAX = 0x100
|
||||
_PTHREAD_KEYS_MAX = 0x400
|
||||
_PTHREAD_STACK_MIN = 0x20000
|
||||
_RE_DUP_MAX = 0x7fff
|
||||
_RTSIG_MAX = 0x20
|
||||
_SEM_VALUE_MAX = 0x7fffffff
|
||||
_STREAM_MAX = 0x10
|
||||
_SYMLOOP_MAX = -0x1
|
||||
_TTY_NAME_MAX = 0x20
|
||||
|
||||
_UIO_MAXIOV = 0x400
|
||||
|
||||
_INT_MAX = 0x7fffffff
|
||||
|
||||
_POSIX_ADVISORY_INFO = 0x31069
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = 0x31069
|
||||
_POSIX_BARRIERS = 0x31069
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = 0x31069
|
||||
_POSIX_CPUTIME = 0x0
|
||||
_POSIX_FSYNC = 0x31069
|
||||
_POSIX_IPV6 = 0x31069
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x31069
|
||||
_POSIX_MEMLOCK = 0x31069
|
||||
_POSIX_MEMLOCK_RANGE = 0x31069
|
||||
_POSIX_MEMORY_PROTECTION = 0x31069
|
||||
_POSIX_MESSAGE_PASSING = 0x31069
|
||||
_POSIX_MONOTONIC_CLOCK = 0x0
|
||||
_POSIX_PRIORITIZED_IO = 0x31069
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_RAW_SOCKETS = 0x31069
|
||||
_POSIX_READER_WRITER_LOCKS = 0x31069
|
||||
_POSIX_REALTIME_SIGNALS = 0x31069
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SAVED_IDS = 0x1
|
||||
_POSIX_SEMAPHORES = 0x31069
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SIGQUEUE_MAX = 0x20
|
||||
_POSIX_SPAWN = 0x31069
|
||||
_POSIX_SPIN_LOCKS = 0x31069
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
|
||||
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_POSIX_THREAD_PRIO_INHERIT = 0x31069
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x31069
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_THREAD_PROCESS_SHARED = 0x31069
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x31069
|
||||
_POSIX_TIMEOUTS = 0x31069
|
||||
_POSIX_TIMERS = 0x31069
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TRACE_EVENT_FILTER = -0x1
|
||||
_POSIX_TRACE_INHERIT = -0x1
|
||||
_POSIX_TRACE_LOG = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x31069
|
||||
|
||||
_POSIX_V7_ILP32_OFF32 = -0x1
|
||||
_POSIX_V7_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V7_LP64_OFF64 = 0x1
|
||||
_POSIX_V7_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX_V6_ILP32_OFF32 = -0x1
|
||||
_POSIX_V6_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V6_LP64_OFF64 = 0x1
|
||||
_POSIX_V6_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x31069
|
||||
_POSIX2_C_DEV = 0x31069
|
||||
_POSIX2_C_VERSION = 0x31069
|
||||
_POSIX2_CHAR_TERM = 0x31069
|
||||
_POSIX2_LOCALEDEF = 0x31069
|
||||
_POSIX2_SW_DEV = 0x31069
|
||||
_POSIX2_VERSION = 0x31069
|
||||
|
||||
_XOPEN_ENH_I18N = 0x1
|
||||
_XOPEN_REALTIME = 0x1
|
||||
_XOPEN_REALTIME_THREADS = 0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = 0x1
|
||||
_XOPEN_VERSION = 0x2bc
|
||||
_XOPEN_XCU_VERSION = 0x4
|
||||
)
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_linux.go
|
||||
|
||||
//go:build linux && mipsle
|
||||
// +build linux,mipsle
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_AIO_PRIO_DELTA_MAX = 0x14
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0xff
|
||||
_DELAYTIMER_MAX = 0x7fffffff
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_HOST_NAME_MAX = 0x40
|
||||
_LINE_MAX = 0x800
|
||||
_LOGIN_NAME_MAX = 0x100
|
||||
_MQ_PRIO_MAX = 0x8000
|
||||
_NGROUPS_MAX = 0x10000
|
||||
_NSS_BUFLEN_GROUP = 0x400
|
||||
_NSS_BUFLEN_PASSWD = 0x400
|
||||
_OPEN_MAX = 0x100
|
||||
_PTHREAD_KEYS_MAX = 0x400
|
||||
_PTHREAD_STACK_MIN = 0x20000
|
||||
_RE_DUP_MAX = 0x7fff
|
||||
_RTSIG_MAX = 0x20
|
||||
_SEM_VALUE_MAX = 0x7fffffff
|
||||
_STREAM_MAX = 0x10
|
||||
_SYMLOOP_MAX = -0x1
|
||||
_TTY_NAME_MAX = 0x20
|
||||
|
||||
_UIO_MAXIOV = 0x400
|
||||
|
||||
_INT_MAX = 0x7fffffff
|
||||
|
||||
_POSIX_ADVISORY_INFO = 0x31069
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = 0x31069
|
||||
_POSIX_BARRIERS = 0x31069
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = 0x31069
|
||||
_POSIX_CPUTIME = 0x0
|
||||
_POSIX_FSYNC = 0x31069
|
||||
_POSIX_IPV6 = 0x31069
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x31069
|
||||
_POSIX_MEMLOCK = 0x31069
|
||||
_POSIX_MEMLOCK_RANGE = 0x31069
|
||||
_POSIX_MEMORY_PROTECTION = 0x31069
|
||||
_POSIX_MESSAGE_PASSING = 0x31069
|
||||
_POSIX_MONOTONIC_CLOCK = 0x0
|
||||
_POSIX_PRIORITIZED_IO = 0x31069
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_RAW_SOCKETS = 0x31069
|
||||
_POSIX_READER_WRITER_LOCKS = 0x31069
|
||||
_POSIX_REALTIME_SIGNALS = 0x31069
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SAVED_IDS = 0x1
|
||||
_POSIX_SEMAPHORES = 0x31069
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SIGQUEUE_MAX = 0x20
|
||||
_POSIX_SPAWN = 0x31069
|
||||
_POSIX_SPIN_LOCKS = 0x31069
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
|
||||
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_POSIX_THREAD_PRIO_INHERIT = 0x31069
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x31069
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_THREAD_PROCESS_SHARED = 0x31069
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x31069
|
||||
_POSIX_TIMEOUTS = 0x31069
|
||||
_POSIX_TIMERS = 0x31069
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TRACE_EVENT_FILTER = -0x1
|
||||
_POSIX_TRACE_INHERIT = -0x1
|
||||
_POSIX_TRACE_LOG = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x31069
|
||||
|
||||
_POSIX_V7_ILP32_OFF32 = 0x1
|
||||
_POSIX_V7_ILP32_OFFBIG = 0x1
|
||||
_POSIX_V7_LP64_OFF64 = -0x1
|
||||
_POSIX_V7_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX_V6_ILP32_OFF32 = 0x1
|
||||
_POSIX_V6_ILP32_OFFBIG = 0x1
|
||||
_POSIX_V6_LP64_OFF64 = -0x1
|
||||
_POSIX_V6_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x31069
|
||||
_POSIX2_C_DEV = 0x31069
|
||||
_POSIX2_C_VERSION = 0x31069
|
||||
_POSIX2_CHAR_TERM = 0x31069
|
||||
_POSIX2_LOCALEDEF = 0x31069
|
||||
_POSIX2_SW_DEV = 0x31069
|
||||
_POSIX2_VERSION = 0x31069
|
||||
|
||||
_XOPEN_ENH_I18N = 0x1
|
||||
_XOPEN_REALTIME = 0x1
|
||||
_XOPEN_REALTIME_THREADS = 0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = 0x1
|
||||
_XOPEN_VERSION = 0x2bc
|
||||
_XOPEN_XCU_VERSION = 0x4
|
||||
)
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_linux.go
|
||||
|
||||
//go:build linux && ppc64
|
||||
// +build linux,ppc64
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_AIO_PRIO_DELTA_MAX = 0x14
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0xff
|
||||
_DELAYTIMER_MAX = 0x7fffffff
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_HOST_NAME_MAX = 0x40
|
||||
_LINE_MAX = 0x800
|
||||
_LOGIN_NAME_MAX = 0x100
|
||||
_MQ_PRIO_MAX = 0x8000
|
||||
_NGROUPS_MAX = 0x10000
|
||||
_NSS_BUFLEN_GROUP = 0x400
|
||||
_NSS_BUFLEN_PASSWD = 0x400
|
||||
_OPEN_MAX = 0x100
|
||||
_PTHREAD_KEYS_MAX = 0x400
|
||||
_PTHREAD_STACK_MIN = 0x20000
|
||||
_RE_DUP_MAX = 0x7fff
|
||||
_RTSIG_MAX = 0x20
|
||||
_SEM_VALUE_MAX = 0x7fffffff
|
||||
_STREAM_MAX = 0x10
|
||||
_SYMLOOP_MAX = -0x1
|
||||
_TTY_NAME_MAX = 0x20
|
||||
|
||||
_UIO_MAXIOV = 0x400
|
||||
|
||||
_INT_MAX = 0x7fffffff
|
||||
|
||||
_POSIX_ADVISORY_INFO = 0x31069
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = 0x31069
|
||||
_POSIX_BARRIERS = 0x31069
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = 0x31069
|
||||
_POSIX_CPUTIME = 0x0
|
||||
_POSIX_FSYNC = 0x31069
|
||||
_POSIX_IPV6 = 0x31069
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x31069
|
||||
_POSIX_MEMLOCK = 0x31069
|
||||
_POSIX_MEMLOCK_RANGE = 0x31069
|
||||
_POSIX_MEMORY_PROTECTION = 0x31069
|
||||
_POSIX_MESSAGE_PASSING = 0x31069
|
||||
_POSIX_MONOTONIC_CLOCK = 0x0
|
||||
_POSIX_PRIORITIZED_IO = 0x31069
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_RAW_SOCKETS = 0x31069
|
||||
_POSIX_READER_WRITER_LOCKS = 0x31069
|
||||
_POSIX_REALTIME_SIGNALS = 0x31069
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SAVED_IDS = 0x1
|
||||
_POSIX_SEMAPHORES = 0x31069
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SIGQUEUE_MAX = 0x20
|
||||
_POSIX_SPAWN = 0x31069
|
||||
_POSIX_SPIN_LOCKS = 0x31069
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
|
||||
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_POSIX_THREAD_PRIO_INHERIT = 0x31069
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x31069
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_THREAD_PROCESS_SHARED = 0x31069
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x31069
|
||||
_POSIX_TIMEOUTS = 0x31069
|
||||
_POSIX_TIMERS = 0x31069
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TRACE_EVENT_FILTER = -0x1
|
||||
_POSIX_TRACE_INHERIT = -0x1
|
||||
_POSIX_TRACE_LOG = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x31069
|
||||
|
||||
_POSIX_V7_ILP32_OFF32 = -0x1
|
||||
_POSIX_V7_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V7_LP64_OFF64 = 0x1
|
||||
_POSIX_V7_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX_V6_ILP32_OFF32 = -0x1
|
||||
_POSIX_V6_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V6_LP64_OFF64 = 0x1
|
||||
_POSIX_V6_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x31069
|
||||
_POSIX2_C_DEV = 0x31069
|
||||
_POSIX2_C_VERSION = 0x31069
|
||||
_POSIX2_CHAR_TERM = 0x31069
|
||||
_POSIX2_LOCALEDEF = 0x31069
|
||||
_POSIX2_SW_DEV = 0x31069
|
||||
_POSIX2_VERSION = 0x31069
|
||||
|
||||
_XOPEN_ENH_I18N = 0x1
|
||||
_XOPEN_REALTIME = 0x1
|
||||
_XOPEN_REALTIME_THREADS = 0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = 0x1
|
||||
_XOPEN_VERSION = 0x2bc
|
||||
_XOPEN_XCU_VERSION = 0x4
|
||||
)
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_linux.go
|
||||
|
||||
//go:build linux && ppc64le
|
||||
// +build linux,ppc64le
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_AIO_PRIO_DELTA_MAX = 0x14
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0xff
|
||||
_DELAYTIMER_MAX = 0x7fffffff
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_HOST_NAME_MAX = 0x40
|
||||
_LINE_MAX = 0x800
|
||||
_LOGIN_NAME_MAX = 0x100
|
||||
_MQ_PRIO_MAX = 0x8000
|
||||
_NGROUPS_MAX = 0x10000
|
||||
_NSS_BUFLEN_GROUP = 0x400
|
||||
_NSS_BUFLEN_PASSWD = 0x400
|
||||
_OPEN_MAX = 0x100
|
||||
_PTHREAD_KEYS_MAX = 0x400
|
||||
_PTHREAD_STACK_MIN = 0x20000
|
||||
_RE_DUP_MAX = 0x7fff
|
||||
_RTSIG_MAX = 0x20
|
||||
_SEM_VALUE_MAX = 0x7fffffff
|
||||
_STREAM_MAX = 0x10
|
||||
_SYMLOOP_MAX = -0x1
|
||||
_TTY_NAME_MAX = 0x20
|
||||
|
||||
_UIO_MAXIOV = 0x400
|
||||
|
||||
_INT_MAX = 0x7fffffff
|
||||
|
||||
_POSIX_ADVISORY_INFO = 0x31069
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = 0x31069
|
||||
_POSIX_BARRIERS = 0x31069
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = 0x31069
|
||||
_POSIX_CPUTIME = 0x0
|
||||
_POSIX_FSYNC = 0x31069
|
||||
_POSIX_IPV6 = 0x31069
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x31069
|
||||
_POSIX_MEMLOCK = 0x31069
|
||||
_POSIX_MEMLOCK_RANGE = 0x31069
|
||||
_POSIX_MEMORY_PROTECTION = 0x31069
|
||||
_POSIX_MESSAGE_PASSING = 0x31069
|
||||
_POSIX_MONOTONIC_CLOCK = 0x0
|
||||
_POSIX_PRIORITIZED_IO = 0x31069
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_RAW_SOCKETS = 0x31069
|
||||
_POSIX_READER_WRITER_LOCKS = 0x31069
|
||||
_POSIX_REALTIME_SIGNALS = 0x31069
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SAVED_IDS = 0x1
|
||||
_POSIX_SEMAPHORES = 0x31069
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SIGQUEUE_MAX = 0x20
|
||||
_POSIX_SPAWN = 0x31069
|
||||
_POSIX_SPIN_LOCKS = 0x31069
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
|
||||
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_POSIX_THREAD_PRIO_INHERIT = 0x31069
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x31069
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_THREAD_PROCESS_SHARED = 0x31069
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x31069
|
||||
_POSIX_TIMEOUTS = 0x31069
|
||||
_POSIX_TIMERS = 0x31069
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TRACE_EVENT_FILTER = -0x1
|
||||
_POSIX_TRACE_INHERIT = -0x1
|
||||
_POSIX_TRACE_LOG = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x31069
|
||||
|
||||
_POSIX_V7_ILP32_OFF32 = -0x1
|
||||
_POSIX_V7_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V7_LP64_OFF64 = 0x1
|
||||
_POSIX_V7_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX_V6_ILP32_OFF32 = -0x1
|
||||
_POSIX_V6_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V6_LP64_OFF64 = 0x1
|
||||
_POSIX_V6_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x31069
|
||||
_POSIX2_C_DEV = 0x31069
|
||||
_POSIX2_C_VERSION = 0x31069
|
||||
_POSIX2_CHAR_TERM = 0x31069
|
||||
_POSIX2_LOCALEDEF = 0x31069
|
||||
_POSIX2_SW_DEV = 0x31069
|
||||
_POSIX2_VERSION = 0x31069
|
||||
|
||||
_XOPEN_ENH_I18N = 0x1
|
||||
_XOPEN_REALTIME = 0x1
|
||||
_XOPEN_REALTIME_THREADS = 0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = 0x1
|
||||
_XOPEN_VERSION = 0x2bc
|
||||
_XOPEN_XCU_VERSION = 0x4
|
||||
)
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_linux.go
|
||||
|
||||
//go:build linux && riscv64
|
||||
// +build linux,riscv64
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_AIO_PRIO_DELTA_MAX = 0x14
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0xff
|
||||
_DELAYTIMER_MAX = 0x7fffffff
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_HOST_NAME_MAX = 0x40
|
||||
_LINE_MAX = 0x800
|
||||
_LOGIN_NAME_MAX = 0x100
|
||||
_MQ_PRIO_MAX = 0x8000
|
||||
_NGROUPS_MAX = 0x10000
|
||||
_NSS_BUFLEN_GROUP = 0x400
|
||||
_NSS_BUFLEN_PASSWD = 0x400
|
||||
_OPEN_MAX = 0x100
|
||||
_PTHREAD_KEYS_MAX = 0x400
|
||||
_PTHREAD_STACK_MIN = 0x4000
|
||||
_RE_DUP_MAX = 0x7fff
|
||||
_RTSIG_MAX = 0x20
|
||||
_SEM_VALUE_MAX = 0x7fffffff
|
||||
_STREAM_MAX = 0x10
|
||||
_SYMLOOP_MAX = -0x1
|
||||
_TTY_NAME_MAX = 0x20
|
||||
|
||||
_UIO_MAXIOV = 0x400
|
||||
|
||||
_INT_MAX = 0x7fffffff
|
||||
|
||||
_POSIX_ADVISORY_INFO = 0x31069
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = 0x31069
|
||||
_POSIX_BARRIERS = 0x31069
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = 0x31069
|
||||
_POSIX_CPUTIME = 0x0
|
||||
_POSIX_FSYNC = 0x31069
|
||||
_POSIX_IPV6 = 0x31069
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x31069
|
||||
_POSIX_MEMLOCK = 0x31069
|
||||
_POSIX_MEMLOCK_RANGE = 0x31069
|
||||
_POSIX_MEMORY_PROTECTION = 0x31069
|
||||
_POSIX_MESSAGE_PASSING = 0x31069
|
||||
_POSIX_MONOTONIC_CLOCK = 0x0
|
||||
_POSIX_PRIORITIZED_IO = 0x31069
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_RAW_SOCKETS = 0x31069
|
||||
_POSIX_READER_WRITER_LOCKS = 0x31069
|
||||
_POSIX_REALTIME_SIGNALS = 0x31069
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SAVED_IDS = 0x1
|
||||
_POSIX_SEMAPHORES = 0x31069
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SIGQUEUE_MAX = 0x20
|
||||
_POSIX_SPAWN = 0x31069
|
||||
_POSIX_SPIN_LOCKS = 0x31069
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
|
||||
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_POSIX_THREAD_PRIO_INHERIT = 0x31069
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x31069
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_THREAD_PROCESS_SHARED = 0x31069
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x31069
|
||||
_POSIX_TIMEOUTS = 0x31069
|
||||
_POSIX_TIMERS = 0x31069
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TRACE_EVENT_FILTER = -0x1
|
||||
_POSIX_TRACE_INHERIT = -0x1
|
||||
_POSIX_TRACE_LOG = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x31069
|
||||
|
||||
_POSIX_V7_ILP32_OFF32 = -0x1
|
||||
_POSIX_V7_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V7_LP64_OFF64 = 0x1
|
||||
_POSIX_V7_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX_V6_ILP32_OFF32 = -0x1
|
||||
_POSIX_V6_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V6_LP64_OFF64 = 0x1
|
||||
_POSIX_V6_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x31069
|
||||
_POSIX2_C_DEV = 0x31069
|
||||
_POSIX2_C_VERSION = 0x31069
|
||||
_POSIX2_CHAR_TERM = 0x31069
|
||||
_POSIX2_LOCALEDEF = 0x31069
|
||||
_POSIX2_SW_DEV = 0x31069
|
||||
_POSIX2_VERSION = 0x31069
|
||||
|
||||
_XOPEN_ENH_I18N = 0x1
|
||||
_XOPEN_REALTIME = 0x1
|
||||
_XOPEN_REALTIME_THREADS = 0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = 0x1
|
||||
_XOPEN_VERSION = 0x2bc
|
||||
_XOPEN_XCU_VERSION = 0x4
|
||||
)
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_linux.go
|
||||
|
||||
//go:build linux && s390x
|
||||
// +build linux,s390x
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_AIO_PRIO_DELTA_MAX = 0x14
|
||||
_BC_BASE_MAX = 0x63
|
||||
_BC_DIM_MAX = 0x800
|
||||
_BC_SCALE_MAX = 0x63
|
||||
_BC_STRING_MAX = 0x3e8
|
||||
_COLL_WEIGHTS_MAX = 0xff
|
||||
_DELAYTIMER_MAX = 0x7fffffff
|
||||
_EXPR_NEST_MAX = 0x20
|
||||
_HOST_NAME_MAX = 0x40
|
||||
_LINE_MAX = 0x800
|
||||
_LOGIN_NAME_MAX = 0x100
|
||||
_MQ_PRIO_MAX = 0x8000
|
||||
_NGROUPS_MAX = 0x10000
|
||||
_NSS_BUFLEN_GROUP = 0x400
|
||||
_NSS_BUFLEN_PASSWD = 0x400
|
||||
_OPEN_MAX = 0x100
|
||||
_PTHREAD_KEYS_MAX = 0x400
|
||||
_PTHREAD_STACK_MIN = 0x4000
|
||||
_RE_DUP_MAX = 0x7fff
|
||||
_RTSIG_MAX = 0x20
|
||||
_SEM_VALUE_MAX = 0x7fffffff
|
||||
_STREAM_MAX = 0x10
|
||||
_SYMLOOP_MAX = -0x1
|
||||
_TTY_NAME_MAX = 0x20
|
||||
|
||||
_UIO_MAXIOV = 0x400
|
||||
|
||||
_INT_MAX = 0x7fffffff
|
||||
|
||||
_POSIX_ADVISORY_INFO = 0x31069
|
||||
_POSIX_ARG_MAX = 0x1000
|
||||
_POSIX_ASYNCHRONOUS_IO = 0x31069
|
||||
_POSIX_BARRIERS = 0x31069
|
||||
_POSIX_CHILD_MAX = 0x19
|
||||
_POSIX_CLOCK_SELECTION = 0x31069
|
||||
_POSIX_CPUTIME = 0x0
|
||||
_POSIX_FSYNC = 0x31069
|
||||
_POSIX_IPV6 = 0x31069
|
||||
_POSIX_JOB_CONTROL = 0x1
|
||||
_POSIX_MAPPED_FILES = 0x31069
|
||||
_POSIX_MEMLOCK = 0x31069
|
||||
_POSIX_MEMLOCK_RANGE = 0x31069
|
||||
_POSIX_MEMORY_PROTECTION = 0x31069
|
||||
_POSIX_MESSAGE_PASSING = 0x31069
|
||||
_POSIX_MONOTONIC_CLOCK = 0x0
|
||||
_POSIX_PRIORITIZED_IO = 0x31069
|
||||
_POSIX_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_RAW_SOCKETS = 0x31069
|
||||
_POSIX_READER_WRITER_LOCKS = 0x31069
|
||||
_POSIX_REALTIME_SIGNALS = 0x31069
|
||||
_POSIX_REGEXP = 0x1
|
||||
_POSIX_SAVED_IDS = 0x1
|
||||
_POSIX_SEMAPHORES = 0x31069
|
||||
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
|
||||
_POSIX_SHELL = 0x1
|
||||
_POSIX_SIGQUEUE_MAX = 0x20
|
||||
_POSIX_SPAWN = 0x31069
|
||||
_POSIX_SPIN_LOCKS = 0x31069
|
||||
_POSIX_SPORADIC_SERVER = -0x1
|
||||
_POSIX_SYNCHRONIZED_IO = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
|
||||
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
|
||||
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
|
||||
_POSIX_THREAD_PRIO_INHERIT = 0x31069
|
||||
_POSIX_THREAD_PRIO_PROTECT = 0x31069
|
||||
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
|
||||
_POSIX_THREAD_PROCESS_SHARED = 0x31069
|
||||
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
|
||||
_POSIX_THREAD_SPORADIC_SERVER = -0x1
|
||||
_POSIX_THREADS = 0x31069
|
||||
_POSIX_TIMEOUTS = 0x31069
|
||||
_POSIX_TIMERS = 0x31069
|
||||
_POSIX_TRACE = -0x1
|
||||
_POSIX_TRACE_EVENT_FILTER = -0x1
|
||||
_POSIX_TRACE_INHERIT = -0x1
|
||||
_POSIX_TRACE_LOG = -0x1
|
||||
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
|
||||
_POSIX_VERSION = 0x31069
|
||||
|
||||
_POSIX_V7_ILP32_OFF32 = -0x1
|
||||
_POSIX_V7_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V7_LP64_OFF64 = 0x1
|
||||
_POSIX_V7_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX_V6_ILP32_OFF32 = -0x1
|
||||
_POSIX_V6_ILP32_OFFBIG = -0x1
|
||||
_POSIX_V6_LP64_OFF64 = 0x1
|
||||
_POSIX_V6_LPBIG_OFFBIG = -0x1
|
||||
|
||||
_POSIX2_C_BIND = 0x31069
|
||||
_POSIX2_C_DEV = 0x31069
|
||||
_POSIX2_C_VERSION = 0x31069
|
||||
_POSIX2_CHAR_TERM = 0x31069
|
||||
_POSIX2_LOCALEDEF = 0x31069
|
||||
_POSIX2_SW_DEV = 0x31069
|
||||
_POSIX2_VERSION = 0x31069
|
||||
|
||||
_XOPEN_ENH_I18N = 0x1
|
||||
_XOPEN_REALTIME = 0x1
|
||||
_XOPEN_REALTIME_THREADS = 0x1
|
||||
_XOPEN_SHM = 0x1
|
||||
_XOPEN_UNIX = 0x1
|
||||
_XOPEN_VERSION = 0x2bc
|
||||
_XOPEN_XCU_VERSION = 0x4
|
||||
)
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_netbsd.go
|
||||
|
||||
//go:build netbsd && 386
|
||||
// +build netbsd,386
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_LONG_MAX = 0x7fffffff
|
||||
)
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_netbsd.go
|
||||
|
||||
//go:build netbsd && amd64
|
||||
// +build netbsd,amd64
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_LONG_MAX = 0x7fffffffffffffff
|
||||
)
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_netbsd.go
|
||||
|
||||
//go:build netbsd && arm
|
||||
// +build netbsd,arm
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_LONG_MAX = 0x7fffffff
|
||||
)
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs sysconf_values_netbsd.go
|
||||
|
||||
//go:build netbsd && arm64
|
||||
// +build netbsd,arm64
|
||||
|
||||
package sysconf
|
||||
|
||||
const (
|
||||
_LONG_MAX = 0x7fffffffffffffff
|
||||
)
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
env:
|
||||
CIRRUS_CLONE_DEPTH: 1
|
||||
GO_VERSION: go1.19.1
|
||||
|
||||
freebsd_12_task:
|
||||
freebsd_instance:
|
||||
image_family: freebsd-12-3
|
||||
install_script: |
|
||||
pkg install -y go
|
||||
GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest
|
||||
bin/${GO_VERSION} download
|
||||
build_script: bin/${GO_VERSION} build -buildvcs=false -v ./...
|
||||
test_script: bin/${GO_VERSION} test -buildvcs=false -race ./...
|
||||
+202
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
# numcpus
|
||||
|
||||
[](https://pkg.go.dev/github.com/tklauser/numcpus)
|
||||
[](https://github.com/tklauser/numcpus/actions?query=workflow%3ATests)
|
||||
|
||||
Package numcpus provides information about the number of CPUs in the system.
|
||||
|
||||
It gets the number of CPUs (online, offline, present, possible, configured or
|
||||
kernel maximum) on Linux, Darwin, FreeBSD, NetBSD, OpenBSD, DragonflyBSD or
|
||||
Solaris/Illumos systems.
|
||||
|
||||
On Linux, the information is retrieved by reading the corresponding CPU
|
||||
topology files in `/sys/devices/system/cpu`.
|
||||
|
||||
On BSD systems, the information is retrieved using the `hw.ncpu` and
|
||||
`hw.ncpuonline` sysctls, if supported.
|
||||
|
||||
Not all functions are supported on Darwin, FreeBSD, NetBSD, OpenBSD,
|
||||
DragonflyBSD and Solaris/Illumos. ErrNotSupported is returned in case a
|
||||
function is not supported on a particular platform.
|
||||
|
||||
## Usage
|
||||
|
||||
```Go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/tklauser/numcpus"
|
||||
)
|
||||
|
||||
func main() {
|
||||
online, err := numcpus.GetOnline()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "GetOnline: %v\n", err)
|
||||
}
|
||||
fmt.Printf("online CPUs: %v\n", online)
|
||||
|
||||
possible, err := numcpus.GetPossible()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "GetPossible: %v\n", err)
|
||||
}
|
||||
fmt.Printf("possible CPUs: %v\n", possible)
|
||||
}
|
||||
```
|
||||
|
||||
## References
|
||||
|
||||
* [Linux kernel sysfs documentation for CPU attributes](https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-devices-system-cpu)
|
||||
* [Linux kernel CPU topology documentation](https://www.kernel.org/doc/Documentation/cputopology.txt)
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
// Copyright 2018-2022 Tobias Klauser
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package numcpus provides information about the number of CPUs in the system.
|
||||
//
|
||||
// It gets the number of CPUs (online, offline, present, possible or kernel
|
||||
// maximum) on Linux, Darwin, FreeBSD, NetBSD, OpenBSD, DragonflyBSD,
|
||||
// Solaris/Illumos or Windows systems.
|
||||
//
|
||||
// On Linux, the information is retrieved by reading the corresponding CPU
|
||||
// topology files in /sys/devices/system/cpu.
|
||||
//
|
||||
// On BSD systems, the information is retrieved using the hw.ncpu and
|
||||
// hw.ncpuonline sysctls, if supported.
|
||||
//
|
||||
// On Windows systems, the information is retrieved using the
|
||||
// GetActiveProcessorCount and GetMaximumProcessorCount functions, respectively.
|
||||
//
|
||||
// Not all functions are supported on Darwin, FreeBSD, NetBSD, OpenBSD,
|
||||
// DragonflyBSD, Solaris/Illumos and Windows. ErrNotSupported is returned in
|
||||
// case a function is not supported on a particular platform.
|
||||
package numcpus
|
||||
|
||||
import "errors"
|
||||
|
||||
// ErrNotSupported is the error returned when the function is not supported.
|
||||
var ErrNotSupported = errors.New("function not supported")
|
||||
|
||||
// GetConfigured returns the number of CPUs configured on the system. This
|
||||
// function should return the same value as `getconf _SC_NPROCESSORS_CONF` on a
|
||||
// unix system.
|
||||
func GetConfigured() (int, error) {
|
||||
return getConfigured()
|
||||
}
|
||||
|
||||
// GetKernelMax returns the maximum number of CPUs allowed by the kernel
|
||||
// configuration. This function is only supported on Linux and Windows systems.
|
||||
func GetKernelMax() (int, error) {
|
||||
return getKernelMax()
|
||||
}
|
||||
|
||||
// GetOffline returns the number of offline CPUs, i.e. CPUs that are not online
|
||||
// because they have been hotplugged off or exceed the limit of CPUs allowed by
|
||||
// the kernel configuration (see GetKernelMax). This function is only supported
|
||||
// on Linux systems.
|
||||
func GetOffline() (int, error) {
|
||||
return getOffline()
|
||||
}
|
||||
|
||||
// GetOnline returns the number of CPUs that are online and being scheduled.
|
||||
func GetOnline() (int, error) {
|
||||
return getOnline()
|
||||
}
|
||||
|
||||
// GetPossible returns the number of possible CPUs, i.e. CPUs that
|
||||
// have been allocated resources and can be brought online if they are present.
|
||||
func GetPossible() (int, error) {
|
||||
return getPossible()
|
||||
}
|
||||
|
||||
// GetPresent returns the number of CPUs present in the system.
|
||||
func GetPresent() (int, error) {
|
||||
return getPresent()
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
// Copyright 2018 Tobias Klauser
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build darwin || dragonfly || freebsd || netbsd || openbsd
|
||||
// +build darwin dragonfly freebsd netbsd openbsd
|
||||
|
||||
package numcpus
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func getConfigured() (int, error) {
|
||||
n, err := unix.SysctlUint32("hw.ncpu")
|
||||
return int(n), err
|
||||
}
|
||||
|
||||
func getKernelMax() (int, error) {
|
||||
if runtime.GOOS == "freebsd" {
|
||||
n, err := unix.SysctlUint32("kern.smp.maxcpus")
|
||||
return int(n), err
|
||||
}
|
||||
return 0, ErrNotSupported
|
||||
}
|
||||
|
||||
func getOffline() (int, error) {
|
||||
return 0, ErrNotSupported
|
||||
}
|
||||
|
||||
func getOnline() (int, error) {
|
||||
var n uint32
|
||||
var err error
|
||||
switch runtime.GOOS {
|
||||
case "netbsd", "openbsd":
|
||||
n, err = unix.SysctlUint32("hw.ncpuonline")
|
||||
if err != nil {
|
||||
n, err = unix.SysctlUint32("hw.ncpu")
|
||||
}
|
||||
default:
|
||||
n, err = unix.SysctlUint32("hw.ncpu")
|
||||
}
|
||||
return int(n), err
|
||||
}
|
||||
|
||||
func getPossible() (int, error) {
|
||||
n, err := unix.SysctlUint32("hw.ncpu")
|
||||
return int(n), err
|
||||
}
|
||||
|
||||
func getPresent() (int, error) {
|
||||
n, err := unix.SysctlUint32("hw.ncpu")
|
||||
return int(n), err
|
||||
}
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
// Copyright 2018 Tobias Klauser
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package numcpus
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
const sysfsCPUBasePath = "/sys/devices/system/cpu"
|
||||
|
||||
func getFromCPUAffinity() (int, error) {
|
||||
var cpuSet unix.CPUSet
|
||||
if err := unix.SchedGetaffinity(0, &cpuSet); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return cpuSet.Count(), nil
|
||||
}
|
||||
|
||||
func readCPURange(file string) (int, error) {
|
||||
buf, err := ioutil.ReadFile(filepath.Join(sysfsCPUBasePath, file))
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return parseCPURange(strings.Trim(string(buf), "\n "))
|
||||
}
|
||||
|
||||
func parseCPURange(cpus string) (int, error) {
|
||||
n := int(0)
|
||||
for _, cpuRange := range strings.Split(cpus, ",") {
|
||||
if len(cpuRange) == 0 {
|
||||
continue
|
||||
}
|
||||
rangeOp := strings.SplitN(cpuRange, "-", 2)
|
||||
first, err := strconv.ParseUint(rangeOp[0], 10, 32)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
if len(rangeOp) == 1 {
|
||||
n++
|
||||
continue
|
||||
}
|
||||
last, err := strconv.ParseUint(rangeOp[1], 10, 32)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
n += int(last - first + 1)
|
||||
}
|
||||
return n, nil
|
||||
}
|
||||
|
||||
func getConfigured() (int, error) {
|
||||
d, err := os.Open(sysfsCPUBasePath)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
defer d.Close()
|
||||
fis, err := d.Readdir(-1)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
count := 0
|
||||
for _, fi := range fis {
|
||||
if name := fi.Name(); fi.IsDir() && strings.HasPrefix(name, "cpu") {
|
||||
_, err := strconv.ParseInt(name[3:], 10, 64)
|
||||
if err == nil {
|
||||
count++
|
||||
}
|
||||
}
|
||||
}
|
||||
return count, nil
|
||||
}
|
||||
|
||||
func getKernelMax() (int, error) {
|
||||
buf, err := ioutil.ReadFile(filepath.Join(sysfsCPUBasePath, "kernel_max"))
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
n, err := strconv.ParseInt(strings.Trim(string(buf), "\n "), 10, 32)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return int(n), nil
|
||||
}
|
||||
|
||||
func getOffline() (int, error) {
|
||||
return readCPURange("offline")
|
||||
}
|
||||
|
||||
func getOnline() (int, error) {
|
||||
if n, err := getFromCPUAffinity(); err == nil {
|
||||
return n, nil
|
||||
}
|
||||
return readCPURange("online")
|
||||
}
|
||||
|
||||
func getPossible() (int, error) {
|
||||
return readCPURange("possible")
|
||||
}
|
||||
|
||||
func getPresent() (int, error) {
|
||||
return readCPURange("present")
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
// Copyright 2021 Tobias Klauser
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build solaris
|
||||
// +build solaris
|
||||
|
||||
package numcpus
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
// taken from /usr/include/sys/unistd.h
|
||||
const (
|
||||
_SC_NPROCESSORS_CONF = 14
|
||||
_SC_NPROCESSORS_ONLN = 15
|
||||
_SC_NPROCESSORS_MAX = 516
|
||||
)
|
||||
|
||||
func getConfigured() (int, error) {
|
||||
n, err := unix.Sysconf(_SC_NPROCESSORS_CONF)
|
||||
return int(n), err
|
||||
}
|
||||
|
||||
func getKernelMax() (int, error) {
|
||||
n, err := unix.Sysconf(_SC_NPROCESSORS_MAX)
|
||||
return int(n), err
|
||||
}
|
||||
|
||||
func getOffline() (int, error) {
|
||||
return 0, ErrNotSupported
|
||||
}
|
||||
|
||||
func getOnline() (int, error) {
|
||||
n, err := unix.Sysconf(_SC_NPROCESSORS_ONLN)
|
||||
return int(n), err
|
||||
}
|
||||
|
||||
func getPossible() (int, error) {
|
||||
n, err := unix.Sysconf(_SC_NPROCESSORS_CONF)
|
||||
return int(n), err
|
||||
}
|
||||
|
||||
func getPresent() (int, error) {
|
||||
n, err := unix.Sysconf(_SC_NPROCESSORS_CONF)
|
||||
return int(n), err
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
// Copyright 2021 Tobias Klauser
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows
|
||||
// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
|
||||
|
||||
package numcpus
|
||||
|
||||
func getConfigured() (int, error) {
|
||||
return 0, ErrNotSupported
|
||||
}
|
||||
|
||||
func getKernelMax() (int, error) {
|
||||
return 0, ErrNotSupported
|
||||
}
|
||||
|
||||
func getOffline() (int, error) {
|
||||
return 0, ErrNotSupported
|
||||
}
|
||||
|
||||
func getOnline() (int, error) {
|
||||
return 0, ErrNotSupported
|
||||
}
|
||||
|
||||
func getPossible() (int, error) {
|
||||
return 0, ErrNotSupported
|
||||
}
|
||||
|
||||
func getPresent() (int, error) {
|
||||
return 0, ErrNotSupported
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
// Copyright 2022 Tobias Klauser
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package numcpus
|
||||
|
||||
import "golang.org/x/sys/windows"
|
||||
|
||||
func getConfigured() (int, error) {
|
||||
return int(windows.GetActiveProcessorCount(windows.ALL_PROCESSOR_GROUPS)), nil
|
||||
}
|
||||
|
||||
func getKernelMax() (int, error) {
|
||||
return int(windows.GetMaximumProcessorCount(windows.ALL_PROCESSOR_GROUPS)), nil
|
||||
}
|
||||
|
||||
func getOffline() (int, error) {
|
||||
return 0, ErrNotSupported
|
||||
}
|
||||
|
||||
func getOnline() (int, error) {
|
||||
return int(windows.GetActiveProcessorCount(windows.ALL_PROCESSOR_GROUPS)), nil
|
||||
}
|
||||
|
||||
func getPossible() (int, error) {
|
||||
return int(windows.GetActiveProcessorCount(windows.ALL_PROCESSOR_GROUPS)), nil
|
||||
}
|
||||
|
||||
func getPresent() (int, error) {
|
||||
return int(windows.GetActiveProcessorCount(windows.ALL_PROCESSOR_GROUPS)), nil
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// Copyright 2022 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.
|
||||
|
||||
//go:build !aix && !linux && (ppc64 || ppc64le)
|
||||
// +build !aix
|
||||
// +build !linux
|
||||
// +build ppc64 ppc64le
|
||||
|
||||
package cpu
|
||||
|
||||
func archInit() {
|
||||
PPC64.IsPOWER8 = true
|
||||
Initialized = true
|
||||
}
|
||||
+5
-3
@@ -7,9 +7,11 @@
|
||||
|
||||
package execabs
|
||||
|
||||
import "strings"
|
||||
import (
|
||||
"errors"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func isGo119ErrDot(err error) bool {
|
||||
// TODO: return errors.Is(err, exec.ErrDot)
|
||||
return strings.Contains(err.Error(), "current directory")
|
||||
return errors.Is(err, exec.ErrDot)
|
||||
}
|
||||
+2
-2
@@ -126,7 +126,7 @@ errors=$(
|
||||
signals=$(
|
||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
||||
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
|
||||
egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
|
||||
grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT' |
|
||||
sort
|
||||
)
|
||||
|
||||
@@ -136,7 +136,7 @@ echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
|
||||
sort >_error.grep
|
||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
||||
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
|
||||
egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
|
||||
grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT' |
|
||||
sort >_signal.grep
|
||||
|
||||
echo '// mkerrors.sh' "$@"
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
// Copyright 2022 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.
|
||||
|
||||
//go:build (darwin || freebsd || netbsd || openbsd) && gc
|
||||
// +build darwin freebsd netbsd openbsd
|
||||
// +build gc
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
//
|
||||
// System call support for ppc64, BSD
|
||||
//
|
||||
|
||||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||
JMP syscall·Syscall9(SB)
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·RawSyscall6(SB)
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
|
||||
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
|
||||
|
||||
package unix
|
||||
|
||||
|
||||
+18
@@ -182,6 +182,24 @@ openbsd_mips64)
|
||||
# API consistent across platforms.
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
;;
|
||||
openbsd_ppc64)
|
||||
mkasm="go run mkasm.go"
|
||||
mkerrors="$mkerrors -m64"
|
||||
mksyscall="go run mksyscall.go -openbsd -libc"
|
||||
mksysctl="go run mksysctl_openbsd.go"
|
||||
# Let the type of C char be signed for making the bare syscall
|
||||
# API consistent across platforms.
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
;;
|
||||
openbsd_riscv64)
|
||||
mkasm="go run mkasm.go"
|
||||
mkerrors="$mkerrors -m64"
|
||||
mksyscall="go run mksyscall.go -openbsd -libc"
|
||||
mksysctl="go run mksysctl_openbsd.go"
|
||||
# Let the type of C char be signed for making the bare syscall
|
||||
# API consistent across platforms.
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
;;
|
||||
solaris_amd64)
|
||||
mksyscall="go run mksyscall_solaris.go"
|
||||
mkerrors="$mkerrors -m64"
|
||||
|
||||
+2
-2
@@ -642,7 +642,7 @@ errors=$(
|
||||
signals=$(
|
||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
||||
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
|
||||
egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
|
||||
grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
|
||||
sort
|
||||
)
|
||||
|
||||
@@ -652,7 +652,7 @@ echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
|
||||
sort >_error.grep
|
||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
||||
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
|
||||
egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
|
||||
grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
|
||||
sort >_signal.grep
|
||||
|
||||
echo '// mkerrors.sh' "$@"
|
||||
|
||||
+14
@@ -52,6 +52,20 @@ func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) {
|
||||
return msgs, nil
|
||||
}
|
||||
|
||||
// ParseOneSocketControlMessage parses a single socket control message from b, returning the message header,
|
||||
// message data (a slice of b), and the remainder of b after that single message.
|
||||
// When there are no remaining messages, len(remainder) == 0.
|
||||
func ParseOneSocketControlMessage(b []byte) (hdr Cmsghdr, data []byte, remainder []byte, err error) {
|
||||
h, dbuf, err := socketControlMessageHeaderAndData(b)
|
||||
if err != nil {
|
||||
return Cmsghdr{}, nil, nil, err
|
||||
}
|
||||
if i := cmsgAlignOf(int(h.Len)); i < len(b) {
|
||||
remainder = b[i:]
|
||||
}
|
||||
return *h, dbuf, remainder, nil
|
||||
}
|
||||
|
||||
func socketControlMessageHeaderAndData(b []byte) (*Cmsghdr, []byte, error) {
|
||||
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
|
||||
if h.Len < SizeofCmsghdr || uint64(h.Len) > uint64(len(b)) {
|
||||
|
||||
-106
@@ -10,8 +10,6 @@
|
||||
package unix
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
@@ -79,107 +77,3 @@ func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error)
|
||||
|
||||
func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) {
|
||||
var clp, datap *strbuf
|
||||
if len(cl) > 0 {
|
||||
clp = &strbuf{
|
||||
Len: int32(len(cl)),
|
||||
Buf: (*int8)(unsafe.Pointer(&cl[0])),
|
||||
}
|
||||
}
|
||||
if len(data) > 0 {
|
||||
datap = &strbuf{
|
||||
Len: int32(len(data)),
|
||||
Buf: (*int8)(unsafe.Pointer(&data[0])),
|
||||
}
|
||||
}
|
||||
return putmsg(fd, clp, datap, flags)
|
||||
}
|
||||
|
||||
//sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error)
|
||||
|
||||
func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) {
|
||||
var clp, datap *strbuf
|
||||
if len(cl) > 0 {
|
||||
clp = &strbuf{
|
||||
Maxlen: int32(len(cl)),
|
||||
Buf: (*int8)(unsafe.Pointer(&cl[0])),
|
||||
}
|
||||
}
|
||||
if len(data) > 0 {
|
||||
datap = &strbuf{
|
||||
Maxlen: int32(len(data)),
|
||||
Buf: (*int8)(unsafe.Pointer(&data[0])),
|
||||
}
|
||||
}
|
||||
|
||||
if err = getmsg(fd, clp, datap, &flags); err != nil {
|
||||
return nil, nil, 0, err
|
||||
}
|
||||
|
||||
if len(cl) > 0 {
|
||||
retCl = cl[:clp.Len]
|
||||
}
|
||||
if len(data) > 0 {
|
||||
retData = data[:datap.Len]
|
||||
}
|
||||
return retCl, retData, flags, nil
|
||||
}
|
||||
|
||||
func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
|
||||
return ioctlRet(fd, req, uintptr(arg))
|
||||
}
|
||||
|
||||
func IoctlSetString(fd int, req uint, val string) error {
|
||||
bs := make([]byte, len(val)+1)
|
||||
copy(bs[:len(bs)-1], val)
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&bs[0])))
|
||||
runtime.KeepAlive(&bs[0])
|
||||
return err
|
||||
}
|
||||
|
||||
// Lifreq Helpers
|
||||
|
||||
func (l *Lifreq) SetName(name string) error {
|
||||
if len(name) >= len(l.Name) {
|
||||
return fmt.Errorf("name cannot be more than %d characters", len(l.Name)-1)
|
||||
}
|
||||
for i := range name {
|
||||
l.Name[i] = int8(name[i])
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *Lifreq) SetLifruInt(d int) {
|
||||
*(*int)(unsafe.Pointer(&l.Lifru[0])) = d
|
||||
}
|
||||
|
||||
func (l *Lifreq) GetLifruInt() int {
|
||||
return *(*int)(unsafe.Pointer(&l.Lifru[0]))
|
||||
}
|
||||
|
||||
func (l *Lifreq) SetLifruUint(d uint) {
|
||||
*(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
|
||||
}
|
||||
|
||||
func (l *Lifreq) GetLifruUint() uint {
|
||||
return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
|
||||
}
|
||||
|
||||
func IoctlLifreq(fd int, req uint, l *Lifreq) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
|
||||
}
|
||||
|
||||
// Strioctl Helpers
|
||||
|
||||
func (s *Strioctl) SetInt(i int) {
|
||||
s.Len = int32(unsafe.Sizeof(i))
|
||||
s.Dp = (*int8)(unsafe.Pointer(&i))
|
||||
}
|
||||
|
||||
func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
|
||||
return ioctlRet(fd, req, uintptr(unsafe.Pointer(s)))
|
||||
}
|
||||
+1
@@ -1554,6 +1554,7 @@ func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Sockle
|
||||
var iova [1]Iovec
|
||||
iova[0].Base = &dummy
|
||||
iova[0].SetLen(1)
|
||||
iov = iova[:]
|
||||
}
|
||||
}
|
||||
msg.Control = &oob[0]
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build (openbsd && 386) || (openbsd && amd64) || (openbsd && arm) || (openbsd && arm64)
|
||||
// +build openbsd,386 openbsd,amd64 openbsd,arm openbsd,arm64
|
||||
//go:build openbsd && !mips64
|
||||
// +build openbsd,!mips64
|
||||
|
||||
package unix
|
||||
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
// Copyright 2019 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.
|
||||
|
||||
//go:build ppc64 && openbsd
|
||||
// +build ppc64,openbsd
|
||||
|
||||
package unix
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
k.Ident = uint64(fd)
|
||||
k.Filter = int16(mode)
|
||||
k.Flags = uint16(flags)
|
||||
}
|
||||
|
||||
func (iov *Iovec) SetLen(length int) {
|
||||
iov.Len = uint64(length)
|
||||
}
|
||||
|
||||
func (msghdr *Msghdr) SetControllen(length int) {
|
||||
msghdr.Controllen = uint32(length)
|
||||
}
|
||||
|
||||
func (msghdr *Msghdr) SetIovlen(length int) {
|
||||
msghdr.Iovlen = uint32(length)
|
||||
}
|
||||
|
||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint32(length)
|
||||
}
|
||||
|
||||
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
|
||||
// of openbsd/ppc64 the syscall is called sysctl instead of __sysctl.
|
||||
const SYS___SYSCTL = SYS_SYSCTL
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
// Copyright 2019 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.
|
||||
|
||||
//go:build riscv64 && openbsd
|
||||
// +build riscv64,openbsd
|
||||
|
||||
package unix
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
k.Ident = uint64(fd)
|
||||
k.Filter = int16(mode)
|
||||
k.Flags = uint16(flags)
|
||||
}
|
||||
|
||||
func (iov *Iovec) SetLen(length int) {
|
||||
iov.Len = uint64(length)
|
||||
}
|
||||
|
||||
func (msghdr *Msghdr) SetControllen(length int) {
|
||||
msghdr.Controllen = uint32(length)
|
||||
}
|
||||
|
||||
func (msghdr *Msghdr) SetIovlen(length int) {
|
||||
msghdr.Iovlen = uint32(length)
|
||||
}
|
||||
|
||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint32(length)
|
||||
}
|
||||
|
||||
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
|
||||
// of openbsd/riscv64 the syscall is called sysctl instead of __sysctl.
|
||||
const SYS___SYSCTL = SYS_SYSCTL
|
||||
+104
@@ -1026,3 +1026,107 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
|
||||
}
|
||||
return valid, err
|
||||
}
|
||||
|
||||
//sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error)
|
||||
|
||||
func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) {
|
||||
var clp, datap *strbuf
|
||||
if len(cl) > 0 {
|
||||
clp = &strbuf{
|
||||
Len: int32(len(cl)),
|
||||
Buf: (*int8)(unsafe.Pointer(&cl[0])),
|
||||
}
|
||||
}
|
||||
if len(data) > 0 {
|
||||
datap = &strbuf{
|
||||
Len: int32(len(data)),
|
||||
Buf: (*int8)(unsafe.Pointer(&data[0])),
|
||||
}
|
||||
}
|
||||
return putmsg(fd, clp, datap, flags)
|
||||
}
|
||||
|
||||
//sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error)
|
||||
|
||||
func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) {
|
||||
var clp, datap *strbuf
|
||||
if len(cl) > 0 {
|
||||
clp = &strbuf{
|
||||
Maxlen: int32(len(cl)),
|
||||
Buf: (*int8)(unsafe.Pointer(&cl[0])),
|
||||
}
|
||||
}
|
||||
if len(data) > 0 {
|
||||
datap = &strbuf{
|
||||
Maxlen: int32(len(data)),
|
||||
Buf: (*int8)(unsafe.Pointer(&data[0])),
|
||||
}
|
||||
}
|
||||
|
||||
if err = getmsg(fd, clp, datap, &flags); err != nil {
|
||||
return nil, nil, 0, err
|
||||
}
|
||||
|
||||
if len(cl) > 0 {
|
||||
retCl = cl[:clp.Len]
|
||||
}
|
||||
if len(data) > 0 {
|
||||
retData = data[:datap.Len]
|
||||
}
|
||||
return retCl, retData, flags, nil
|
||||
}
|
||||
|
||||
func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
|
||||
return ioctlRet(fd, req, uintptr(arg))
|
||||
}
|
||||
|
||||
func IoctlSetString(fd int, req uint, val string) error {
|
||||
bs := make([]byte, len(val)+1)
|
||||
copy(bs[:len(bs)-1], val)
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&bs[0])))
|
||||
runtime.KeepAlive(&bs[0])
|
||||
return err
|
||||
}
|
||||
|
||||
// Lifreq Helpers
|
||||
|
||||
func (l *Lifreq) SetName(name string) error {
|
||||
if len(name) >= len(l.Name) {
|
||||
return fmt.Errorf("name cannot be more than %d characters", len(l.Name)-1)
|
||||
}
|
||||
for i := range name {
|
||||
l.Name[i] = int8(name[i])
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *Lifreq) SetLifruInt(d int) {
|
||||
*(*int)(unsafe.Pointer(&l.Lifru[0])) = d
|
||||
}
|
||||
|
||||
func (l *Lifreq) GetLifruInt() int {
|
||||
return *(*int)(unsafe.Pointer(&l.Lifru[0]))
|
||||
}
|
||||
|
||||
func (l *Lifreq) SetLifruUint(d uint) {
|
||||
*(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
|
||||
}
|
||||
|
||||
func (l *Lifreq) GetLifruUint() uint {
|
||||
return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
|
||||
}
|
||||
|
||||
func IoctlLifreq(fd int, req uint, l *Lifreq) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
|
||||
}
|
||||
|
||||
// Strioctl Helpers
|
||||
|
||||
func (s *Strioctl) SetInt(i int) {
|
||||
s.Len = int32(unsafe.Sizeof(i))
|
||||
s.Dp = (*int8)(unsafe.Pointer(&i))
|
||||
}
|
||||
|
||||
func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
|
||||
return ioctlRet(fd, req, uintptr(unsafe.Pointer(s)))
|
||||
}
|
||||
+2
-4
@@ -2,11 +2,9 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) && gc && !ppc64le && !ppc64
|
||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
//go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc
|
||||
// +build darwin dragonfly freebsd linux,!ppc64,!ppc64le netbsd openbsd solaris
|
||||
// +build gc
|
||||
// +build !ppc64le
|
||||
// +build !ppc64
|
||||
|
||||
package unix
|
||||
|
||||
|
||||
+172
-1
@@ -9,8 +9,10 @@ package unix
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
@@ -55,7 +57,13 @@ func (d *Dirent) NameString() string {
|
||||
if d == nil {
|
||||
return ""
|
||||
}
|
||||
return string(d.Name[:d.Namlen])
|
||||
s := string(d.Name[:])
|
||||
idx := strings.IndexByte(s, 0)
|
||||
if idx == -1 {
|
||||
return s
|
||||
} else {
|
||||
return s[:idx]
|
||||
}
|
||||
}
|
||||
|
||||
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
@@ -1230,6 +1238,14 @@ func Readdir(dir uintptr) (*Dirent, error) {
|
||||
return &ent, err
|
||||
}
|
||||
|
||||
func readdir_r(dirp uintptr, entry *direntLE, result **direntLE) (err error) {
|
||||
r0, _, e1 := syscall_syscall(SYS___READDIR_R_A, dirp, uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
|
||||
if int64(r0) == -1 {
|
||||
err = errnoErr(Errno(e1))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Closedir(dir uintptr) error {
|
||||
_, _, e := syscall_syscall(SYS_CLOSEDIR, dir, 0, 0)
|
||||
if e != 0 {
|
||||
@@ -1821,3 +1837,158 @@ func Unmount(name string, mtm int) (err error) {
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func fdToPath(dirfd int) (path string, err error) {
|
||||
var buffer [1024]byte
|
||||
// w_ctrl()
|
||||
ret := runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_W_IOCTL<<4,
|
||||
[]uintptr{uintptr(dirfd), 17, 1024, uintptr(unsafe.Pointer(&buffer[0]))})
|
||||
if ret == 0 {
|
||||
zb := bytes.IndexByte(buffer[:], 0)
|
||||
if zb == -1 {
|
||||
zb = len(buffer)
|
||||
}
|
||||
// __e2a_l()
|
||||
runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4,
|
||||
[]uintptr{uintptr(unsafe.Pointer(&buffer[0])), uintptr(zb)})
|
||||
return string(buffer[:zb]), nil
|
||||
}
|
||||
// __errno()
|
||||
errno := int(*(*int32)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4,
|
||||
[]uintptr{}))))
|
||||
// __errno2()
|
||||
errno2 := int(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO2<<4,
|
||||
[]uintptr{}))
|
||||
// strerror_r()
|
||||
ret = runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_STRERROR_R<<4,
|
||||
[]uintptr{uintptr(errno), uintptr(unsafe.Pointer(&buffer[0])), 1024})
|
||||
if ret == 0 {
|
||||
zb := bytes.IndexByte(buffer[:], 0)
|
||||
if zb == -1 {
|
||||
zb = len(buffer)
|
||||
}
|
||||
return "", fmt.Errorf("%s (errno2=0x%x)", buffer[:zb], errno2)
|
||||
} else {
|
||||
return "", fmt.Errorf("fdToPath errno %d (errno2=0x%x)", errno, errno2)
|
||||
}
|
||||
}
|
||||
|
||||
func direntLeToDirentUnix(dirent *direntLE, dir uintptr, path string) (Dirent, error) {
|
||||
var d Dirent
|
||||
|
||||
d.Ino = uint64(dirent.Ino)
|
||||
offset, err := Telldir(dir)
|
||||
if err != nil {
|
||||
return d, err
|
||||
}
|
||||
|
||||
d.Off = int64(offset)
|
||||
s := string(bytes.Split(dirent.Name[:], []byte{0})[0])
|
||||
copy(d.Name[:], s)
|
||||
|
||||
d.Reclen = uint16(24 + len(d.NameString()))
|
||||
var st Stat_t
|
||||
path = path + "/" + s
|
||||
err = Lstat(path, &st)
|
||||
if err != nil {
|
||||
return d, err
|
||||
}
|
||||
|
||||
d.Type = uint8(st.Mode >> 24)
|
||||
return d, err
|
||||
}
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
// Simulation of Getdirentries port from the Darwin implementation.
|
||||
// COMMENTS FROM DARWIN:
|
||||
// It's not the full required semantics, but should handle the case
|
||||
// of calling Getdirentries or ReadDirent repeatedly.
|
||||
// It won't handle assigning the results of lseek to *basep, or handle
|
||||
// the directory being edited underfoot.
|
||||
|
||||
skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
// Get path from fd to avoid unavailable call (fdopendir)
|
||||
path, err := fdToPath(fd)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
d, err := Opendir(path)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
defer Closedir(d)
|
||||
|
||||
var cnt int64
|
||||
for {
|
||||
var entryLE direntLE
|
||||
var entrypLE *direntLE
|
||||
e := readdir_r(d, &entryLE, &entrypLE)
|
||||
if e != nil {
|
||||
return n, e
|
||||
}
|
||||
if entrypLE == nil {
|
||||
break
|
||||
}
|
||||
if skip > 0 {
|
||||
skip--
|
||||
cnt++
|
||||
continue
|
||||
}
|
||||
|
||||
// Dirent on zos has a different structure
|
||||
entry, e := direntLeToDirentUnix(&entryLE, d, path)
|
||||
if e != nil {
|
||||
return n, e
|
||||
}
|
||||
|
||||
reclen := int(entry.Reclen)
|
||||
if reclen > len(buf) {
|
||||
// Not enough room. Return for now.
|
||||
// The counter will let us know where we should start up again.
|
||||
// Note: this strategy for suspending in the middle and
|
||||
// restarting is O(n^2) in the length of the directory. Oh well.
|
||||
break
|
||||
}
|
||||
|
||||
// Copy entry into return buffer.
|
||||
s := unsafe.Slice((*byte)(unsafe.Pointer(&entry)), reclen)
|
||||
copy(buf, s)
|
||||
|
||||
buf = buf[reclen:]
|
||||
n += reclen
|
||||
cnt++
|
||||
}
|
||||
// Set the seek offset of the input fd to record
|
||||
// how many files we've already returned.
|
||||
_, err = Seek(fd, cnt, 0 /* SEEK_SET */)
|
||||
if err != nil {
|
||||
return n, err
|
||||
}
|
||||
|
||||
return n, nil
|
||||
}
|
||||
|
||||
func ReadDirent(fd int, buf []byte) (n int, err error) {
|
||||
var base = (*uintptr)(unsafe.Pointer(new(uint64)))
|
||||
return Getdirentries(fd, buf, base)
|
||||
}
|
||||
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
reclen, ok := direntReclen(buf)
|
||||
if !ok {
|
||||
return 0, false
|
||||
}
|
||||
return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
|
||||
}
|
||||
+1905
File diff suppressed because it is too large.
Load diff
+1904
File diff suppressed because it is too large.
Load diff
+1
-27
@@ -15,25 +15,19 @@ import (
|
||||
//go:cgo_import_dynamic libc_writev writev "libc.so"
|
||||
//go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
|
||||
//go:cgo_import_dynamic libc_accept4 accept4 "libsocket.so"
|
||||
//go:cgo_import_dynamic libc_putmsg putmsg "libc.so"
|
||||
//go:cgo_import_dynamic libc_getmsg getmsg "libc.so"
|
||||
|
||||
//go:linkname procreadv libc_readv
|
||||
//go:linkname procpreadv libc_preadv
|
||||
//go:linkname procwritev libc_writev
|
||||
//go:linkname procpwritev libc_pwritev
|
||||
//go:linkname procaccept4 libc_accept4
|
||||
//go:linkname procputmsg libc_putmsg
|
||||
//go:linkname procgetmsg libc_getmsg
|
||||
|
||||
var (
|
||||
procreadv,
|
||||
procpreadv,
|
||||
procwritev,
|
||||
procpwritev,
|
||||
procaccept4,
|
||||
procputmsg,
|
||||
procgetmsg syscallFunc
|
||||
procaccept4 syscallFunc
|
||||
)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
@@ -106,23 +100,3 @@ func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) {
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procputmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) {
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(unsafe.Pointer(flags)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
+2221
File diff suppressed because it is too large.
Load diff
+796
@@ -0,0 +1,796 @@
|
||||
// go run mkasm.go openbsd ppc64
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getgroups(SB)
|
||||
RET
|
||||
GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_setgroups(SB)
|
||||
RET
|
||||
GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
|
||||
|
||||
TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_wait4(SB)
|
||||
RET
|
||||
GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
|
||||
|
||||
TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_accept(SB)
|
||||
RET
|
||||
GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
|
||||
|
||||
TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_bind(SB)
|
||||
RET
|
||||
GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
|
||||
|
||||
TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_connect(SB)
|
||||
RET
|
||||
GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
|
||||
|
||||
TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_socket(SB)
|
||||
RET
|
||||
GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getsockopt(SB)
|
||||
RET
|
||||
GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_setsockopt(SB)
|
||||
RET
|
||||
GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getpeername(SB)
|
||||
RET
|
||||
GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getsockname(SB)
|
||||
RET
|
||||
GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
|
||||
|
||||
TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_shutdown(SB)
|
||||
RET
|
||||
GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
|
||||
|
||||
TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_socketpair(SB)
|
||||
RET
|
||||
GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
|
||||
|
||||
TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_recvfrom(SB)
|
||||
RET
|
||||
GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
|
||||
|
||||
TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_sendto(SB)
|
||||
RET
|
||||
GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
|
||||
|
||||
TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_recvmsg(SB)
|
||||
RET
|
||||
GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
|
||||
|
||||
TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_sendmsg(SB)
|
||||
RET
|
||||
GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
|
||||
|
||||
TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_kevent(SB)
|
||||
RET
|
||||
GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
|
||||
|
||||
TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_utimes(SB)
|
||||
RET
|
||||
GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
|
||||
|
||||
TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_futimes(SB)
|
||||
RET
|
||||
GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
|
||||
|
||||
TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_poll(SB)
|
||||
RET
|
||||
GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
|
||||
|
||||
TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_madvise(SB)
|
||||
RET
|
||||
GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_mlock(SB)
|
||||
RET
|
||||
GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_mlockall(SB)
|
||||
RET
|
||||
GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_mprotect(SB)
|
||||
RET
|
||||
GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
|
||||
|
||||
TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_msync(SB)
|
||||
RET
|
||||
GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
|
||||
|
||||
TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_munlock(SB)
|
||||
RET
|
||||
GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
|
||||
|
||||
TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_munlockall(SB)
|
||||
RET
|
||||
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_pipe2(SB)
|
||||
RET
|
||||
GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getdents(SB)
|
||||
RET
|
||||
GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getcwd(SB)
|
||||
RET
|
||||
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_ioctl(SB)
|
||||
RET
|
||||
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
|
||||
|
||||
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_sysctl(SB)
|
||||
RET
|
||||
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_ppoll(SB)
|
||||
RET
|
||||
GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)
|
||||
|
||||
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_access(SB)
|
||||
RET
|
||||
GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
|
||||
|
||||
TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_adjtime(SB)
|
||||
RET
|
||||
GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
|
||||
|
||||
TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_chdir(SB)
|
||||
RET
|
||||
GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_chflags(SB)
|
||||
RET
|
||||
GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
|
||||
|
||||
TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_chmod(SB)
|
||||
RET
|
||||
GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
|
||||
|
||||
TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_chown(SB)
|
||||
RET
|
||||
GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
|
||||
|
||||
TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_chroot(SB)
|
||||
RET
|
||||
GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
|
||||
|
||||
TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_close(SB)
|
||||
RET
|
||||
GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
|
||||
|
||||
TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_dup(SB)
|
||||
RET
|
||||
GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
|
||||
|
||||
TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_dup2(SB)
|
||||
RET
|
||||
GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
|
||||
|
||||
TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_dup3(SB)
|
||||
RET
|
||||
GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)
|
||||
|
||||
TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_exit(SB)
|
||||
RET
|
||||
GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
|
||||
|
||||
TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_faccessat(SB)
|
||||
RET
|
||||
GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_fchdir(SB)
|
||||
RET
|
||||
GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_fchflags(SB)
|
||||
RET
|
||||
GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_fchmod(SB)
|
||||
RET
|
||||
GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_fchmodat(SB)
|
||||
RET
|
||||
GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_fchown(SB)
|
||||
RET
|
||||
GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_fchownat(SB)
|
||||
RET
|
||||
GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_flock(SB)
|
||||
RET
|
||||
GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_fpathconf(SB)
|
||||
RET
|
||||
GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_fstat(SB)
|
||||
RET
|
||||
GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_fstatat(SB)
|
||||
RET
|
||||
GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_fstatfs(SB)
|
||||
RET
|
||||
GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_fsync(SB)
|
||||
RET
|
||||
GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_ftruncate(SB)
|
||||
RET
|
||||
GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getegid(SB)
|
||||
RET
|
||||
GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_geteuid(SB)
|
||||
RET
|
||||
GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getgid(SB)
|
||||
RET
|
||||
GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getpgid(SB)
|
||||
RET
|
||||
GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getpgrp(SB)
|
||||
RET
|
||||
GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getpid(SB)
|
||||
RET
|
||||
GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getppid(SB)
|
||||
RET
|
||||
GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getpriority(SB)
|
||||
RET
|
||||
GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getrlimit(SB)
|
||||
RET
|
||||
GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getrtable(SB)
|
||||
RET
|
||||
GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getrusage(SB)
|
||||
RET
|
||||
GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getsid(SB)
|
||||
RET
|
||||
GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_gettimeofday(SB)
|
||||
RET
|
||||
GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getuid(SB)
|
||||
RET
|
||||
GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_issetugid(SB)
|
||||
RET
|
||||
GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_kill(SB)
|
||||
RET
|
||||
GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
|
||||
|
||||
TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_kqueue(SB)
|
||||
RET
|
||||
GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
|
||||
|
||||
TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_lchown(SB)
|
||||
RET
|
||||
GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
|
||||
|
||||
TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_link(SB)
|
||||
RET
|
||||
GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
|
||||
|
||||
TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_linkat(SB)
|
||||
RET
|
||||
GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_listen(SB)
|
||||
RET
|
||||
GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
|
||||
|
||||
TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_lstat(SB)
|
||||
RET
|
||||
GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_mkdir(SB)
|
||||
RET
|
||||
GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_mkdirat(SB)
|
||||
RET
|
||||
GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_mkfifo(SB)
|
||||
RET
|
||||
GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_mkfifoat(SB)
|
||||
RET
|
||||
GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_mknod(SB)
|
||||
RET
|
||||
GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_mknodat(SB)
|
||||
RET
|
||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_nanosleep(SB)
|
||||
RET
|
||||
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)
|
||||
|
||||
TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_open(SB)
|
||||
RET
|
||||
GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
|
||||
|
||||
TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_openat(SB)
|
||||
RET
|
||||
GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_pathconf(SB)
|
||||
RET
|
||||
GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_pread(SB)
|
||||
RET
|
||||
GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_pwrite(SB)
|
||||
RET
|
||||
GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
|
||||
|
||||
TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_read(SB)
|
||||
RET
|
||||
GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_readlink(SB)
|
||||
RET
|
||||
GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_readlinkat(SB)
|
||||
RET
|
||||
GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_rename(SB)
|
||||
RET
|
||||
GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
|
||||
|
||||
TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_renameat(SB)
|
||||
RET
|
||||
GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_revoke(SB)
|
||||
RET
|
||||
GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
|
||||
|
||||
TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_rmdir(SB)
|
||||
RET
|
||||
GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_lseek(SB)
|
||||
RET
|
||||
GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
|
||||
|
||||
TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_select(SB)
|
||||
RET
|
||||
GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_setegid(SB)
|
||||
RET
|
||||
GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_seteuid(SB)
|
||||
RET
|
||||
GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_setgid(SB)
|
||||
RET
|
||||
GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_setlogin(SB)
|
||||
RET
|
||||
GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_setpgid(SB)
|
||||
RET
|
||||
GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_setpriority(SB)
|
||||
RET
|
||||
GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_setregid(SB)
|
||||
RET
|
||||
GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_setreuid(SB)
|
||||
RET
|
||||
GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_setresgid(SB)
|
||||
RET
|
||||
GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_setresuid(SB)
|
||||
RET
|
||||
GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_setrlimit(SB)
|
||||
RET
|
||||
GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_setrtable(SB)
|
||||
RET
|
||||
GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_setsid(SB)
|
||||
RET
|
||||
GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_settimeofday(SB)
|
||||
RET
|
||||
GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_setuid(SB)
|
||||
RET
|
||||
GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_stat(SB)
|
||||
RET
|
||||
GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_statfs(SB)
|
||||
RET
|
||||
GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)
|
||||
|
||||
TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_symlink(SB)
|
||||
RET
|
||||
GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
|
||||
|
||||
TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_symlinkat(SB)
|
||||
RET
|
||||
GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_sync(SB)
|
||||
RET
|
||||
GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
|
||||
|
||||
TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_truncate(SB)
|
||||
RET
|
||||
GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
|
||||
|
||||
TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_umask(SB)
|
||||
RET
|
||||
GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
|
||||
|
||||
TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_unlink(SB)
|
||||
RET
|
||||
GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
|
||||
|
||||
TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_unlinkat(SB)
|
||||
RET
|
||||
GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_unmount(SB)
|
||||
RET
|
||||
GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
|
||||
|
||||
TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_write(SB)
|
||||
RET
|
||||
GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_mmap(SB)
|
||||
RET
|
||||
GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
|
||||
|
||||
TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_munmap(SB)
|
||||
RET
|
||||
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
|
||||
|
||||
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_utimensat(SB)
|
||||
RET
|
||||
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
|
||||
+2221
File diff suppressed because it is too large.
Load diff
+796
@@ -0,0 +1,796 @@
|
||||
// go run mkasm.go openbsd riscv64
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getgroups(SB)
|
||||
|
||||
GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setgroups(SB)
|
||||
|
||||
GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
|
||||
|
||||
TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_wait4(SB)
|
||||
|
||||
GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
|
||||
|
||||
TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_accept(SB)
|
||||
|
||||
GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
|
||||
|
||||
TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_bind(SB)
|
||||
|
||||
GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
|
||||
|
||||
TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_connect(SB)
|
||||
|
||||
GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
|
||||
|
||||
TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_socket(SB)
|
||||
|
||||
GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getsockopt(SB)
|
||||
|
||||
GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setsockopt(SB)
|
||||
|
||||
GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpeername(SB)
|
||||
|
||||
GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getsockname(SB)
|
||||
|
||||
GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
|
||||
|
||||
TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_shutdown(SB)
|
||||
|
||||
GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
|
||||
|
||||
TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_socketpair(SB)
|
||||
|
||||
GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
|
||||
|
||||
TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_recvfrom(SB)
|
||||
|
||||
GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
|
||||
|
||||
TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendto(SB)
|
||||
|
||||
GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
|
||||
|
||||
TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_recvmsg(SB)
|
||||
|
||||
GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
|
||||
|
||||
TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendmsg(SB)
|
||||
|
||||
GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
|
||||
|
||||
TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_kevent(SB)
|
||||
|
||||
GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
|
||||
|
||||
TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_utimes(SB)
|
||||
|
||||
GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
|
||||
|
||||
TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_futimes(SB)
|
||||
|
||||
GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
|
||||
|
||||
TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_poll(SB)
|
||||
|
||||
GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
|
||||
|
||||
TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_madvise(SB)
|
||||
|
||||
GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mlock(SB)
|
||||
|
||||
GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mlockall(SB)
|
||||
|
||||
GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mprotect(SB)
|
||||
|
||||
GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
|
||||
|
||||
TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_msync(SB)
|
||||
|
||||
GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
|
||||
|
||||
TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_munlock(SB)
|
||||
|
||||
GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
|
||||
|
||||
TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_munlockall(SB)
|
||||
|
||||
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_pipe2(SB)
|
||||
|
||||
GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getdents(SB)
|
||||
|
||||
GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getcwd(SB)
|
||||
|
||||
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_ioctl(SB)
|
||||
|
||||
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
|
||||
|
||||
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_sysctl(SB)
|
||||
|
||||
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_ppoll(SB)
|
||||
|
||||
GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)
|
||||
|
||||
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_access(SB)
|
||||
|
||||
GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
|
||||
|
||||
TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_adjtime(SB)
|
||||
|
||||
GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
|
||||
|
||||
TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_chdir(SB)
|
||||
|
||||
GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_chflags(SB)
|
||||
|
||||
GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
|
||||
|
||||
TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_chmod(SB)
|
||||
|
||||
GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
|
||||
|
||||
TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_chown(SB)
|
||||
|
||||
GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
|
||||
|
||||
TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_chroot(SB)
|
||||
|
||||
GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
|
||||
|
||||
TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_close(SB)
|
||||
|
||||
GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
|
||||
|
||||
TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_dup(SB)
|
||||
|
||||
GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
|
||||
|
||||
TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_dup2(SB)
|
||||
|
||||
GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
|
||||
|
||||
TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_dup3(SB)
|
||||
|
||||
GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)
|
||||
|
||||
TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_exit(SB)
|
||||
|
||||
GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
|
||||
|
||||
TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_faccessat(SB)
|
||||
|
||||
GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchdir(SB)
|
||||
|
||||
GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchflags(SB)
|
||||
|
||||
GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchmod(SB)
|
||||
|
||||
GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchmodat(SB)
|
||||
|
||||
GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchown(SB)
|
||||
|
||||
GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchownat(SB)
|
||||
|
||||
GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_flock(SB)
|
||||
|
||||
GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fpathconf(SB)
|
||||
|
||||
GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstat(SB)
|
||||
|
||||
GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstatat(SB)
|
||||
|
||||
GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstatfs(SB)
|
||||
|
||||
GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fsync(SB)
|
||||
|
||||
GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_ftruncate(SB)
|
||||
|
||||
GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getegid(SB)
|
||||
|
||||
GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_geteuid(SB)
|
||||
|
||||
GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getgid(SB)
|
||||
|
||||
GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpgid(SB)
|
||||
|
||||
GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpgrp(SB)
|
||||
|
||||
GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpid(SB)
|
||||
|
||||
GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getppid(SB)
|
||||
|
||||
GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpriority(SB)
|
||||
|
||||
GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getrlimit(SB)
|
||||
|
||||
GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getrtable(SB)
|
||||
|
||||
GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getrusage(SB)
|
||||
|
||||
GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getsid(SB)
|
||||
|
||||
GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_gettimeofday(SB)
|
||||
|
||||
GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getuid(SB)
|
||||
|
||||
GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_issetugid(SB)
|
||||
|
||||
GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_kill(SB)
|
||||
|
||||
GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
|
||||
|
||||
TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_kqueue(SB)
|
||||
|
||||
GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
|
||||
|
||||
TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_lchown(SB)
|
||||
|
||||
GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
|
||||
|
||||
TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_link(SB)
|
||||
|
||||
GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
|
||||
|
||||
TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_linkat(SB)
|
||||
|
||||
GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_listen(SB)
|
||||
|
||||
GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
|
||||
|
||||
TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_lstat(SB)
|
||||
|
||||
GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkdir(SB)
|
||||
|
||||
GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkdirat(SB)
|
||||
|
||||
GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkfifo(SB)
|
||||
|
||||
GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkfifoat(SB)
|
||||
|
||||
GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mknod(SB)
|
||||
|
||||
GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mknodat(SB)
|
||||
|
||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_nanosleep(SB)
|
||||
|
||||
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)
|
||||
|
||||
TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_open(SB)
|
||||
|
||||
GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
|
||||
|
||||
TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_openat(SB)
|
||||
|
||||
GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_pathconf(SB)
|
||||
|
||||
GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_pread(SB)
|
||||
|
||||
GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_pwrite(SB)
|
||||
|
||||
GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
|
||||
|
||||
TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_read(SB)
|
||||
|
||||
GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_readlink(SB)
|
||||
|
||||
GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_readlinkat(SB)
|
||||
|
||||
GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_rename(SB)
|
||||
|
||||
GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
|
||||
|
||||
TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_renameat(SB)
|
||||
|
||||
GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_revoke(SB)
|
||||
|
||||
GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
|
||||
|
||||
TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_rmdir(SB)
|
||||
|
||||
GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
|
||||
|
||||
TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_lseek(SB)
|
||||
|
||||
GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
|
||||
|
||||
TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_select(SB)
|
||||
|
||||
GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setegid(SB)
|
||||
|
||||
GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_seteuid(SB)
|
||||
|
||||
GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setgid(SB)
|
||||
|
||||
GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setlogin(SB)
|
||||
|
||||
GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setpgid(SB)
|
||||
|
||||
GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setpriority(SB)
|
||||
|
||||
GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setregid(SB)
|
||||
|
||||
GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setreuid(SB)
|
||||
|
||||
GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setresgid(SB)
|
||||
|
||||
GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setresuid(SB)
|
||||
|
||||
GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setrlimit(SB)
|
||||
|
||||
GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setrtable(SB)
|
||||
|
||||
GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setsid(SB)
|
||||
|
||||
GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_settimeofday(SB)
|
||||
|
||||
GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
|
||||
|
||||
TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_setuid(SB)
|
||||
|
||||
GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_stat(SB)
|
||||
|
||||
GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_statfs(SB)
|
||||
|
||||
GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)
|
||||
|
||||
TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_symlink(SB)
|
||||
|
||||
GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
|
||||
|
||||
TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_symlinkat(SB)
|
||||
|
||||
GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_sync(SB)
|
||||
|
||||
GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
|
||||
|
||||
TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_truncate(SB)
|
||||
|
||||
GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
|
||||
|
||||
TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_umask(SB)
|
||||
|
||||
GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
|
||||
|
||||
TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_unlink(SB)
|
||||
|
||||
GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
|
||||
|
||||
TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_unlinkat(SB)
|
||||
|
||||
GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
|
||||
|
||||
TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_unmount(SB)
|
||||
|
||||
GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
|
||||
|
||||
TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_write(SB)
|
||||
|
||||
GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
|
||||
|
||||
TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_mmap(SB)
|
||||
|
||||
GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
|
||||
|
||||
TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_munmap(SB)
|
||||
|
||||
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
|
||||
|
||||
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_utimensat(SB)
|
||||
|
||||
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
|
||||
+27
-1
@@ -147,6 +147,8 @@ import (
|
||||
//go:cgo_import_dynamic libc_port_dissociate port_dissociate "libc.so"
|
||||
//go:cgo_import_dynamic libc_port_get port_get "libc.so"
|
||||
//go:cgo_import_dynamic libc_port_getn port_getn "libc.so"
|
||||
//go:cgo_import_dynamic libc_putmsg putmsg "libc.so"
|
||||
//go:cgo_import_dynamic libc_getmsg getmsg "libc.so"
|
||||
|
||||
//go:linkname procpipe libc_pipe
|
||||
//go:linkname procpipe2 libc_pipe2
|
||||
@@ -284,6 +286,8 @@ import (
|
||||
//go:linkname procport_dissociate libc_port_dissociate
|
||||
//go:linkname procport_get libc_port_get
|
||||
//go:linkname procport_getn libc_port_getn
|
||||
//go:linkname procputmsg libc_putmsg
|
||||
//go:linkname procgetmsg libc_getmsg
|
||||
|
||||
var (
|
||||
procpipe,
|
||||
@@ -421,7 +425,9 @@ var (
|
||||
procport_associate,
|
||||
procport_dissociate,
|
||||
procport_get,
|
||||
procport_getn syscallFunc
|
||||
procport_getn,
|
||||
procputmsg,
|
||||
procgetmsg syscallFunc
|
||||
)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
@@ -2065,3 +2071,23 @@ func port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Times
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) {
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procputmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) {
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(unsafe.Pointer(flags)), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
+281
@@ -0,0 +1,281 @@
|
||||
// go run mksysctl_openbsd.go
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
//go:build ppc64 && openbsd
|
||||
// +build ppc64,openbsd
|
||||
|
||||
package unix
|
||||
|
||||
type mibentry struct {
|
||||
ctlname string
|
||||
ctloid []_C_int
|
||||
}
|
||||
|
||||
var sysctlMib = []mibentry{
|
||||
{"ddb.console", []_C_int{9, 6}},
|
||||
{"ddb.log", []_C_int{9, 7}},
|
||||
{"ddb.max_line", []_C_int{9, 3}},
|
||||
{"ddb.max_width", []_C_int{9, 2}},
|
||||
{"ddb.panic", []_C_int{9, 5}},
|
||||
{"ddb.profile", []_C_int{9, 9}},
|
||||
{"ddb.radix", []_C_int{9, 1}},
|
||||
{"ddb.tab_stop_width", []_C_int{9, 4}},
|
||||
{"ddb.trigger", []_C_int{9, 8}},
|
||||
{"fs.posix.setuid", []_C_int{3, 1, 1}},
|
||||
{"hw.allowpowerdown", []_C_int{6, 22}},
|
||||
{"hw.byteorder", []_C_int{6, 4}},
|
||||
{"hw.cpuspeed", []_C_int{6, 12}},
|
||||
{"hw.diskcount", []_C_int{6, 10}},
|
||||
{"hw.disknames", []_C_int{6, 8}},
|
||||
{"hw.diskstats", []_C_int{6, 9}},
|
||||
{"hw.machine", []_C_int{6, 1}},
|
||||
{"hw.model", []_C_int{6, 2}},
|
||||
{"hw.ncpu", []_C_int{6, 3}},
|
||||
{"hw.ncpufound", []_C_int{6, 21}},
|
||||
{"hw.ncpuonline", []_C_int{6, 25}},
|
||||
{"hw.pagesize", []_C_int{6, 7}},
|
||||
{"hw.perfpolicy", []_C_int{6, 23}},
|
||||
{"hw.physmem", []_C_int{6, 19}},
|
||||
{"hw.power", []_C_int{6, 26}},
|
||||
{"hw.product", []_C_int{6, 15}},
|
||||
{"hw.serialno", []_C_int{6, 17}},
|
||||
{"hw.setperf", []_C_int{6, 13}},
|
||||
{"hw.smt", []_C_int{6, 24}},
|
||||
{"hw.usermem", []_C_int{6, 20}},
|
||||
{"hw.uuid", []_C_int{6, 18}},
|
||||
{"hw.vendor", []_C_int{6, 14}},
|
||||
{"hw.version", []_C_int{6, 16}},
|
||||
{"kern.allowdt", []_C_int{1, 65}},
|
||||
{"kern.allowkmem", []_C_int{1, 52}},
|
||||
{"kern.argmax", []_C_int{1, 8}},
|
||||
{"kern.audio", []_C_int{1, 84}},
|
||||
{"kern.boottime", []_C_int{1, 21}},
|
||||
{"kern.bufcachepercent", []_C_int{1, 72}},
|
||||
{"kern.ccpu", []_C_int{1, 45}},
|
||||
{"kern.clockrate", []_C_int{1, 12}},
|
||||
{"kern.consbuf", []_C_int{1, 83}},
|
||||
{"kern.consbufsize", []_C_int{1, 82}},
|
||||
{"kern.consdev", []_C_int{1, 75}},
|
||||
{"kern.cp_time", []_C_int{1, 40}},
|
||||
{"kern.cp_time2", []_C_int{1, 71}},
|
||||
{"kern.cpustats", []_C_int{1, 85}},
|
||||
{"kern.domainname", []_C_int{1, 22}},
|
||||
{"kern.file", []_C_int{1, 73}},
|
||||
{"kern.forkstat", []_C_int{1, 42}},
|
||||
{"kern.fscale", []_C_int{1, 46}},
|
||||
{"kern.fsync", []_C_int{1, 33}},
|
||||
{"kern.global_ptrace", []_C_int{1, 81}},
|
||||
{"kern.hostid", []_C_int{1, 11}},
|
||||
{"kern.hostname", []_C_int{1, 10}},
|
||||
{"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}},
|
||||
{"kern.job_control", []_C_int{1, 19}},
|
||||
{"kern.malloc.buckets", []_C_int{1, 39, 1}},
|
||||
{"kern.malloc.kmemnames", []_C_int{1, 39, 3}},
|
||||
{"kern.maxclusters", []_C_int{1, 67}},
|
||||
{"kern.maxfiles", []_C_int{1, 7}},
|
||||
{"kern.maxlocksperuid", []_C_int{1, 70}},
|
||||
{"kern.maxpartitions", []_C_int{1, 23}},
|
||||
{"kern.maxproc", []_C_int{1, 6}},
|
||||
{"kern.maxthread", []_C_int{1, 25}},
|
||||
{"kern.maxvnodes", []_C_int{1, 5}},
|
||||
{"kern.mbstat", []_C_int{1, 59}},
|
||||
{"kern.msgbuf", []_C_int{1, 48}},
|
||||
{"kern.msgbufsize", []_C_int{1, 38}},
|
||||
{"kern.nchstats", []_C_int{1, 41}},
|
||||
{"kern.netlivelocks", []_C_int{1, 76}},
|
||||
{"kern.nfiles", []_C_int{1, 56}},
|
||||
{"kern.ngroups", []_C_int{1, 18}},
|
||||
{"kern.nosuidcoredump", []_C_int{1, 32}},
|
||||
{"kern.nprocs", []_C_int{1, 47}},
|
||||
{"kern.nthreads", []_C_int{1, 26}},
|
||||
{"kern.numvnodes", []_C_int{1, 58}},
|
||||
{"kern.osrelease", []_C_int{1, 2}},
|
||||
{"kern.osrevision", []_C_int{1, 3}},
|
||||
{"kern.ostype", []_C_int{1, 1}},
|
||||
{"kern.osversion", []_C_int{1, 27}},
|
||||
{"kern.pfstatus", []_C_int{1, 86}},
|
||||
{"kern.pool_debug", []_C_int{1, 77}},
|
||||
{"kern.posix1version", []_C_int{1, 17}},
|
||||
{"kern.proc", []_C_int{1, 66}},
|
||||
{"kern.rawpartition", []_C_int{1, 24}},
|
||||
{"kern.saved_ids", []_C_int{1, 20}},
|
||||
{"kern.securelevel", []_C_int{1, 9}},
|
||||
{"kern.seminfo", []_C_int{1, 61}},
|
||||
{"kern.shminfo", []_C_int{1, 62}},
|
||||
{"kern.somaxconn", []_C_int{1, 28}},
|
||||
{"kern.sominconn", []_C_int{1, 29}},
|
||||
{"kern.splassert", []_C_int{1, 54}},
|
||||
{"kern.stackgap_random", []_C_int{1, 50}},
|
||||
{"kern.sysvipc_info", []_C_int{1, 51}},
|
||||
{"kern.sysvmsg", []_C_int{1, 34}},
|
||||
{"kern.sysvsem", []_C_int{1, 35}},
|
||||
{"kern.sysvshm", []_C_int{1, 36}},
|
||||
{"kern.timecounter.choice", []_C_int{1, 69, 4}},
|
||||
{"kern.timecounter.hardware", []_C_int{1, 69, 3}},
|
||||
{"kern.timecounter.tick", []_C_int{1, 69, 1}},
|
||||
{"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}},
|
||||
{"kern.timeout_stats", []_C_int{1, 87}},
|
||||
{"kern.tty.tk_cancc", []_C_int{1, 44, 4}},
|
||||
{"kern.tty.tk_nin", []_C_int{1, 44, 1}},
|
||||
{"kern.tty.tk_nout", []_C_int{1, 44, 2}},
|
||||
{"kern.tty.tk_rawcc", []_C_int{1, 44, 3}},
|
||||
{"kern.tty.ttyinfo", []_C_int{1, 44, 5}},
|
||||
{"kern.ttycount", []_C_int{1, 57}},
|
||||
{"kern.utc_offset", []_C_int{1, 88}},
|
||||
{"kern.version", []_C_int{1, 4}},
|
||||
{"kern.video", []_C_int{1, 89}},
|
||||
{"kern.watchdog.auto", []_C_int{1, 64, 2}},
|
||||
{"kern.watchdog.period", []_C_int{1, 64, 1}},
|
||||
{"kern.witnesswatch", []_C_int{1, 53}},
|
||||
{"kern.wxabort", []_C_int{1, 74}},
|
||||
{"net.bpf.bufsize", []_C_int{4, 31, 1}},
|
||||
{"net.bpf.maxbufsize", []_C_int{4, 31, 2}},
|
||||
{"net.inet.ah.enable", []_C_int{4, 2, 51, 1}},
|
||||
{"net.inet.ah.stats", []_C_int{4, 2, 51, 2}},
|
||||
{"net.inet.carp.allow", []_C_int{4, 2, 112, 1}},
|
||||
{"net.inet.carp.log", []_C_int{4, 2, 112, 3}},
|
||||
{"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}},
|
||||
{"net.inet.carp.stats", []_C_int{4, 2, 112, 4}},
|
||||
{"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}},
|
||||
{"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}},
|
||||
{"net.inet.divert.stats", []_C_int{4, 2, 258, 3}},
|
||||
{"net.inet.esp.enable", []_C_int{4, 2, 50, 1}},
|
||||
{"net.inet.esp.stats", []_C_int{4, 2, 50, 4}},
|
||||
{"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}},
|
||||
{"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}},
|
||||
{"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}},
|
||||
{"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}},
|
||||
{"net.inet.gre.allow", []_C_int{4, 2, 47, 1}},
|
||||
{"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}},
|
||||
{"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}},
|
||||
{"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}},
|
||||
{"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}},
|
||||
{"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}},
|
||||
{"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}},
|
||||
{"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}},
|
||||
{"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}},
|
||||
{"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}},
|
||||
{"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}},
|
||||
{"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}},
|
||||
{"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}},
|
||||
{"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}},
|
||||
{"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}},
|
||||
{"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}},
|
||||
{"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}},
|
||||
{"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}},
|
||||
{"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}},
|
||||
{"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}},
|
||||
{"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}},
|
||||
{"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}},
|
||||
{"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}},
|
||||
{"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}},
|
||||
{"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}},
|
||||
{"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}},
|
||||
{"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}},
|
||||
{"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}},
|
||||
{"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}},
|
||||
{"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}},
|
||||
{"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}},
|
||||
{"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}},
|
||||
{"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}},
|
||||
{"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}},
|
||||
{"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}},
|
||||
{"net.inet.ip.stats", []_C_int{4, 2, 0, 33}},
|
||||
{"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}},
|
||||
{"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}},
|
||||
{"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}},
|
||||
{"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}},
|
||||
{"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}},
|
||||
{"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}},
|
||||
{"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}},
|
||||
{"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}},
|
||||
{"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}},
|
||||
{"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}},
|
||||
{"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}},
|
||||
{"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}},
|
||||
{"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}},
|
||||
{"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}},
|
||||
{"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}},
|
||||
{"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}},
|
||||
{"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}},
|
||||
{"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}},
|
||||
{"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}},
|
||||
{"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}},
|
||||
{"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}},
|
||||
{"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}},
|
||||
{"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}},
|
||||
{"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}},
|
||||
{"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}},
|
||||
{"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}},
|
||||
{"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}},
|
||||
{"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}},
|
||||
{"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}},
|
||||
{"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}},
|
||||
{"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}},
|
||||
{"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}},
|
||||
{"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}},
|
||||
{"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}},
|
||||
{"net.inet.udp.stats", []_C_int{4, 2, 17, 5}},
|
||||
{"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}},
|
||||
{"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}},
|
||||
{"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}},
|
||||
{"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}},
|
||||
{"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}},
|
||||
{"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}},
|
||||
{"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}},
|
||||
{"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}},
|
||||
{"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}},
|
||||
{"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}},
|
||||
{"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}},
|
||||
{"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}},
|
||||
{"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}},
|
||||
{"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}},
|
||||
{"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}},
|
||||
{"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}},
|
||||
{"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}},
|
||||
{"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}},
|
||||
{"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}},
|
||||
{"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}},
|
||||
{"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}},
|
||||
{"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}},
|
||||
{"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}},
|
||||
{"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}},
|
||||
{"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}},
|
||||
{"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}},
|
||||
{"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}},
|
||||
{"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}},
|
||||
{"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}},
|
||||
{"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}},
|
||||
{"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}},
|
||||
{"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}},
|
||||
{"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}},
|
||||
{"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}},
|
||||
{"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}},
|
||||
{"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}},
|
||||
{"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}},
|
||||
{"net.key.sadb_dump", []_C_int{4, 30, 1}},
|
||||
{"net.key.spd_dump", []_C_int{4, 30, 2}},
|
||||
{"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}},
|
||||
{"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}},
|
||||
{"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}},
|
||||
{"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}},
|
||||
{"net.mpls.mapttl_ip", []_C_int{4, 33, 5}},
|
||||
{"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}},
|
||||
{"net.mpls.ttl", []_C_int{4, 33, 2}},
|
||||
{"net.pflow.stats", []_C_int{4, 34, 1}},
|
||||
{"net.pipex.enable", []_C_int{4, 35, 1}},
|
||||
{"vm.anonmin", []_C_int{2, 7}},
|
||||
{"vm.loadavg", []_C_int{2, 2}},
|
||||
{"vm.malloc_conf", []_C_int{2, 12}},
|
||||
{"vm.maxslp", []_C_int{2, 10}},
|
||||
{"vm.nkmempages", []_C_int{2, 6}},
|
||||
{"vm.psstrings", []_C_int{2, 3}},
|
||||
{"vm.swapencrypt.enable", []_C_int{2, 5, 0}},
|
||||
{"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}},
|
||||
{"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}},
|
||||
{"vm.uspace", []_C_int{2, 11}},
|
||||
{"vm.uvmexp", []_C_int{2, 4}},
|
||||
{"vm.vmmeter", []_C_int{2, 1}},
|
||||
{"vm.vnodemin", []_C_int{2, 9}},
|
||||
{"vm.vtextmin", []_C_int{2, 8}},
|
||||
}
|
||||
Loaded 100 of 113 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user