Update deps
This commit is contained in:
8
go.mod
8
go.mod
@@ -3,9 +3,9 @@ module github.com/eleksir/i3status-go
|
|||||||
go 1.21
|
go 1.21
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/adrg/xdg v0.4.0
|
github.com/adrg/xdg v0.5.0
|
||||||
github.com/distatus/battery v0.11.0
|
github.com/distatus/battery v0.11.0
|
||||||
github.com/go-co-op/gocron/v2 v2.2.9
|
github.com/go-co-op/gocron/v2 v2.11.0
|
||||||
github.com/hjson/hjson-go v3.3.0+incompatible
|
github.com/hjson/hjson-go v3.3.0+incompatible
|
||||||
github.com/mafik/pulseaudio v0.0.0-20240327130323-384e01075e6e
|
github.com/mafik/pulseaudio v0.0.0-20240327130323-384e01075e6e
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible
|
github.com/shirou/gopsutil v3.21.11+incompatible
|
||||||
@@ -20,7 +20,7 @@ require (
|
|||||||
github.com/jonboulle/clockwork v0.4.0 // indirect
|
github.com/jonboulle/clockwork v0.4.0 // indirect
|
||||||
github.com/robfig/cron/v3 v3.0.1 // indirect
|
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||||
github.com/yusufpapurcu/wmi v1.2.4 // indirect
|
github.com/yusufpapurcu/wmi v1.2.4 // indirect
|
||||||
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
|
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
|
||||||
golang.org/x/sys v0.19.0 // indirect
|
golang.org/x/sys v0.25.0 // indirect
|
||||||
howett.net/plist v1.0.1 // indirect
|
howett.net/plist v1.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
29
go.sum
29
go.sum
@@ -4,21 +4,20 @@ github.com/BurntSushi/xgb v0.0.0-20210121224620-deaf085860bc/go.mod h1:IVnqGOEym
|
|||||||
github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k=
|
github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k=
|
||||||
github.com/BurntSushi/xgbutil v0.0.0-20190907113008-ad855c713046 h1:O/r2Sj+8QcMF7V5IcmiE2sMFV2q3J47BEirxbXJAdzA=
|
github.com/BurntSushi/xgbutil v0.0.0-20190907113008-ad855c713046 h1:O/r2Sj+8QcMF7V5IcmiE2sMFV2q3J47BEirxbXJAdzA=
|
||||||
github.com/BurntSushi/xgbutil v0.0.0-20190907113008-ad855c713046/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k=
|
github.com/BurntSushi/xgbutil v0.0.0-20190907113008-ad855c713046/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k=
|
||||||
github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls=
|
github.com/adrg/xdg v0.5.0 h1:dDaZvhMXatArP1NPHhnfaQUqWBLBsmx1h1HXQdMoFCY=
|
||||||
github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E=
|
github.com/adrg/xdg v0.5.0/go.mod h1:dDdY4M4DF9Rjy4kHPeNL+ilVF+p2lK8IdM9/rTSGcI4=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/distatus/battery v0.11.0 h1:KJk89gz90Iq/wJtbjjM9yUzBXV+ASV/EG2WOOL7N8lc=
|
github.com/distatus/battery v0.11.0 h1:KJk89gz90Iq/wJtbjjM9yUzBXV+ASV/EG2WOOL7N8lc=
|
||||||
github.com/distatus/battery v0.11.0/go.mod h1:KmVkE8A8hpIX4T78QRdMktYpEp35QfOL8A8dwZBxq2k=
|
github.com/distatus/battery v0.11.0/go.mod h1:KmVkE8A8hpIX4T78QRdMktYpEp35QfOL8A8dwZBxq2k=
|
||||||
github.com/go-co-op/gocron/v2 v2.2.9 h1:aoKosYWSSdXFLecjFWX1i8+R6V7XdZb8sB2ZKAY5Yis=
|
github.com/go-co-op/gocron/v2 v2.11.0 h1:IOowNA6SzwdRFnD4/Ol3Kj6G2xKfsoiiGq2Jhhm9bvE=
|
||||||
github.com/go-co-op/gocron/v2 v2.2.9/go.mod h1:mZx3gMSlFnb97k3hRqX3+GdlG3+DUwTh6B8fnsTScXg=
|
github.com/go-co-op/gocron/v2 v2.11.0/go.mod h1:xY7bJxGazKam1cz04EebrlP4S9q4iWdiAylMGP3jY9w=
|
||||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||||
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
|
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
|
||||||
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
|
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
|
||||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||||
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
|
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||||
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/hjson/hjson-go v3.3.0+incompatible h1:Rqr+Ya+0aCJMjaE4s8E9YKvuJLuLVpEvz4ONum52vnI=
|
github.com/hjson/hjson-go v3.3.0+incompatible h1:Rqr+Ya+0aCJMjaE4s8E9YKvuJLuLVpEvz4ONum52vnI=
|
||||||
@@ -34,8 +33,6 @@ github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
|
|||||||
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
|
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
|
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
||||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
|
||||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
|
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
|
||||||
@@ -44,20 +41,18 @@ go.i3wm.org/i3 v0.0.0-20190720062127-36e6ec85cc5a h1:yeQv6GWN8DsA2f3b+u1zhRIJg2H
|
|||||||
go.i3wm.org/i3 v0.0.0-20190720062127-36e6ec85cc5a/go.mod h1:7w17+r1F28Yxb1pHu8SxARJo+RGvJCAGOEf+GLw+2aQ=
|
go.i3wm.org/i3 v0.0.0-20190720062127-36e6ec85cc5a/go.mod h1:7w17+r1F28Yxb1pHu8SxARJo+RGvJCAGOEf+GLw+2aQ=
|
||||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||||
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY=
|
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
|
||||||
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI=
|
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
|
||||||
golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
|
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
|
||||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
|
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
|
||||||
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg=
|
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
howett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM=
|
howett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM=
|
||||||
|
|||||||
24
vendor/github.com/adrg/xdg/README.md
generated
vendored
24
vendor/github.com/adrg/xdg/README.md
generated
vendored
@@ -7,8 +7,8 @@
|
|||||||
<h4 align="center">Go implementation of the XDG Base Directory Specification and XDG user directories.</h4>
|
<h4 align="center">Go implementation of the XDG Base Directory Specification and XDG user directories.</h4>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/adrg/xdg/actions?query=workflow%3ACI">
|
<a href="https://github.com/adrg/xdg/actions/workflows/tests.yml">
|
||||||
<img alt="Build status" src="https://github.com/adrg/xdg/workflows/CI/badge.svg">
|
<img alt="Tests status" src="https://github.com/adrg/xdg/actions/workflows/tests.yml/badge.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://app.codecov.io/gh/adrg/xdg">
|
<a href="https://app.codecov.io/gh/adrg/xdg">
|
||||||
<img alt="Code coverage" src="https://codecov.io/gh/adrg/xdg/branch/master/graphs/badge.svg?branch=master">
|
<img alt="Code coverage" src="https://codecov.io/gh/adrg/xdg/branch/master/graphs/badge.svg?branch=master">
|
||||||
@@ -58,7 +58,7 @@ See usage [examples](#usage) below. Full documentation can be found at https://p
|
|||||||
The package defines sensible defaults for XDG variables which are empty or not
|
The package defines sensible defaults for XDG variables which are empty or not
|
||||||
present in the environment.
|
present in the environment.
|
||||||
|
|
||||||
- On Unix-like operating systems, XDG environment variables are tipically defined.
|
- On Unix-like operating systems, XDG environment variables are typically defined.
|
||||||
Appropriate default locations are used for the environment variables which are not set.
|
Appropriate default locations are used for the environment variables which are not set.
|
||||||
- On Windows, XDG environment variables are usually not set. If that is the case,
|
- On Windows, XDG environment variables are usually not set. If that is the case,
|
||||||
the package relies on the appropriate [Known Folders](https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid).
|
the package relies on the appropriate [Known Folders](https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid).
|
||||||
@@ -100,6 +100,17 @@ Sensible fallback locations are used for the folders which are not set.
|
|||||||
|
|
||||||
### XDG user directories
|
### XDG user directories
|
||||||
|
|
||||||
|
XDG user directories environment variables are usually **not** set on most
|
||||||
|
operating systems. However, if they are present in the environment, they take
|
||||||
|
precedence. Appropriate fallback locations are used for the environment
|
||||||
|
variables which are not set.
|
||||||
|
|
||||||
|
- On Unix-like operating systems (except macOS and Plan 9), the package reads the [user-dirs.dirs](https://man.archlinux.org/man/user-dirs.dirs.5.en) config file.
|
||||||
|
- On Windows, the package uses the appropriate [Known Folders](https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid).
|
||||||
|
|
||||||
|
Lastly, default locations are used for any user directories which are not set,
|
||||||
|
as shown in the following tables.
|
||||||
|
|
||||||
<details open>
|
<details open>
|
||||||
<summary><strong>Unix-like operating systems</strong></summary>
|
<summary><strong>Unix-like operating systems</strong></summary>
|
||||||
<br/>
|
<br/>
|
||||||
@@ -156,7 +167,7 @@ Sensible fallback locations are used for the folders which are not set.
|
|||||||
| :-----------------------------------------------------------: | :--------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------: |
|
| :-----------------------------------------------------------: | :--------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------: |
|
||||||
| <kbd><b>Home</b></kbd> | <kbd>Profile</kbd> | <kbd>%USERPROFILE%</kbd> |
|
| <kbd><b>Home</b></kbd> | <kbd>Profile</kbd> | <kbd>%USERPROFILE%</kbd> |
|
||||||
| <kbd><b>Applications</b></kbd> | <kbd>Programs</kbd><br/><kbd>CommonPrograms</kbd> | <kbd>%APPDATA%\Microsoft\Windows\Start Menu\Programs</kbd><br/><kbd>%ProgramData%\Microsoft\Windows\Start Menu\Programs</kbd> |
|
| <kbd><b>Applications</b></kbd> | <kbd>Programs</kbd><br/><kbd>CommonPrograms</kbd> | <kbd>%APPDATA%\Microsoft\Windows\Start Menu\Programs</kbd><br/><kbd>%ProgramData%\Microsoft\Windows\Start Menu\Programs</kbd> |
|
||||||
| <kbd><b>Fonts</b></kbd> | <kbd>Fonts</kbd><br/><kbd>-</kbd> | <kbd>%SystemRoot%\Fonts</kbd><br/><kbd>%LOCALAPPDATA%\Microsoft\Windows\Fonts</kbd> |
|
| <kbd><b>Fonts</b></kbd> | <kbd>Fonts</kbd> | <kbd>%SystemRoot%\Fonts</kbd><br/><kbd>%LOCALAPPDATA%\Microsoft\Windows\Fonts</kbd> |
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -263,7 +274,10 @@ See [CONTRIBUTING.MD](CONTRIBUTING.md).
|
|||||||
[gabriel-vasile](https://github.com/gabriel-vasile),
|
[gabriel-vasile](https://github.com/gabriel-vasile),
|
||||||
[KalleDK](https://github.com/KalleDK),
|
[KalleDK](https://github.com/KalleDK),
|
||||||
[nvkv](https://github.com/nvkv),
|
[nvkv](https://github.com/nvkv),
|
||||||
[djdv](https://github.com/djdv).
|
[djdv](https://github.com/djdv),
|
||||||
|
[rrjjvv](https://github.com/rrjjvv),
|
||||||
|
[GreyXor](https://github.com/GreyXor),
|
||||||
|
[Rican7](https://github.com/Rican7).
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
|
|||||||
57
vendor/github.com/adrg/xdg/internal/pathutil/pathutil.go
generated
vendored
57
vendor/github.com/adrg/xdg/internal/pathutil/pathutil.go
generated
vendored
@@ -8,18 +8,17 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Unique eliminates the duplicate paths from the provided slice and returns
|
// Unique eliminates the duplicate paths from the provided slice and returns
|
||||||
// the result. The items in the output slice are in the order in which they
|
// the result. The paths are expanded using the `ExpandHome` function and only
|
||||||
// occur in the input slice. If a `home` location is provided, the paths are
|
// absolute paths are kept. The items in the output slice are in the order in
|
||||||
// expanded using the `ExpandHome` function.
|
// which they occur in the input slice.
|
||||||
func Unique(paths []string, home string) []string {
|
func Unique(paths []string) []string {
|
||||||
var (
|
var (
|
||||||
uniq []string
|
uniq []string
|
||||||
registry = map[string]struct{}{}
|
registry = map[string]struct{}{}
|
||||||
)
|
)
|
||||||
|
|
||||||
for _, p := range paths {
|
for _, p := range paths {
|
||||||
p = ExpandHome(p, home)
|
if p = ExpandHome(p); p != "" && filepath.IsAbs(p) {
|
||||||
if p != "" && filepath.IsAbs(p) {
|
|
||||||
if _, ok := registry[p]; ok {
|
if _, ok := registry[p]; ok {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -32,6 +31,18 @@ func Unique(paths []string, home string) []string {
|
|||||||
return uniq
|
return uniq
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// First returns the first absolute path from the provided slice.
|
||||||
|
// The paths in the input slice are expanded using the `ExpandHome` function.
|
||||||
|
func First(paths []string) string {
|
||||||
|
for _, p := range paths {
|
||||||
|
if p = ExpandHome(p); p != "" && filepath.IsAbs(p) {
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
// Create returns a suitable location relative to which the file with the
|
// Create returns a suitable location relative to which the file with the
|
||||||
// specified `name` can be written. The first path from the provided `paths`
|
// specified `name` can be written. The first path from the provided `paths`
|
||||||
// slice which is successfully created (or already exists) is used as a base
|
// slice which is successfully created (or already exists) is used as a base
|
||||||
@@ -40,7 +51,8 @@ func Unique(paths []string, home string) []string {
|
|||||||
// it can also contain a set of parent directories, which will be created
|
// it can also contain a set of parent directories, which will be created
|
||||||
// relative to the selected parent path.
|
// relative to the selected parent path.
|
||||||
func Create(name string, paths []string) (string, error) {
|
func Create(name string, paths []string) (string, error) {
|
||||||
var searchedPaths []string
|
searchedPaths := make([]string, 0, len(paths))
|
||||||
|
|
||||||
for _, p := range paths {
|
for _, p := range paths {
|
||||||
p = filepath.Join(p, name)
|
p = filepath.Join(p, name)
|
||||||
|
|
||||||
@@ -48,7 +60,7 @@ func Create(name string, paths []string) (string, error) {
|
|||||||
if Exists(dir) {
|
if Exists(dir) {
|
||||||
return p, nil
|
return p, nil
|
||||||
}
|
}
|
||||||
if err := os.MkdirAll(dir, os.ModeDir|0700); err == nil {
|
if err := os.MkdirAll(dir, os.ModeDir|0o700); err == nil {
|
||||||
return p, nil
|
return p, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +75,8 @@ func Create(name string, paths []string) (string, error) {
|
|||||||
// slice of `paths`. The `name` parameter must contain the name of the file,
|
// slice of `paths`. The `name` parameter must contain the name of the file,
|
||||||
// but it can also contain a set of parent directories.
|
// but it can also contain a set of parent directories.
|
||||||
func Search(name string, paths []string) (string, error) {
|
func Search(name string, paths []string) (string, error) {
|
||||||
var searchedPaths []string
|
searchedPaths := make([]string, 0, len(paths))
|
||||||
|
|
||||||
for _, p := range paths {
|
for _, p := range paths {
|
||||||
p = filepath.Join(p, name)
|
p = filepath.Join(p, name)
|
||||||
if Exists(p) {
|
if Exists(p) {
|
||||||
@@ -76,3 +89,29 @@ func Search(name string, paths []string) (string, error) {
|
|||||||
return "", fmt.Errorf("could not locate `%s` in any of the following paths: %s",
|
return "", fmt.Errorf("could not locate `%s` in any of the following paths: %s",
|
||||||
filepath.Base(name), strings.Join(searchedPaths, ", "))
|
filepath.Base(name), strings.Join(searchedPaths, ", "))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// EnvPath returns the value of the environment variable with the specified
|
||||||
|
// `name` if it is an absolute path, or the first absolute fallback path.
|
||||||
|
// All paths are expanded using the `ExpandHome` function.
|
||||||
|
func EnvPath(name string, fallbackPaths ...string) string {
|
||||||
|
dir := ExpandHome(os.Getenv(name))
|
||||||
|
if dir != "" && filepath.IsAbs(dir) {
|
||||||
|
return dir
|
||||||
|
}
|
||||||
|
|
||||||
|
return First(fallbackPaths)
|
||||||
|
}
|
||||||
|
|
||||||
|
// EnvPathList reads the value of the environment variable with the specified
|
||||||
|
// `name` and attempts to extract a list of absolute paths from it. If there
|
||||||
|
// are none, a list of absolute fallback paths is returned instead. Duplicate
|
||||||
|
// paths are removed from the returned slice. All paths are expanded using the
|
||||||
|
// `ExpandHome` function.
|
||||||
|
func EnvPathList(name string, fallbackPaths ...string) []string {
|
||||||
|
dirs := Unique(filepath.SplitList(os.Getenv(name)))
|
||||||
|
if len(dirs) != 0 {
|
||||||
|
return dirs
|
||||||
|
}
|
||||||
|
|
||||||
|
return Unique(fallbackPaths)
|
||||||
|
}
|
||||||
|
|||||||
19
vendor/github.com/adrg/xdg/internal/pathutil/pathutil_plan9.go
generated
vendored
19
vendor/github.com/adrg/xdg/internal/pathutil/pathutil_plan9.go
generated
vendored
@@ -1,20 +1,31 @@
|
|||||||
package pathutil
|
package pathutil
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
|
"io/fs"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// UserHomeDir returns the home directory of the current user.
|
||||||
|
func UserHomeDir() string {
|
||||||
|
if home := os.Getenv("home"); home != "" {
|
||||||
|
return home
|
||||||
|
}
|
||||||
|
|
||||||
|
return "/"
|
||||||
|
}
|
||||||
|
|
||||||
// Exists returns true if the specified path exists.
|
// Exists returns true if the specified path exists.
|
||||||
func Exists(path string) bool {
|
func Exists(path string) bool {
|
||||||
_, err := os.Stat(path)
|
_, err := os.Stat(path)
|
||||||
return err == nil || os.IsExist(err)
|
return err == nil || errors.Is(err, fs.ErrExist)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExpandHome substitutes `~` and `$home` at the start of the specified
|
// ExpandHome substitutes `~` and `$home` at the start of the specified `path`.
|
||||||
// `path` using the provided `home` location.
|
func ExpandHome(path string) string {
|
||||||
func ExpandHome(path, home string) string {
|
home := UserHomeDir()
|
||||||
if path == "" || home == "" {
|
if path == "" || home == "" {
|
||||||
return path
|
return path
|
||||||
}
|
}
|
||||||
|
|||||||
20
vendor/github.com/adrg/xdg/internal/pathutil/pathutil_unix.go
generated
vendored
20
vendor/github.com/adrg/xdg/internal/pathutil/pathutil_unix.go
generated
vendored
@@ -1,23 +1,33 @@
|
|||||||
//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || nacl || linux || netbsd || openbsd || solaris
|
//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || nacl || linux || netbsd || openbsd || solaris
|
||||||
// +build aix darwin dragonfly freebsd js,wasm nacl linux netbsd openbsd solaris
|
|
||||||
|
|
||||||
package pathutil
|
package pathutil
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
|
"io/fs"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// UserHomeDir returns the home directory of the current user.
|
||||||
|
func UserHomeDir() string {
|
||||||
|
if home := os.Getenv("HOME"); home != "" {
|
||||||
|
return home
|
||||||
|
}
|
||||||
|
|
||||||
|
return "/"
|
||||||
|
}
|
||||||
|
|
||||||
// Exists returns true if the specified path exists.
|
// Exists returns true if the specified path exists.
|
||||||
func Exists(path string) bool {
|
func Exists(path string) bool {
|
||||||
_, err := os.Stat(path)
|
_, err := os.Stat(path)
|
||||||
return err == nil || os.IsExist(err)
|
return err == nil || errors.Is(err, fs.ErrExist)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExpandHome substitutes `~` and `$HOME` at the start of the specified
|
// ExpandHome substitutes `~` and `$HOME` at the start of the specified `path`.
|
||||||
// `path` using the provided `home` location.
|
func ExpandHome(path string) string {
|
||||||
func ExpandHome(path, home string) string {
|
home := UserHomeDir()
|
||||||
if path == "" || home == "" {
|
if path == "" || home == "" {
|
||||||
return path
|
return path
|
||||||
}
|
}
|
||||||
|
|||||||
15
vendor/github.com/adrg/xdg/internal/pathutil/pathutil_windows.go
generated
vendored
15
vendor/github.com/adrg/xdg/internal/pathutil/pathutil_windows.go
generated
vendored
@@ -1,6 +1,8 @@
|
|||||||
package pathutil
|
package pathutil
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
|
"io/fs"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -8,6 +10,11 @@ import (
|
|||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// UserHomeDir returns the home directory of the current user.
|
||||||
|
func UserHomeDir() string {
|
||||||
|
return KnownFolder(windows.FOLDERID_Profile, []string{"USERPROFILE"}, nil)
|
||||||
|
}
|
||||||
|
|
||||||
// Exists returns true if the specified path exists.
|
// Exists returns true if the specified path exists.
|
||||||
func Exists(path string) bool {
|
func Exists(path string) bool {
|
||||||
fi, err := os.Lstat(path)
|
fi, err := os.Lstat(path)
|
||||||
@@ -15,12 +22,12 @@ func Exists(path string) bool {
|
|||||||
_, err = filepath.EvalSymlinks(path)
|
_, err = filepath.EvalSymlinks(path)
|
||||||
}
|
}
|
||||||
|
|
||||||
return err == nil || os.IsExist(err)
|
return err == nil || errors.Is(err, fs.ErrExist)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExpandHome substitutes `%USERPROFILE%` at the start of the specified
|
// ExpandHome substitutes `%USERPROFILE%` at the start of the specified `path`.
|
||||||
// `path` using the provided `home` location.
|
func ExpandHome(path string) string {
|
||||||
func ExpandHome(path, home string) string {
|
home := UserHomeDir()
|
||||||
if path == "" || home == "" {
|
if path == "" || home == "" {
|
||||||
return path
|
return path
|
||||||
}
|
}
|
||||||
|
|||||||
82
vendor/github.com/adrg/xdg/internal/userdirs/config_unix.go
generated
vendored
Normal file
82
vendor/github.com/adrg/xdg/internal/userdirs/config_unix.go
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
//go:build aix || dragonfly || freebsd || (js && wasm) || nacl || linux || netbsd || openbsd || solaris
|
||||||
|
|
||||||
|
package userdirs
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bufio"
|
||||||
|
"io"
|
||||||
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"github.com/adrg/xdg/internal/pathutil"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ParseConfigFile parses the user directories config file at the
|
||||||
|
// specified location.
|
||||||
|
func ParseConfigFile(name string) (*Directories, error) {
|
||||||
|
f, err := os.Open(name)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
defer f.Close()
|
||||||
|
|
||||||
|
return ParseConfig(f)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ParseConfig parses the user directories config file contained in
|
||||||
|
// the provided reader.
|
||||||
|
func ParseConfig(r io.Reader) (*Directories, error) {
|
||||||
|
dirs := &Directories{}
|
||||||
|
fieldsMap := map[string]*string{
|
||||||
|
EnvDesktopDir: &dirs.Desktop,
|
||||||
|
EnvDownloadDir: &dirs.Download,
|
||||||
|
EnvDocumentsDir: &dirs.Documents,
|
||||||
|
EnvMusicDir: &dirs.Music,
|
||||||
|
EnvPicturesDir: &dirs.Pictures,
|
||||||
|
EnvVideosDir: &dirs.Videos,
|
||||||
|
EnvTemplatesDir: &dirs.Templates,
|
||||||
|
EnvPublicShareDir: &dirs.PublicShare,
|
||||||
|
}
|
||||||
|
|
||||||
|
scanner := bufio.NewScanner(r)
|
||||||
|
for scanner.Scan() {
|
||||||
|
line := strings.TrimSpace(scanner.Text())
|
||||||
|
if len(line) == 0 || line[0] == '#' {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if !strings.HasPrefix(line, "XDG_") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
parts := strings.Split(line, "=")
|
||||||
|
if len(parts) < 2 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse key.
|
||||||
|
field, ok := fieldsMap[strings.TrimSpace(parts[0])]
|
||||||
|
if !ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse value.
|
||||||
|
runes := []rune(strings.TrimSpace(parts[1]))
|
||||||
|
|
||||||
|
lenRunes := len(runes)
|
||||||
|
if lenRunes <= 2 || runes[0] != '"' {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 1; i < lenRunes; i++ {
|
||||||
|
if runes[i] == '"' {
|
||||||
|
*field = pathutil.ExpandHome(string(runes[1:i]))
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if err := scanner.Err(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return dirs, nil
|
||||||
|
}
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
package xdg
|
package userdirs
|
||||||
|
|
||||||
// XDG user directories environment variables.
|
// XDG user directories environment variables.
|
||||||
const (
|
const (
|
||||||
envDesktopDir = "XDG_DESKTOP_DIR"
|
EnvDesktopDir = "XDG_DESKTOP_DIR"
|
||||||
envDownloadDir = "XDG_DOWNLOAD_DIR"
|
EnvDownloadDir = "XDG_DOWNLOAD_DIR"
|
||||||
envDocumentsDir = "XDG_DOCUMENTS_DIR"
|
EnvDocumentsDir = "XDG_DOCUMENTS_DIR"
|
||||||
envMusicDir = "XDG_MUSIC_DIR"
|
EnvMusicDir = "XDG_MUSIC_DIR"
|
||||||
envPicturesDir = "XDG_PICTURES_DIR"
|
EnvPicturesDir = "XDG_PICTURES_DIR"
|
||||||
envVideosDir = "XDG_VIDEOS_DIR"
|
EnvVideosDir = "XDG_VIDEOS_DIR"
|
||||||
envTemplatesDir = "XDG_TEMPLATES_DIR"
|
EnvTemplatesDir = "XDG_TEMPLATES_DIR"
|
||||||
envPublicShareDir = "XDG_PUBLICSHARE_DIR"
|
EnvPublicShareDir = "XDG_PUBLICSHARE_DIR"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UserDirectories defines the locations of well known user directories.
|
// Directories defines the locations of well known user directories.
|
||||||
type UserDirectories struct {
|
type Directories struct {
|
||||||
// Desktop defines the location of the user's desktop directory.
|
// Desktop defines the location of the user's desktop directory.
|
||||||
Desktop string
|
Desktop string
|
||||||
|
|
||||||
42
vendor/github.com/adrg/xdg/paths_darwin.go
generated
vendored
42
vendor/github.com/adrg/xdg/paths_darwin.go
generated
vendored
@@ -1,18 +1,12 @@
|
|||||||
package xdg
|
package xdg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
|
"github.com/adrg/xdg/internal/pathutil"
|
||||||
|
"github.com/adrg/xdg/internal/userdirs"
|
||||||
)
|
)
|
||||||
|
|
||||||
func homeDir() string {
|
|
||||||
if home := os.Getenv("HOME"); home != "" {
|
|
||||||
return home
|
|
||||||
}
|
|
||||||
|
|
||||||
return "/"
|
|
||||||
}
|
|
||||||
|
|
||||||
func initDirs(home string) {
|
func initDirs(home string) {
|
||||||
initBaseDirs(home)
|
initBaseDirs(home)
|
||||||
initUserDirs(home)
|
initUserDirs(home)
|
||||||
@@ -23,17 +17,17 @@ func initBaseDirs(home string) {
|
|||||||
rootAppSupport := "/Library/Application Support"
|
rootAppSupport := "/Library/Application Support"
|
||||||
|
|
||||||
// Initialize standard directories.
|
// Initialize standard directories.
|
||||||
baseDirs.dataHome = xdgPath(envDataHome, homeAppSupport)
|
baseDirs.dataHome = pathutil.EnvPath(envDataHome, homeAppSupport)
|
||||||
baseDirs.data = xdgPaths(envDataDirs, rootAppSupport)
|
baseDirs.data = pathutil.EnvPathList(envDataDirs, rootAppSupport)
|
||||||
baseDirs.configHome = xdgPath(envConfigHome, homeAppSupport)
|
baseDirs.configHome = pathutil.EnvPath(envConfigHome, homeAppSupport)
|
||||||
baseDirs.config = xdgPaths(envConfigDirs,
|
baseDirs.config = pathutil.EnvPathList(envConfigDirs,
|
||||||
filepath.Join(home, "Library", "Preferences"),
|
filepath.Join(home, "Library", "Preferences"),
|
||||||
rootAppSupport,
|
rootAppSupport,
|
||||||
"/Library/Preferences",
|
"/Library/Preferences",
|
||||||
)
|
)
|
||||||
baseDirs.stateHome = xdgPath(envStateHome, homeAppSupport)
|
baseDirs.stateHome = pathutil.EnvPath(envStateHome, homeAppSupport)
|
||||||
baseDirs.cacheHome = xdgPath(envCacheHome, filepath.Join(home, "Library", "Caches"))
|
baseDirs.cacheHome = pathutil.EnvPath(envCacheHome, filepath.Join(home, "Library", "Caches"))
|
||||||
baseDirs.runtime = xdgPath(envRuntimeDir, homeAppSupport)
|
baseDirs.runtime = pathutil.EnvPath(envRuntimeDir, homeAppSupport)
|
||||||
|
|
||||||
// Initialize non-standard directories.
|
// Initialize non-standard directories.
|
||||||
baseDirs.applications = []string{
|
baseDirs.applications = []string{
|
||||||
@@ -49,12 +43,12 @@ func initBaseDirs(home string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func initUserDirs(home string) {
|
func initUserDirs(home string) {
|
||||||
UserDirs.Desktop = xdgPath(envDesktopDir, filepath.Join(home, "Desktop"))
|
UserDirs.Desktop = pathutil.EnvPath(userdirs.EnvDesktopDir, filepath.Join(home, "Desktop"))
|
||||||
UserDirs.Download = xdgPath(envDownloadDir, filepath.Join(home, "Downloads"))
|
UserDirs.Download = pathutil.EnvPath(userdirs.EnvDownloadDir, filepath.Join(home, "Downloads"))
|
||||||
UserDirs.Documents = xdgPath(envDocumentsDir, filepath.Join(home, "Documents"))
|
UserDirs.Documents = pathutil.EnvPath(userdirs.EnvDocumentsDir, filepath.Join(home, "Documents"))
|
||||||
UserDirs.Music = xdgPath(envMusicDir, filepath.Join(home, "Music"))
|
UserDirs.Music = pathutil.EnvPath(userdirs.EnvMusicDir, filepath.Join(home, "Music"))
|
||||||
UserDirs.Pictures = xdgPath(envPicturesDir, filepath.Join(home, "Pictures"))
|
UserDirs.Pictures = pathutil.EnvPath(userdirs.EnvPicturesDir, filepath.Join(home, "Pictures"))
|
||||||
UserDirs.Videos = xdgPath(envVideosDir, filepath.Join(home, "Movies"))
|
UserDirs.Videos = pathutil.EnvPath(userdirs.EnvVideosDir, filepath.Join(home, "Movies"))
|
||||||
UserDirs.Templates = xdgPath(envTemplatesDir, filepath.Join(home, "Templates"))
|
UserDirs.Templates = pathutil.EnvPath(userdirs.EnvTemplatesDir, filepath.Join(home, "Templates"))
|
||||||
UserDirs.PublicShare = xdgPath(envPublicShareDir, filepath.Join(home, "Public"))
|
UserDirs.PublicShare = pathutil.EnvPath(userdirs.EnvPublicShareDir, filepath.Join(home, "Public"))
|
||||||
}
|
}
|
||||||
|
|||||||
42
vendor/github.com/adrg/xdg/paths_plan9.go
generated
vendored
42
vendor/github.com/adrg/xdg/paths_plan9.go
generated
vendored
@@ -1,18 +1,12 @@
|
|||||||
package xdg
|
package xdg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
|
"github.com/adrg/xdg/internal/pathutil"
|
||||||
|
"github.com/adrg/xdg/internal/userdirs"
|
||||||
)
|
)
|
||||||
|
|
||||||
func homeDir() string {
|
|
||||||
if home := os.Getenv("home"); home != "" {
|
|
||||||
return home
|
|
||||||
}
|
|
||||||
|
|
||||||
return "/"
|
|
||||||
}
|
|
||||||
|
|
||||||
func initDirs(home string) {
|
func initDirs(home string) {
|
||||||
initBaseDirs(home)
|
initBaseDirs(home)
|
||||||
initUserDirs(home)
|
initUserDirs(home)
|
||||||
@@ -23,13 +17,13 @@ func initBaseDirs(home string) {
|
|||||||
rootLibDir := "/lib"
|
rootLibDir := "/lib"
|
||||||
|
|
||||||
// Initialize standard directories.
|
// Initialize standard directories.
|
||||||
baseDirs.dataHome = xdgPath(envDataHome, homeLibDir)
|
baseDirs.dataHome = pathutil.EnvPath(envDataHome, homeLibDir)
|
||||||
baseDirs.data = xdgPaths(envDataDirs, rootLibDir)
|
baseDirs.data = pathutil.EnvPathList(envDataDirs, rootLibDir)
|
||||||
baseDirs.configHome = xdgPath(envConfigHome, homeLibDir)
|
baseDirs.configHome = pathutil.EnvPath(envConfigHome, homeLibDir)
|
||||||
baseDirs.config = xdgPaths(envConfigDirs, rootLibDir)
|
baseDirs.config = pathutil.EnvPathList(envConfigDirs, rootLibDir)
|
||||||
baseDirs.stateHome = xdgPath(envStateHome, filepath.Join(homeLibDir, "state"))
|
baseDirs.stateHome = pathutil.EnvPath(envStateHome, filepath.Join(homeLibDir, "state"))
|
||||||
baseDirs.cacheHome = xdgPath(envCacheHome, filepath.Join(homeLibDir, "cache"))
|
baseDirs.cacheHome = pathutil.EnvPath(envCacheHome, filepath.Join(homeLibDir, "cache"))
|
||||||
baseDirs.runtime = xdgPath(envRuntimeDir, "/tmp")
|
baseDirs.runtime = pathutil.EnvPath(envRuntimeDir, "/tmp")
|
||||||
|
|
||||||
// Initialize non-standard directories.
|
// Initialize non-standard directories.
|
||||||
baseDirs.applications = []string{
|
baseDirs.applications = []string{
|
||||||
@@ -44,12 +38,12 @@ func initBaseDirs(home string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func initUserDirs(home string) {
|
func initUserDirs(home string) {
|
||||||
UserDirs.Desktop = xdgPath(envDesktopDir, filepath.Join(home, "desktop"))
|
UserDirs.Desktop = pathutil.EnvPath(userdirs.EnvDesktopDir, filepath.Join(home, "desktop"))
|
||||||
UserDirs.Download = xdgPath(envDownloadDir, filepath.Join(home, "downloads"))
|
UserDirs.Download = pathutil.EnvPath(userdirs.EnvDownloadDir, filepath.Join(home, "downloads"))
|
||||||
UserDirs.Documents = xdgPath(envDocumentsDir, filepath.Join(home, "documents"))
|
UserDirs.Documents = pathutil.EnvPath(userdirs.EnvDocumentsDir, filepath.Join(home, "documents"))
|
||||||
UserDirs.Music = xdgPath(envMusicDir, filepath.Join(home, "music"))
|
UserDirs.Music = pathutil.EnvPath(userdirs.EnvMusicDir, filepath.Join(home, "music"))
|
||||||
UserDirs.Pictures = xdgPath(envPicturesDir, filepath.Join(home, "pictures"))
|
UserDirs.Pictures = pathutil.EnvPath(userdirs.EnvPicturesDir, filepath.Join(home, "pictures"))
|
||||||
UserDirs.Videos = xdgPath(envVideosDir, filepath.Join(home, "videos"))
|
UserDirs.Videos = pathutil.EnvPath(userdirs.EnvVideosDir, filepath.Join(home, "videos"))
|
||||||
UserDirs.Templates = xdgPath(envTemplatesDir, filepath.Join(home, "templates"))
|
UserDirs.Templates = pathutil.EnvPath(userdirs.EnvTemplatesDir, filepath.Join(home, "templates"))
|
||||||
UserDirs.PublicShare = xdgPath(envPublicShareDir, filepath.Join(home, "public"))
|
UserDirs.PublicShare = pathutil.EnvPath(userdirs.EnvPublicShareDir, filepath.Join(home, "public"))
|
||||||
}
|
}
|
||||||
|
|||||||
53
vendor/github.com/adrg/xdg/paths_unix.go
generated
vendored
53
vendor/github.com/adrg/xdg/paths_unix.go
generated
vendored
@@ -1,5 +1,4 @@
|
|||||||
//go:build aix || dragonfly || freebsd || (js && wasm) || nacl || linux || netbsd || openbsd || solaris
|
//go:build aix || dragonfly || freebsd || (js && wasm) || nacl || linux || netbsd || openbsd || solaris
|
||||||
// +build aix dragonfly freebsd js,wasm nacl linux netbsd openbsd solaris
|
|
||||||
|
|
||||||
package xdg
|
package xdg
|
||||||
|
|
||||||
@@ -9,30 +8,23 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/adrg/xdg/internal/pathutil"
|
"github.com/adrg/xdg/internal/pathutil"
|
||||||
|
"github.com/adrg/xdg/internal/userdirs"
|
||||||
)
|
)
|
||||||
|
|
||||||
func homeDir() string {
|
|
||||||
if home := os.Getenv("HOME"); home != "" {
|
|
||||||
return home
|
|
||||||
}
|
|
||||||
|
|
||||||
return "/"
|
|
||||||
}
|
|
||||||
|
|
||||||
func initDirs(home string) {
|
func initDirs(home string) {
|
||||||
initBaseDirs(home)
|
initBaseDirs(home)
|
||||||
initUserDirs(home)
|
initUserDirs(home, baseDirs.configHome)
|
||||||
}
|
}
|
||||||
|
|
||||||
func initBaseDirs(home string) {
|
func initBaseDirs(home string) {
|
||||||
// Initialize standard directories.
|
// Initialize standard directories.
|
||||||
baseDirs.dataHome = xdgPath(envDataHome, filepath.Join(home, ".local", "share"))
|
baseDirs.dataHome = pathutil.EnvPath(envDataHome, filepath.Join(home, ".local", "share"))
|
||||||
baseDirs.data = xdgPaths(envDataDirs, "/usr/local/share", "/usr/share")
|
baseDirs.data = pathutil.EnvPathList(envDataDirs, "/usr/local/share", "/usr/share")
|
||||||
baseDirs.configHome = xdgPath(envConfigHome, filepath.Join(home, ".config"))
|
baseDirs.configHome = pathutil.EnvPath(envConfigHome, filepath.Join(home, ".config"))
|
||||||
baseDirs.config = xdgPaths(envConfigDirs, "/etc/xdg")
|
baseDirs.config = pathutil.EnvPathList(envConfigDirs, "/etc/xdg")
|
||||||
baseDirs.stateHome = xdgPath(envStateHome, filepath.Join(home, ".local", "state"))
|
baseDirs.stateHome = pathutil.EnvPath(envStateHome, filepath.Join(home, ".local", "state"))
|
||||||
baseDirs.cacheHome = xdgPath(envCacheHome, filepath.Join(home, ".cache"))
|
baseDirs.cacheHome = pathutil.EnvPath(envCacheHome, filepath.Join(home, ".cache"))
|
||||||
baseDirs.runtime = xdgPath(envRuntimeDir, filepath.Join("/run/user", strconv.Itoa(os.Getuid())))
|
baseDirs.runtime = pathutil.EnvPath(envRuntimeDir, filepath.Join("/run/user", strconv.Itoa(os.Getuid())))
|
||||||
|
|
||||||
// Initialize non-standard directories.
|
// Initialize non-standard directories.
|
||||||
appDirs := []string{
|
appDirs := []string{
|
||||||
@@ -55,17 +47,22 @@ func initBaseDirs(home string) {
|
|||||||
fontDirs = append(fontDirs, filepath.Join(dir, "fonts"))
|
fontDirs = append(fontDirs, filepath.Join(dir, "fonts"))
|
||||||
}
|
}
|
||||||
|
|
||||||
baseDirs.applications = pathutil.Unique(appDirs, Home)
|
baseDirs.applications = pathutil.Unique(appDirs)
|
||||||
baseDirs.fonts = pathutil.Unique(fontDirs, Home)
|
baseDirs.fonts = pathutil.Unique(fontDirs)
|
||||||
}
|
}
|
||||||
|
|
||||||
func initUserDirs(home string) {
|
func initUserDirs(home, configHome string) {
|
||||||
UserDirs.Desktop = xdgPath(envDesktopDir, filepath.Join(home, "Desktop"))
|
dirs, err := userdirs.ParseConfigFile(filepath.Join(configHome, "user-dirs.dirs"))
|
||||||
UserDirs.Download = xdgPath(envDownloadDir, filepath.Join(home, "Downloads"))
|
if err != nil {
|
||||||
UserDirs.Documents = xdgPath(envDocumentsDir, filepath.Join(home, "Documents"))
|
dirs = &UserDirectories{}
|
||||||
UserDirs.Music = xdgPath(envMusicDir, filepath.Join(home, "Music"))
|
}
|
||||||
UserDirs.Pictures = xdgPath(envPicturesDir, filepath.Join(home, "Pictures"))
|
|
||||||
UserDirs.Videos = xdgPath(envVideosDir, filepath.Join(home, "Videos"))
|
UserDirs.Desktop = pathutil.EnvPath(userdirs.EnvDesktopDir, dirs.Desktop, filepath.Join(home, "Desktop"))
|
||||||
UserDirs.Templates = xdgPath(envTemplatesDir, filepath.Join(home, "Templates"))
|
UserDirs.Download = pathutil.EnvPath(userdirs.EnvDownloadDir, dirs.Download, filepath.Join(home, "Downloads"))
|
||||||
UserDirs.PublicShare = xdgPath(envPublicShareDir, filepath.Join(home, "Public"))
|
UserDirs.Documents = pathutil.EnvPath(userdirs.EnvDocumentsDir, dirs.Documents, filepath.Join(home, "Documents"))
|
||||||
|
UserDirs.Music = pathutil.EnvPath(userdirs.EnvMusicDir, dirs.Music, filepath.Join(home, "Music"))
|
||||||
|
UserDirs.Pictures = pathutil.EnvPath(userdirs.EnvPicturesDir, dirs.Pictures, filepath.Join(home, "Pictures"))
|
||||||
|
UserDirs.Videos = pathutil.EnvPath(userdirs.EnvVideosDir, dirs.Videos, filepath.Join(home, "Videos"))
|
||||||
|
UserDirs.Templates = pathutil.EnvPath(userdirs.EnvTemplatesDir, dirs.Templates, filepath.Join(home, "Templates"))
|
||||||
|
UserDirs.PublicShare = pathutil.EnvPath(userdirs.EnvPublicShareDir, dirs.PublicShare, filepath.Join(home, "Public"))
|
||||||
}
|
}
|
||||||
|
|||||||
39
vendor/github.com/adrg/xdg/paths_windows.go
generated
vendored
39
vendor/github.com/adrg/xdg/paths_windows.go
generated
vendored
@@ -4,17 +4,10 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/adrg/xdg/internal/pathutil"
|
"github.com/adrg/xdg/internal/pathutil"
|
||||||
|
"github.com/adrg/xdg/internal/userdirs"
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
)
|
)
|
||||||
|
|
||||||
func homeDir() string {
|
|
||||||
return pathutil.KnownFolder(
|
|
||||||
windows.FOLDERID_Profile,
|
|
||||||
[]string{"USERPROFILE"},
|
|
||||||
nil,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
func initDirs(home string) {
|
func initDirs(home string) {
|
||||||
kf := initKnownFolders(home)
|
kf := initKnownFolders(home)
|
||||||
initBaseDirs(home, kf)
|
initBaseDirs(home, kf)
|
||||||
@@ -23,13 +16,13 @@ func initDirs(home string) {
|
|||||||
|
|
||||||
func initBaseDirs(home string, kf *knownFolders) {
|
func initBaseDirs(home string, kf *knownFolders) {
|
||||||
// Initialize standard directories.
|
// Initialize standard directories.
|
||||||
baseDirs.dataHome = xdgPath(envDataHome, kf.localAppData)
|
baseDirs.dataHome = pathutil.EnvPath(envDataHome, kf.localAppData)
|
||||||
baseDirs.data = xdgPaths(envDataDirs, kf.roamingAppData, kf.programData)
|
baseDirs.data = pathutil.EnvPathList(envDataDirs, kf.roamingAppData, kf.programData)
|
||||||
baseDirs.configHome = xdgPath(envConfigHome, kf.localAppData)
|
baseDirs.configHome = pathutil.EnvPath(envConfigHome, kf.localAppData)
|
||||||
baseDirs.config = xdgPaths(envConfigDirs, kf.programData, kf.roamingAppData)
|
baseDirs.config = pathutil.EnvPathList(envConfigDirs, kf.programData, kf.roamingAppData)
|
||||||
baseDirs.stateHome = xdgPath(envStateHome, kf.localAppData)
|
baseDirs.stateHome = pathutil.EnvPath(envStateHome, kf.localAppData)
|
||||||
baseDirs.cacheHome = xdgPath(envCacheHome, filepath.Join(kf.localAppData, "cache"))
|
baseDirs.cacheHome = pathutil.EnvPath(envCacheHome, filepath.Join(kf.localAppData, "cache"))
|
||||||
baseDirs.runtime = xdgPath(envRuntimeDir, kf.localAppData)
|
baseDirs.runtime = pathutil.EnvPath(envRuntimeDir, kf.localAppData)
|
||||||
|
|
||||||
// Initialize non-standard directories.
|
// Initialize non-standard directories.
|
||||||
baseDirs.applications = []string{
|
baseDirs.applications = []string{
|
||||||
@@ -43,14 +36,14 @@ func initBaseDirs(home string, kf *knownFolders) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func initUserDirs(home string, kf *knownFolders) {
|
func initUserDirs(home string, kf *knownFolders) {
|
||||||
UserDirs.Desktop = xdgPath(envDesktopDir, kf.desktop)
|
UserDirs.Desktop = pathutil.EnvPath(userdirs.EnvDesktopDir, kf.desktop)
|
||||||
UserDirs.Download = xdgPath(envDownloadDir, kf.downloads)
|
UserDirs.Download = pathutil.EnvPath(userdirs.EnvDownloadDir, kf.downloads)
|
||||||
UserDirs.Documents = xdgPath(envDocumentsDir, kf.documents)
|
UserDirs.Documents = pathutil.EnvPath(userdirs.EnvDocumentsDir, kf.documents)
|
||||||
UserDirs.Music = xdgPath(envMusicDir, kf.music)
|
UserDirs.Music = pathutil.EnvPath(userdirs.EnvMusicDir, kf.music)
|
||||||
UserDirs.Pictures = xdgPath(envPicturesDir, kf.pictures)
|
UserDirs.Pictures = pathutil.EnvPath(userdirs.EnvPicturesDir, kf.pictures)
|
||||||
UserDirs.Videos = xdgPath(envVideosDir, kf.videos)
|
UserDirs.Videos = pathutil.EnvPath(userdirs.EnvVideosDir, kf.videos)
|
||||||
UserDirs.Templates = xdgPath(envTemplatesDir, kf.templates)
|
UserDirs.Templates = pathutil.EnvPath(userdirs.EnvTemplatesDir, kf.templates)
|
||||||
UserDirs.PublicShare = xdgPath(envPublicShareDir, kf.public)
|
UserDirs.PublicShare = pathutil.EnvPath(userdirs.EnvPublicShareDir, kf.public)
|
||||||
}
|
}
|
||||||
|
|
||||||
type knownFolders struct {
|
type knownFolders struct {
|
||||||
|
|||||||
29
vendor/github.com/adrg/xdg/xdg.go
generated
vendored
29
vendor/github.com/adrg/xdg/xdg.go
generated
vendored
@@ -1,12 +1,13 @@
|
|||||||
package xdg
|
package xdg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
|
||||||
"path/filepath"
|
|
||||||
|
|
||||||
"github.com/adrg/xdg/internal/pathutil"
|
"github.com/adrg/xdg/internal/pathutil"
|
||||||
|
"github.com/adrg/xdg/internal/userdirs"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// UserDirectories defines the locations of well known user directories.
|
||||||
|
type UserDirectories = userdirs.Directories
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// Home contains the path of the user's home directory.
|
// Home contains the path of the user's home directory.
|
||||||
Home string
|
Home string
|
||||||
@@ -29,7 +30,7 @@ var (
|
|||||||
|
|
||||||
// ConfigHome defines the base directory relative to which user-specific
|
// ConfigHome defines the base directory relative to which user-specific
|
||||||
// configuration files should be written. This directory is defined by
|
// configuration files should be written. This directory is defined by
|
||||||
// the $XDG_CONFIG_HOME environment variable. If the variable is not
|
// the $XDG_CONFIG_HOME environment variable. If the variable is
|
||||||
// not set, a default equal to $HOME/.config should be used.
|
// not set, a default equal to $HOME/.config should be used.
|
||||||
ConfigHome string
|
ConfigHome string
|
||||||
|
|
||||||
@@ -88,7 +89,7 @@ func init() {
|
|||||||
// in the environment.
|
// in the environment.
|
||||||
func Reload() {
|
func Reload() {
|
||||||
// Initialize home directory.
|
// Initialize home directory.
|
||||||
Home = homeDir()
|
Home = pathutil.UserHomeDir()
|
||||||
|
|
||||||
// Initialize base and user directories.
|
// Initialize base and user directories.
|
||||||
initDirs(Home)
|
initDirs(Home)
|
||||||
@@ -198,21 +199,3 @@ func SearchCacheFile(relPath string) (string, error) {
|
|||||||
func SearchRuntimeFile(relPath string) (string, error) {
|
func SearchRuntimeFile(relPath string) (string, error) {
|
||||||
return baseDirs.searchRuntimeFile(relPath)
|
return baseDirs.searchRuntimeFile(relPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
func xdgPath(name, defaultPath string) string {
|
|
||||||
dir := pathutil.ExpandHome(os.Getenv(name), Home)
|
|
||||||
if dir != "" && filepath.IsAbs(dir) {
|
|
||||||
return dir
|
|
||||||
}
|
|
||||||
|
|
||||||
return defaultPath
|
|
||||||
}
|
|
||||||
|
|
||||||
func xdgPaths(name string, defaultPaths ...string) []string {
|
|
||||||
dirs := pathutil.Unique(filepath.SplitList(os.Getenv(name)), Home)
|
|
||||||
if len(dirs) != 0 {
|
|
||||||
return dirs
|
|
||||||
}
|
|
||||||
|
|
||||||
return pathutil.Unique(defaultPaths, Home)
|
|
||||||
}
|
|
||||||
|
|||||||
25
vendor/github.com/go-co-op/gocron/v2/.golangci.yaml
generated
vendored
25
vendor/github.com/go-co-op/gocron/v2/.golangci.yaml
generated
vendored
@@ -2,14 +2,20 @@ run:
|
|||||||
timeout: 5m
|
timeout: 5m
|
||||||
issues-exit-code: 1
|
issues-exit-code: 1
|
||||||
tests: true
|
tests: true
|
||||||
skip-dirs:
|
|
||||||
- local
|
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
max-same-issues: 100
|
max-same-issues: 100
|
||||||
include:
|
include:
|
||||||
- EXC0012
|
- EXC0012
|
||||||
- EXC0014
|
- EXC0014
|
||||||
|
exclude-dirs:
|
||||||
|
- local
|
||||||
|
exclude-rules:
|
||||||
|
- path: example_test.go
|
||||||
|
linters:
|
||||||
|
- revive
|
||||||
|
text: "seems to be unused"
|
||||||
|
fix: true
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
@@ -29,21 +35,10 @@ linters:
|
|||||||
- whitespace
|
- whitespace
|
||||||
|
|
||||||
output:
|
output:
|
||||||
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
|
formats:
|
||||||
format: colored-line-number
|
- format: colored-line-number
|
||||||
# print lines of code with issue, default is true
|
|
||||||
print-issued-lines: true
|
print-issued-lines: true
|
||||||
# print linter name in the end of issue text, default is true
|
|
||||||
print-linter-name: true
|
print-linter-name: true
|
||||||
# make issues output unique by line, default is true
|
|
||||||
uniq-by-line: true
|
uniq-by-line: true
|
||||||
# add a prefix to the output file references; default is no prefix
|
|
||||||
path-prefix: ""
|
path-prefix: ""
|
||||||
# sorts results by: filepath, line and column
|
|
||||||
sort-results: true
|
sort-results: true
|
||||||
|
|
||||||
linters-settings:
|
|
||||||
golint:
|
|
||||||
min-confidence: 0.8
|
|
||||||
|
|
||||||
fix: true
|
|
||||||
|
|||||||
5
vendor/github.com/go-co-op/gocron/v2/Makefile
generated
vendored
5
vendor/github.com/go-co-op/gocron/v2/Makefile
generated
vendored
@@ -1,4 +1,4 @@
|
|||||||
.PHONY: fmt lint test mocks test_coverage
|
.PHONY: fmt lint test mocks test_coverage test_ci
|
||||||
|
|
||||||
GO_PKGS := $(shell go list -f {{.Dir}} ./...)
|
GO_PKGS := $(shell go list -f {{.Dir}} ./...)
|
||||||
|
|
||||||
@@ -15,5 +15,8 @@ test:
|
|||||||
test_coverage:
|
test_coverage:
|
||||||
@go test -race -v $(GO_FLAGS) -count=1 -coverprofile=coverage.out -covermode=atomic $(GO_PKGS)
|
@go test -race -v $(GO_FLAGS) -count=1 -coverprofile=coverage.out -covermode=atomic $(GO_PKGS)
|
||||||
|
|
||||||
|
test_ci:
|
||||||
|
@TEST_ENV=ci go test -race -v $(GO_FLAGS) -count=1 $(GO_PKGS)
|
||||||
|
|
||||||
mocks:
|
mocks:
|
||||||
@go generate ./...
|
@go generate ./...
|
||||||
|
|||||||
3
vendor/github.com/go-co-op/gocron/v2/README.md
generated
vendored
3
vendor/github.com/go-co-op/gocron/v2/README.md
generated
vendored
@@ -98,7 +98,7 @@ Jobs can be run every x weeks on specific days of the week and at specific times
|
|||||||
- [**Monthly**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#MonthlyJob):
|
- [**Monthly**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#MonthlyJob):
|
||||||
Jobs can be run every x months on specific days of the month and at specific times.
|
Jobs can be run every x months on specific days of the month and at specific times.
|
||||||
- [**One time**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#OneTimeJob):
|
- [**One time**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#OneTimeJob):
|
||||||
Jobs can be run once at a specific time. These are non-recurring jobs.
|
Jobs can be run at specific time(s) (either once or many times).
|
||||||
|
|
||||||
### Concurrency Limits
|
### Concurrency Limits
|
||||||
Jobs can be limited individually or across the entire scheduler.
|
Jobs can be limited individually or across the entire scheduler.
|
||||||
@@ -120,6 +120,7 @@ other instances checking to see if a new leader needs to be elected.
|
|||||||
(don't see what you need? request on slack to get a repo created to contribute it!)
|
(don't see what you need? request on slack to get a repo created to contribute it!)
|
||||||
- [**Locker**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#WithDistributedLocker):
|
- [**Locker**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#WithDistributedLocker):
|
||||||
A locker can be used to lock each run of a job to a single instance of gocron.
|
A locker can be used to lock each run of a job to a single instance of gocron.
|
||||||
|
Locker can be at job or scheduler, if it is defined both at job and scheduler then locker of job will take precedence.
|
||||||
- Implementations: [go-co-op lockers](https://github.com/go-co-op?q=-lock&type=all&language=&sort=)
|
- Implementations: [go-co-op lockers](https://github.com/go-co-op?q=-lock&type=all&language=&sort=)
|
||||||
(don't see what you need? request on slack to get a repo created to contribute it!)
|
(don't see what you need? request on slack to get a repo created to contribute it!)
|
||||||
|
|
||||||
|
|||||||
7
vendor/github.com/go-co-op/gocron/v2/SECURITY.md
generated
vendored
7
vendor/github.com/go-co-op/gocron/v2/SECURITY.md
generated
vendored
@@ -2,14 +2,15 @@
|
|||||||
|
|
||||||
## Supported Versions
|
## Supported Versions
|
||||||
|
|
||||||
The current plan is to maintain version 1 as long as possible incorporating any necessary security patches.
|
The current plan is to maintain version 2 as long as possible incorporating any necessary security patches. Version 1 is deprecated and will no longer be patched.
|
||||||
|
|
||||||
| Version | Supported |
|
| Version | Supported |
|
||||||
| ------- | ------------------ |
|
| ------- | ------------------ |
|
||||||
| 1.x.x | :white_check_mark: |
|
| 1.x.x | :heavy_multiplication_x: |
|
||||||
|
| 2.x.x | :white_check_mark: |
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
Vulnerabilities can be reported by [opening an issue](https://github.com/go-co-op/gocron/issues/new/choose) or reaching out on Slack: [<img src="https://img.shields.io/badge/gophers-gocron-brightgreen?logo=slack">](https://gophers.slack.com/archives/CQ7T0T1FW)
|
Vulnerabilities can be reported by [opening an issue](https://github.com/go-co-op/gocron/issues/new/choose) or reaching out on Slack: [<img src="https://img.shields.io/badge/gophers-gocron-brightgreen?logo=slack">](https://gophers.slack.com/archives/CQ7T0T1FW)
|
||||||
|
|
||||||
We will do our best to addrerss any vulnerabilities in an expeditious manner.
|
We will do our best to address any vulnerabilities in an expeditious manner.
|
||||||
|
|||||||
6
vendor/github.com/go-co-op/gocron/v2/errors.go
generated
vendored
6
vendor/github.com/go-co-op/gocron/v2/errors.go
generated
vendored
@@ -33,15 +33,21 @@ var (
|
|||||||
ErrWeeklyJobDaysOfTheWeekNil = fmt.Errorf("gocron: WeeklyJob: daysOfTheWeek must not be nil")
|
ErrWeeklyJobDaysOfTheWeekNil = fmt.Errorf("gocron: WeeklyJob: daysOfTheWeek must not be nil")
|
||||||
ErrWeeklyJobHours = fmt.Errorf("gocron: WeeklyJob: atTimes hours must be between 0 and 23 inclusive")
|
ErrWeeklyJobHours = fmt.Errorf("gocron: WeeklyJob: atTimes hours must be between 0 and 23 inclusive")
|
||||||
ErrWeeklyJobMinutesSeconds = fmt.Errorf("gocron: WeeklyJob: atTimes minutes and seconds must be between 0 and 59 inclusive")
|
ErrWeeklyJobMinutesSeconds = fmt.Errorf("gocron: WeeklyJob: atTimes minutes and seconds must be between 0 and 59 inclusive")
|
||||||
|
ErrPanicRecovered = fmt.Errorf("gocron: panic recovered")
|
||||||
ErrWithClockNil = fmt.Errorf("gocron: WithClock: clock must not be nil")
|
ErrWithClockNil = fmt.Errorf("gocron: WithClock: clock must not be nil")
|
||||||
ErrWithDistributedElectorNil = fmt.Errorf("gocron: WithDistributedElector: elector must not be nil")
|
ErrWithDistributedElectorNil = fmt.Errorf("gocron: WithDistributedElector: elector must not be nil")
|
||||||
ErrWithDistributedLockerNil = fmt.Errorf("gocron: WithDistributedLocker: locker must not be nil")
|
ErrWithDistributedLockerNil = fmt.Errorf("gocron: WithDistributedLocker: locker must not be nil")
|
||||||
|
ErrWithDistributedJobLockerNil = fmt.Errorf("gocron: WithDistributedJobLocker: locker must not be nil")
|
||||||
|
ErrWithIdentifierNil = fmt.Errorf("gocron: WithIdentifier: identifier must not be nil")
|
||||||
ErrWithLimitConcurrentJobsZero = fmt.Errorf("gocron: WithLimitConcurrentJobs: limit must be greater than 0")
|
ErrWithLimitConcurrentJobsZero = fmt.Errorf("gocron: WithLimitConcurrentJobs: limit must be greater than 0")
|
||||||
ErrWithLocationNil = fmt.Errorf("gocron: WithLocation: location must not be nil")
|
ErrWithLocationNil = fmt.Errorf("gocron: WithLocation: location must not be nil")
|
||||||
ErrWithLoggerNil = fmt.Errorf("gocron: WithLogger: logger must not be nil")
|
ErrWithLoggerNil = fmt.Errorf("gocron: WithLogger: logger must not be nil")
|
||||||
ErrWithMonitorNil = fmt.Errorf("gocron: WithMonitor: monitor must not be nil")
|
ErrWithMonitorNil = fmt.Errorf("gocron: WithMonitor: monitor must not be nil")
|
||||||
ErrWithNameEmpty = fmt.Errorf("gocron: WithName: name must not be empty")
|
ErrWithNameEmpty = fmt.Errorf("gocron: WithName: name must not be empty")
|
||||||
ErrWithStartDateTimePast = fmt.Errorf("gocron: WithStartDateTime: start must not be in the past")
|
ErrWithStartDateTimePast = fmt.Errorf("gocron: WithStartDateTime: start must not be in the past")
|
||||||
|
ErrWithStopDateTimePast = fmt.Errorf("gocron: WithStopDateTime: end must not be in the past")
|
||||||
|
ErrStartTimeLaterThanEndTime = fmt.Errorf("gocron: WithStartDateTime: start must not be later than end")
|
||||||
|
ErrStopTimeEarlierThanStartTime = fmt.Errorf("gocron: WithStopDateTime: end must not be earlier than start")
|
||||||
ErrWithStopTimeoutZeroOrNegative = fmt.Errorf("gocron: WithStopTimeout: timeout must be greater than 0")
|
ErrWithStopTimeoutZeroOrNegative = fmt.Errorf("gocron: WithStopTimeout: timeout must be greater than 0")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
105
vendor/github.com/go-co-op/gocron/v2/executor.go
generated
vendored
105
vendor/github.com/go-co-op/gocron/v2/executor.go
generated
vendored
@@ -2,29 +2,53 @@ package gocron
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/jonboulle/clockwork"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
type executor struct {
|
type executor struct {
|
||||||
ctx context.Context
|
// context used for shutting down
|
||||||
cancel context.CancelFunc
|
ctx context.Context
|
||||||
logger Logger
|
// cancel used by the executor to signal a stop of it's functions
|
||||||
stopCh chan struct{}
|
cancel context.CancelFunc
|
||||||
jobsIn chan jobIn
|
// clock used for regular time or mocking time
|
||||||
|
clock clockwork.Clock
|
||||||
|
// the executor's logger
|
||||||
|
logger Logger
|
||||||
|
|
||||||
|
// receives jobs scheduled to execute
|
||||||
|
jobsIn chan jobIn
|
||||||
|
// sends out jobs for rescheduling
|
||||||
jobsOutForRescheduling chan uuid.UUID
|
jobsOutForRescheduling chan uuid.UUID
|
||||||
jobsOutCompleted chan uuid.UUID
|
// sends out jobs once completed
|
||||||
jobOutRequest chan jobOutRequest
|
jobsOutCompleted chan uuid.UUID
|
||||||
stopTimeout time.Duration
|
// used to request jobs from the scheduler
|
||||||
done chan error
|
jobOutRequest chan jobOutRequest
|
||||||
singletonRunners *sync.Map // map[uuid.UUID]singletonRunner
|
|
||||||
limitMode *limitModeConfig
|
// used by the executor to receive a stop signal from the scheduler
|
||||||
elector Elector
|
stopCh chan struct{}
|
||||||
locker Locker
|
// the timeout value when stopping
|
||||||
monitor Monitor
|
stopTimeout time.Duration
|
||||||
|
// used to signal that the executor has completed shutdown
|
||||||
|
done chan error
|
||||||
|
|
||||||
|
// runners for any singleton type jobs
|
||||||
|
// map[uuid.UUID]singletonRunner
|
||||||
|
singletonRunners *sync.Map
|
||||||
|
// config for limit mode
|
||||||
|
limitMode *limitModeConfig
|
||||||
|
// the elector when running distributed instances
|
||||||
|
elector Elector
|
||||||
|
// the locker when running distributed instances
|
||||||
|
locker Locker
|
||||||
|
// monitor for reporting metrics
|
||||||
|
monitor Monitor
|
||||||
}
|
}
|
||||||
|
|
||||||
type jobIn struct {
|
type jobIn struct {
|
||||||
@@ -131,8 +155,8 @@ func (e *executor) start() {
|
|||||||
// to work through the channel backlog. A hard limit of 1000 is in place
|
// to work through the channel backlog. A hard limit of 1000 is in place
|
||||||
// at which point this call would block.
|
// at which point this call would block.
|
||||||
// TODO when metrics are added, this should increment a wait metric
|
// TODO when metrics are added, this should increment a wait metric
|
||||||
e.limitMode.in <- jIn
|
|
||||||
e.sendOutForRescheduling(&jIn)
|
e.sendOutForRescheduling(&jIn)
|
||||||
|
e.limitMode.in <- jIn
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// no limit mode, so we're either running a regular job or
|
// no limit mode, so we're either running a regular job or
|
||||||
@@ -303,6 +327,10 @@ func (e *executor) singletonModeRunner(name string, in chan jobIn, wg *waitGroup
|
|||||||
j := requestJobCtx(ctx, jIn.id, e.jobOutRequest)
|
j := requestJobCtx(ctx, jIn.id, e.jobOutRequest)
|
||||||
cancel()
|
cancel()
|
||||||
if j != nil {
|
if j != nil {
|
||||||
|
// need to set shouldSendOut = false here, as there is a duplicative call to sendOutForRescheduling
|
||||||
|
// inside the runJob function that needs to be skipped. sendOutForRescheduling is previously called
|
||||||
|
// when the job is sent to the singleton mode runner.
|
||||||
|
jIn.shouldSendOut = false
|
||||||
e.runJob(*j, jIn)
|
e.runJob(*j, jIn)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,15 +358,31 @@ func (e *executor) runJob(j internalJob, jIn jobIn) {
|
|||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if j.stopTimeReached(e.clock.Now()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if e.elector != nil {
|
if e.elector != nil {
|
||||||
if err := e.elector.IsLeader(j.ctx); err != nil {
|
if err := e.elector.IsLeader(j.ctx); err != nil {
|
||||||
e.sendOutForRescheduling(&jIn)
|
e.sendOutForRescheduling(&jIn)
|
||||||
|
e.incrementJobCounter(j, Skip)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
} else if j.locker != nil {
|
||||||
|
lock, err := j.locker.Lock(j.ctx, j.name)
|
||||||
|
if err != nil {
|
||||||
|
_ = callJobFuncWithParams(j.afterLockError, j.id, j.name, err)
|
||||||
|
e.sendOutForRescheduling(&jIn)
|
||||||
|
e.incrementJobCounter(j, Skip)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer func() { _ = lock.Unlock(j.ctx) }()
|
||||||
} else if e.locker != nil {
|
} else if e.locker != nil {
|
||||||
lock, err := e.locker.Lock(j.ctx, j.name)
|
lock, err := e.locker.Lock(j.ctx, j.name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
_ = callJobFuncWithParams(j.afterLockError, j.id, j.name, err)
|
||||||
e.sendOutForRescheduling(&jIn)
|
e.sendOutForRescheduling(&jIn)
|
||||||
|
e.incrementJobCounter(j, Skip)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer func() { _ = lock.Unlock(j.ctx) }()
|
defer func() { _ = lock.Unlock(j.ctx) }()
|
||||||
@@ -352,20 +396,35 @@ func (e *executor) runJob(j internalJob, jIn jobIn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
startTime := time.Now()
|
startTime := time.Now()
|
||||||
err := callJobFuncWithParams(j.function, j.parameters...)
|
err := e.callJobWithRecover(j)
|
||||||
if e.monitor != nil {
|
if e.monitor != nil {
|
||||||
e.monitor.RecordJobTiming(startTime, time.Now(), j.id, j.name, j.tags)
|
e.monitor.RecordJobTiming(startTime, time.Now(), j.id, j.name, j.tags)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
_ = callJobFuncWithParams(j.afterJobRunsWithError, j.id, j.name, err)
|
_ = callJobFuncWithParams(j.afterJobRunsWithError, j.id, j.name, err)
|
||||||
if e.monitor != nil {
|
e.incrementJobCounter(j, Fail)
|
||||||
e.monitor.IncrementJob(j.id, j.name, j.tags, Fail)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
_ = callJobFuncWithParams(j.afterJobRuns, j.id, j.name)
|
_ = callJobFuncWithParams(j.afterJobRuns, j.id, j.name)
|
||||||
if e.monitor != nil {
|
e.incrementJobCounter(j, Success)
|
||||||
e.monitor.IncrementJob(j.id, j.name, j.tags, Success)
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *executor) callJobWithRecover(j internalJob) (err error) {
|
||||||
|
defer func() {
|
||||||
|
if recoverData := recover(); recoverData != nil {
|
||||||
|
_ = callJobFuncWithParams(j.afterJobRunsWithPanic, j.id, j.name, recoverData)
|
||||||
|
|
||||||
|
// if panic is occurred, we should return an error
|
||||||
|
err = fmt.Errorf("%w from %v", ErrPanicRecovered, recoverData)
|
||||||
}
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
return callJobFuncWithParams(j.function, j.parameters...)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *executor) incrementJobCounter(j internalJob, status JobStatus) {
|
||||||
|
if e.monitor != nil {
|
||||||
|
e.monitor.IncrementJob(j.id, j.name, j.tags, status)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,4 +507,8 @@ func (e *executor) stop(standardJobsWg, singletonJobsWg, limitModeJobsWg *waitGr
|
|||||||
e.logger.Debug("gocron: executor stopped")
|
e.logger.Debug("gocron: executor stopped")
|
||||||
}
|
}
|
||||||
waiterCancel()
|
waiterCancel()
|
||||||
|
|
||||||
|
if e.limitMode != nil {
|
||||||
|
e.limitMode.started = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
258
vendor/github.com/go-co-op/gocron/v2/job.go
generated
vendored
258
vendor/github.com/go-co-op/gocron/v2/job.go
generated
vendored
@@ -24,8 +24,11 @@ type internalJob struct {
|
|||||||
name string
|
name string
|
||||||
tags []string
|
tags []string
|
||||||
jobSchedule
|
jobSchedule
|
||||||
lastScheduledRun time.Time
|
|
||||||
nextScheduled time.Time
|
// as some jobs may queue up, it's possible to
|
||||||
|
// have multiple nextScheduled times
|
||||||
|
nextScheduled []time.Time
|
||||||
|
|
||||||
lastRun time.Time
|
lastRun time.Time
|
||||||
function any
|
function any
|
||||||
parameters []any
|
parameters []any
|
||||||
@@ -35,10 +38,15 @@ type internalJob struct {
|
|||||||
limitRunsTo *limitRunsTo
|
limitRunsTo *limitRunsTo
|
||||||
startTime time.Time
|
startTime time.Time
|
||||||
startImmediately bool
|
startImmediately bool
|
||||||
|
stopTime time.Time
|
||||||
// event listeners
|
// event listeners
|
||||||
afterJobRuns func(jobID uuid.UUID, jobName string)
|
afterJobRuns func(jobID uuid.UUID, jobName string)
|
||||||
beforeJobRuns func(jobID uuid.UUID, jobName string)
|
beforeJobRuns func(jobID uuid.UUID, jobName string)
|
||||||
afterJobRunsWithError func(jobID uuid.UUID, jobName string, err error)
|
afterJobRunsWithError func(jobID uuid.UUID, jobName string, err error)
|
||||||
|
afterJobRunsWithPanic func(jobID uuid.UUID, jobName string, recoverData any)
|
||||||
|
afterLockError func(jobID uuid.UUID, jobName string, err error)
|
||||||
|
|
||||||
|
locker Locker
|
||||||
}
|
}
|
||||||
|
|
||||||
// stop is used to stop the job's timer and cancel the context
|
// stop is used to stop the job's timer and cancel the context
|
||||||
@@ -53,6 +61,13 @@ func (j *internalJob) stop() {
|
|||||||
j.cancel()
|
j.cancel()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (j *internalJob) stopTimeReached(now time.Time) bool {
|
||||||
|
if j.stopTime.IsZero() {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return j.stopTime.Before(now)
|
||||||
|
}
|
||||||
|
|
||||||
// task stores the function and parameters
|
// task stores the function and parameters
|
||||||
// that are actually run when the job is executed.
|
// that are actually run when the job is executed.
|
||||||
type task struct {
|
type task struct {
|
||||||
@@ -91,7 +106,7 @@ type limitRunsTo struct {
|
|||||||
// JobDefinition defines the interface that must be
|
// JobDefinition defines the interface that must be
|
||||||
// implemented to create a job from the definition.
|
// implemented to create a job from the definition.
|
||||||
type JobDefinition interface {
|
type JobDefinition interface {
|
||||||
setup(*internalJob, *time.Location) error
|
setup(j *internalJob, l *time.Location, now time.Time) error
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ JobDefinition = (*cronJobDefinition)(nil)
|
var _ JobDefinition = (*cronJobDefinition)(nil)
|
||||||
@@ -101,7 +116,7 @@ type cronJobDefinition struct {
|
|||||||
withSeconds bool
|
withSeconds bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c cronJobDefinition) setup(j *internalJob, location *time.Location) error {
|
func (c cronJobDefinition) setup(j *internalJob, location *time.Location, _ time.Time) error {
|
||||||
var withLocation string
|
var withLocation string
|
||||||
if strings.HasPrefix(c.crontab, "TZ=") || strings.HasPrefix(c.crontab, "CRON_TZ=") {
|
if strings.HasPrefix(c.crontab, "TZ=") || strings.HasPrefix(c.crontab, "CRON_TZ=") {
|
||||||
withLocation = c.crontab
|
withLocation = c.crontab
|
||||||
@@ -117,7 +132,7 @@ func (c cronJobDefinition) setup(j *internalJob, location *time.Location) error
|
|||||||
)
|
)
|
||||||
|
|
||||||
if c.withSeconds {
|
if c.withSeconds {
|
||||||
p := cron.NewParser(cron.Second | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor)
|
p := cron.NewParser(cron.SecondOptional | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor)
|
||||||
cronSchedule, err = p.Parse(withLocation)
|
cronSchedule, err = p.Parse(withLocation)
|
||||||
} else {
|
} else {
|
||||||
cronSchedule, err = cron.ParseStandard(withLocation)
|
cronSchedule, err = cron.ParseStandard(withLocation)
|
||||||
@@ -149,7 +164,7 @@ type durationJobDefinition struct {
|
|||||||
duration time.Duration
|
duration time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d durationJobDefinition) setup(j *internalJob, _ *time.Location) error {
|
func (d durationJobDefinition) setup(j *internalJob, _ *time.Location, _ time.Time) error {
|
||||||
if d.duration == 0 {
|
if d.duration == 0 {
|
||||||
return ErrDurationJobIntervalZero
|
return ErrDurationJobIntervalZero
|
||||||
}
|
}
|
||||||
@@ -171,7 +186,7 @@ type durationRandomJobDefinition struct {
|
|||||||
min, max time.Duration
|
min, max time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d durationRandomJobDefinition) setup(j *internalJob, _ *time.Location) error {
|
func (d durationRandomJobDefinition) setup(j *internalJob, _ *time.Location, _ time.Time) error {
|
||||||
if d.min >= d.max {
|
if d.min >= d.max {
|
||||||
return ErrDurationRandomJobMinMax
|
return ErrDurationRandomJobMinMax
|
||||||
}
|
}
|
||||||
@@ -221,7 +236,7 @@ type dailyJobDefinition struct {
|
|||||||
atTimes AtTimes
|
atTimes AtTimes
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d dailyJobDefinition) setup(j *internalJob, location *time.Location) error {
|
func (d dailyJobDefinition) setup(j *internalJob, location *time.Location, _ time.Time) error {
|
||||||
atTimesDate, err := convertAtTimesToDateTime(d.atTimes, location)
|
atTimesDate, err := convertAtTimesToDateTime(d.atTimes, location)
|
||||||
switch {
|
switch {
|
||||||
case errors.Is(err, errAtTimesNil):
|
case errors.Is(err, errAtTimesNil):
|
||||||
@@ -250,7 +265,7 @@ type weeklyJobDefinition struct {
|
|||||||
atTimes AtTimes
|
atTimes AtTimes
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w weeklyJobDefinition) setup(j *internalJob, location *time.Location) error {
|
func (w weeklyJobDefinition) setup(j *internalJob, location *time.Location, _ time.Time) error {
|
||||||
var ws weeklyJob
|
var ws weeklyJob
|
||||||
ws.interval = w.interval
|
ws.interval = w.interval
|
||||||
|
|
||||||
@@ -286,7 +301,8 @@ type Weekdays func() []time.Weekday
|
|||||||
// NewWeekdays provide the days of the week the job should run.
|
// NewWeekdays provide the days of the week the job should run.
|
||||||
func NewWeekdays(weekday time.Weekday, weekdays ...time.Weekday) Weekdays {
|
func NewWeekdays(weekday time.Weekday, weekdays ...time.Weekday) Weekdays {
|
||||||
return func() []time.Weekday {
|
return func() []time.Weekday {
|
||||||
return append(weekdays, weekday)
|
weekdays = append(weekdays, weekday)
|
||||||
|
return weekdays
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -314,7 +330,7 @@ type monthlyJobDefinition struct {
|
|||||||
atTimes AtTimes
|
atTimes AtTimes
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m monthlyJobDefinition) setup(j *internalJob, location *time.Location) error {
|
func (m monthlyJobDefinition) setup(j *internalJob, location *time.Location, _ time.Time) error {
|
||||||
var ms monthlyJob
|
var ms monthlyJob
|
||||||
ms.interval = m.interval
|
ms.interval = m.interval
|
||||||
|
|
||||||
@@ -437,31 +453,46 @@ type oneTimeJobDefinition struct {
|
|||||||
startAt OneTimeJobStartAtOption
|
startAt OneTimeJobStartAtOption
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o oneTimeJobDefinition) setup(j *internalJob, _ *time.Location) error {
|
func (o oneTimeJobDefinition) setup(j *internalJob, _ *time.Location, now time.Time) error {
|
||||||
j.jobSchedule = oneTimeJob{}
|
sortedTimes := o.startAt(j)
|
||||||
return o.startAt(j)
|
slices.SortStableFunc(sortedTimes, ascendingTime)
|
||||||
|
// keep only schedules that are in the future
|
||||||
|
idx, found := slices.BinarySearchFunc(sortedTimes, now, ascendingTime)
|
||||||
|
if found {
|
||||||
|
idx++
|
||||||
|
}
|
||||||
|
sortedTimes = sortedTimes[idx:]
|
||||||
|
if !j.startImmediately && len(sortedTimes) == 0 {
|
||||||
|
return ErrOneTimeJobStartDateTimePast
|
||||||
|
}
|
||||||
|
j.jobSchedule = oneTimeJob{sortedTimes: sortedTimes}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// OneTimeJobStartAtOption defines when the one time job is run
|
// OneTimeJobStartAtOption defines when the one time job is run
|
||||||
type OneTimeJobStartAtOption func(*internalJob) error
|
type OneTimeJobStartAtOption func(*internalJob) []time.Time
|
||||||
|
|
||||||
// OneTimeJobStartImmediately tells the scheduler to run the one time job immediately.
|
// OneTimeJobStartImmediately tells the scheduler to run the one time job immediately.
|
||||||
func OneTimeJobStartImmediately() OneTimeJobStartAtOption {
|
func OneTimeJobStartImmediately() OneTimeJobStartAtOption {
|
||||||
return func(j *internalJob) error {
|
return func(j *internalJob) []time.Time {
|
||||||
j.startImmediately = true
|
j.startImmediately = true
|
||||||
return nil
|
return []time.Time{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// OneTimeJobStartDateTime sets the date & time at which the job should run.
|
// OneTimeJobStartDateTime sets the date & time at which the job should run.
|
||||||
// This datetime must be in the future.
|
// This datetime must be in the future (according to the scheduler clock).
|
||||||
func OneTimeJobStartDateTime(start time.Time) OneTimeJobStartAtOption {
|
func OneTimeJobStartDateTime(start time.Time) OneTimeJobStartAtOption {
|
||||||
return func(j *internalJob) error {
|
return func(_ *internalJob) []time.Time {
|
||||||
if start.IsZero() || start.Before(time.Now()) {
|
return []time.Time{start}
|
||||||
return ErrOneTimeJobStartDateTimePast
|
}
|
||||||
}
|
}
|
||||||
j.startTime = start
|
|
||||||
return nil
|
// OneTimeJobStartDateTimes sets the date & times at which the job should run.
|
||||||
|
// At least one of the date/times must be in the future (according to the scheduler clock).
|
||||||
|
func OneTimeJobStartDateTimes(times ...time.Time) OneTimeJobStartAtOption {
|
||||||
|
return func(_ *internalJob) []time.Time {
|
||||||
|
return times
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -480,12 +511,25 @@ func OneTimeJob(startAt OneTimeJobStartAtOption) JobDefinition {
|
|||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
|
|
||||||
// JobOption defines the constructor for job options.
|
// JobOption defines the constructor for job options.
|
||||||
type JobOption func(*internalJob) error
|
type JobOption func(*internalJob, time.Time) error
|
||||||
|
|
||||||
|
// WithDistributedJobLocker sets the locker to be used by multiple
|
||||||
|
// Scheduler instances to ensure that only one instance of each
|
||||||
|
// job is run.
|
||||||
|
func WithDistributedJobLocker(locker Locker) JobOption {
|
||||||
|
return func(j *internalJob, _ time.Time) error {
|
||||||
|
if locker == nil {
|
||||||
|
return ErrWithDistributedJobLockerNil
|
||||||
|
}
|
||||||
|
j.locker = locker
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// WithEventListeners sets the event listeners that should be
|
// WithEventListeners sets the event listeners that should be
|
||||||
// run for the job.
|
// run for the job.
|
||||||
func WithEventListeners(eventListeners ...EventListener) JobOption {
|
func WithEventListeners(eventListeners ...EventListener) JobOption {
|
||||||
return func(j *internalJob) error {
|
return func(j *internalJob, _ time.Time) error {
|
||||||
for _, eventListener := range eventListeners {
|
for _, eventListener := range eventListeners {
|
||||||
if err := eventListener(j); err != nil {
|
if err := eventListener(j); err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -498,7 +542,7 @@ func WithEventListeners(eventListeners ...EventListener) JobOption {
|
|||||||
// WithLimitedRuns limits the number of executions of this job to n.
|
// WithLimitedRuns limits the number of executions of this job to n.
|
||||||
// Upon reaching the limit, the job is removed from the scheduler.
|
// Upon reaching the limit, the job is removed from the scheduler.
|
||||||
func WithLimitedRuns(limit uint) JobOption {
|
func WithLimitedRuns(limit uint) JobOption {
|
||||||
return func(j *internalJob) error {
|
return func(j *internalJob, _ time.Time) error {
|
||||||
j.limitRunsTo = &limitRunsTo{
|
j.limitRunsTo = &limitRunsTo{
|
||||||
limit: limit,
|
limit: limit,
|
||||||
runCount: 0,
|
runCount: 0,
|
||||||
@@ -510,8 +554,7 @@ func WithLimitedRuns(limit uint) JobOption {
|
|||||||
// WithName sets the name of the job. Name provides
|
// WithName sets the name of the job. Name provides
|
||||||
// a human-readable identifier for the job.
|
// a human-readable identifier for the job.
|
||||||
func WithName(name string) JobOption {
|
func WithName(name string) JobOption {
|
||||||
// TODO use the name for metrics and future logging option
|
return func(j *internalJob, _ time.Time) error {
|
||||||
return func(j *internalJob) error {
|
|
||||||
if name == "" {
|
if name == "" {
|
||||||
return ErrWithNameEmpty
|
return ErrWithNameEmpty
|
||||||
}
|
}
|
||||||
@@ -524,7 +567,7 @@ func WithName(name string) JobOption {
|
|||||||
// This is useful for jobs that should not overlap, and that occasionally
|
// This is useful for jobs that should not overlap, and that occasionally
|
||||||
// (but not consistently) run longer than the interval between job runs.
|
// (but not consistently) run longer than the interval between job runs.
|
||||||
func WithSingletonMode(mode LimitMode) JobOption {
|
func WithSingletonMode(mode LimitMode) JobOption {
|
||||||
return func(j *internalJob) error {
|
return func(j *internalJob, _ time.Time) error {
|
||||||
j.singletonMode = true
|
j.singletonMode = true
|
||||||
j.singletonLimitMode = mode
|
j.singletonLimitMode = mode
|
||||||
return nil
|
return nil
|
||||||
@@ -534,19 +577,19 @@ func WithSingletonMode(mode LimitMode) JobOption {
|
|||||||
// WithStartAt sets the option for starting the job at
|
// WithStartAt sets the option for starting the job at
|
||||||
// a specific datetime.
|
// a specific datetime.
|
||||||
func WithStartAt(option StartAtOption) JobOption {
|
func WithStartAt(option StartAtOption) JobOption {
|
||||||
return func(j *internalJob) error {
|
return func(j *internalJob, now time.Time) error {
|
||||||
return option(j)
|
return option(j, now)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// StartAtOption defines options for starting the job
|
// StartAtOption defines options for starting the job
|
||||||
type StartAtOption func(*internalJob) error
|
type StartAtOption func(*internalJob, time.Time) error
|
||||||
|
|
||||||
// WithStartImmediately tells the scheduler to run the job immediately
|
// WithStartImmediately tells the scheduler to run the job immediately
|
||||||
// regardless of the type or schedule of job. After this immediate run
|
// regardless of the type or schedule of job. After this immediate run
|
||||||
// the job is scheduled from this time based on the job definition.
|
// the job is scheduled from this time based on the job definition.
|
||||||
func WithStartImmediately() StartAtOption {
|
func WithStartImmediately() StartAtOption {
|
||||||
return func(j *internalJob) error {
|
return func(j *internalJob, _ time.Time) error {
|
||||||
j.startImmediately = true
|
j.startImmediately = true
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -555,25 +598,69 @@ func WithStartImmediately() StartAtOption {
|
|||||||
// WithStartDateTime sets the first date & time at which the job should run.
|
// WithStartDateTime sets the first date & time at which the job should run.
|
||||||
// This datetime must be in the future.
|
// This datetime must be in the future.
|
||||||
func WithStartDateTime(start time.Time) StartAtOption {
|
func WithStartDateTime(start time.Time) StartAtOption {
|
||||||
return func(j *internalJob) error {
|
return func(j *internalJob, now time.Time) error {
|
||||||
if start.IsZero() || start.Before(time.Now()) {
|
if start.IsZero() || start.Before(now) {
|
||||||
return ErrWithStartDateTimePast
|
return ErrWithStartDateTimePast
|
||||||
}
|
}
|
||||||
|
if !j.stopTime.IsZero() && j.stopTime.Before(start) {
|
||||||
|
return ErrStartTimeLaterThanEndTime
|
||||||
|
}
|
||||||
j.startTime = start
|
j.startTime = start
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithStopAt sets the option for stopping the job from running
|
||||||
|
// after the specified time.
|
||||||
|
func WithStopAt(option StopAtOption) JobOption {
|
||||||
|
return func(j *internalJob, now time.Time) error {
|
||||||
|
return option(j, now)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// StopAtOption defines options for stopping the job
|
||||||
|
type StopAtOption func(*internalJob, time.Time) error
|
||||||
|
|
||||||
|
// WithStopDateTime sets the final date & time after which the job should stop.
|
||||||
|
// This must be in the future and should be after the startTime (if specified).
|
||||||
|
// The job's final run may be at the stop time, but not after.
|
||||||
|
func WithStopDateTime(end time.Time) StopAtOption {
|
||||||
|
return func(j *internalJob, now time.Time) error {
|
||||||
|
if end.IsZero() || end.Before(now) {
|
||||||
|
return ErrWithStopDateTimePast
|
||||||
|
}
|
||||||
|
if end.Before(j.startTime) {
|
||||||
|
return ErrStopTimeEarlierThanStartTime
|
||||||
|
}
|
||||||
|
j.stopTime = end
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// WithTags sets the tags for the job. Tags provide
|
// WithTags sets the tags for the job. Tags provide
|
||||||
// a way to identify jobs by a set of tags and remove
|
// a way to identify jobs by a set of tags and remove
|
||||||
// multiple jobs by tag.
|
// multiple jobs by tag.
|
||||||
func WithTags(tags ...string) JobOption {
|
func WithTags(tags ...string) JobOption {
|
||||||
return func(j *internalJob) error {
|
return func(j *internalJob, _ time.Time) error {
|
||||||
j.tags = tags
|
j.tags = tags
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithIdentifier sets the identifier for the job. The identifier
|
||||||
|
// is used to uniquely identify the job and is used for logging
|
||||||
|
// and metrics.
|
||||||
|
func WithIdentifier(id uuid.UUID) JobOption {
|
||||||
|
return func(j *internalJob, _ time.Time) error {
|
||||||
|
if id == uuid.Nil {
|
||||||
|
return ErrWithIdentifierNil
|
||||||
|
}
|
||||||
|
|
||||||
|
j.id = id
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
// ------------- Job Event Listeners -------------
|
// ------------- Job Event Listeners -------------
|
||||||
@@ -584,6 +671,18 @@ func WithTags(tags ...string) JobOption {
|
|||||||
// listeners that can be used to listen for job events.
|
// listeners that can be used to listen for job events.
|
||||||
type EventListener func(*internalJob) error
|
type EventListener func(*internalJob) error
|
||||||
|
|
||||||
|
// BeforeJobRuns is used to listen for when a job is about to run and
|
||||||
|
// then run the provided function.
|
||||||
|
func BeforeJobRuns(eventListenerFunc func(jobID uuid.UUID, jobName string)) EventListener {
|
||||||
|
return func(j *internalJob) error {
|
||||||
|
if eventListenerFunc == nil {
|
||||||
|
return ErrEventListenerFuncNil
|
||||||
|
}
|
||||||
|
j.beforeJobRuns = eventListenerFunc
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// AfterJobRuns is used to listen for when a job has run
|
// AfterJobRuns is used to listen for when a job has run
|
||||||
// without an error, and then run the provided function.
|
// without an error, and then run the provided function.
|
||||||
func AfterJobRuns(eventListenerFunc func(jobID uuid.UUID, jobName string)) EventListener {
|
func AfterJobRuns(eventListenerFunc func(jobID uuid.UUID, jobName string)) EventListener {
|
||||||
@@ -608,14 +707,26 @@ func AfterJobRunsWithError(eventListenerFunc func(jobID uuid.UUID, jobName strin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// BeforeJobRuns is used to listen for when a job is about to run and
|
// AfterJobRunsWithPanic is used to listen for when a job has run and
|
||||||
// then run the provided function.
|
// returned panicked recover data, and then run the provided function.
|
||||||
func BeforeJobRuns(eventListenerFunc func(jobID uuid.UUID, jobName string)) EventListener {
|
func AfterJobRunsWithPanic(eventListenerFunc func(jobID uuid.UUID, jobName string, recoverData any)) EventListener {
|
||||||
return func(j *internalJob) error {
|
return func(j *internalJob) error {
|
||||||
if eventListenerFunc == nil {
|
if eventListenerFunc == nil {
|
||||||
return ErrEventListenerFuncNil
|
return ErrEventListenerFuncNil
|
||||||
}
|
}
|
||||||
j.beforeJobRuns = eventListenerFunc
|
j.afterJobRunsWithPanic = eventListenerFunc
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// AfterLockError is used to when the distributed locker returns an error and
|
||||||
|
// then run the provided function.
|
||||||
|
func AfterLockError(eventListenerFunc func(jobID uuid.UUID, jobName string, err error)) EventListener {
|
||||||
|
return func(j *internalJob) error {
|
||||||
|
if eventListenerFunc == nil {
|
||||||
|
return ErrEventListenerFuncNil
|
||||||
|
}
|
||||||
|
j.afterLockError = eventListenerFunc
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -826,10 +937,33 @@ func (m monthlyJob) nextMonthDayAtTime(lastRun time.Time, days []int, firstPass
|
|||||||
|
|
||||||
var _ jobSchedule = (*oneTimeJob)(nil)
|
var _ jobSchedule = (*oneTimeJob)(nil)
|
||||||
|
|
||||||
type oneTimeJob struct{}
|
type oneTimeJob struct {
|
||||||
|
sortedTimes []time.Time
|
||||||
|
}
|
||||||
|
|
||||||
func (o oneTimeJob) next(_ time.Time) time.Time {
|
// next finds the next item in a sorted list of times using binary-search.
|
||||||
return time.Time{}
|
//
|
||||||
|
// example: sortedTimes: [2, 4, 6, 8]
|
||||||
|
//
|
||||||
|
// lastRun: 1 => [idx=0,found=false] => next is 2 - sorted[idx] idx=0
|
||||||
|
// lastRun: 2 => [idx=0,found=true] => next is 4 - sorted[idx+1] idx=1
|
||||||
|
// lastRun: 3 => [idx=1,found=false] => next is 4 - sorted[idx] idx=1
|
||||||
|
// lastRun: 4 => [idx=1,found=true] => next is 6 - sorted[idx+1] idx=2
|
||||||
|
// lastRun: 7 => [idx=3,found=false] => next is 8 - sorted[idx] idx=3
|
||||||
|
// lastRun: 8 => [idx=3,found=found] => next is none
|
||||||
|
// lastRun: 9 => [idx=3,found=found] => next is none
|
||||||
|
func (o oneTimeJob) next(lastRun time.Time) time.Time {
|
||||||
|
idx, found := slices.BinarySearchFunc(o.sortedTimes, lastRun, ascendingTime)
|
||||||
|
// if found, the next run is the following index
|
||||||
|
if found {
|
||||||
|
idx++
|
||||||
|
}
|
||||||
|
// exhausted runs
|
||||||
|
if idx >= len(o.sortedTimes) {
|
||||||
|
return time.Time{}
|
||||||
|
}
|
||||||
|
|
||||||
|
return o.sortedTimes[idx]
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
@@ -849,6 +983,8 @@ type Job interface {
|
|||||||
Name() string
|
Name() string
|
||||||
// NextRun returns the time of the job's next scheduled run.
|
// NextRun returns the time of the job's next scheduled run.
|
||||||
NextRun() (time.Time, error)
|
NextRun() (time.Time, error)
|
||||||
|
// NextRuns returns the requested number of calculated next run values.
|
||||||
|
NextRuns(int) ([]time.Time, error)
|
||||||
// RunNow runs the job once, now. This does not alter
|
// RunNow runs the job once, now. This does not alter
|
||||||
// the existing run schedule, and will respect all job
|
// the existing run schedule, and will respect all job
|
||||||
// and scheduler limits. This means that running a job now may
|
// and scheduler limits. This means that running a job now may
|
||||||
@@ -894,7 +1030,39 @@ func (j job) NextRun() (time.Time, error) {
|
|||||||
if ij == nil || ij.id == uuid.Nil {
|
if ij == nil || ij.id == uuid.Nil {
|
||||||
return time.Time{}, ErrJobNotFound
|
return time.Time{}, ErrJobNotFound
|
||||||
}
|
}
|
||||||
return ij.nextScheduled, nil
|
if len(ij.nextScheduled) == 0 {
|
||||||
|
return time.Time{}, nil
|
||||||
|
}
|
||||||
|
// the first element is the next scheduled run with subsequent
|
||||||
|
// runs following after in the slice
|
||||||
|
return ij.nextScheduled[0], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (j job) NextRuns(count int) ([]time.Time, error) {
|
||||||
|
ij := requestJob(j.id, j.jobOutRequest)
|
||||||
|
if ij == nil || ij.id == uuid.Nil {
|
||||||
|
return nil, ErrJobNotFound
|
||||||
|
}
|
||||||
|
|
||||||
|
lengthNextScheduled := len(ij.nextScheduled)
|
||||||
|
if lengthNextScheduled == 0 {
|
||||||
|
return nil, nil
|
||||||
|
} else if count <= lengthNextScheduled {
|
||||||
|
return ij.nextScheduled[:count], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
out := make([]time.Time, count)
|
||||||
|
for i := 0; i < count; i++ {
|
||||||
|
if i < lengthNextScheduled {
|
||||||
|
out[i] = ij.nextScheduled[i]
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
from := out[i-1]
|
||||||
|
out[i] = ij.next(from)
|
||||||
|
}
|
||||||
|
|
||||||
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (j job) Tags() []string {
|
func (j job) Tags() []string {
|
||||||
|
|||||||
1
vendor/github.com/go-co-op/gocron/v2/monitor.go
generated
vendored
1
vendor/github.com/go-co-op/gocron/v2/monitor.go
generated
vendored
@@ -13,6 +13,7 @@ type JobStatus string
|
|||||||
const (
|
const (
|
||||||
Fail JobStatus = "fail"
|
Fail JobStatus = "fail"
|
||||||
Success JobStatus = "success"
|
Success JobStatus = "success"
|
||||||
|
Skip JobStatus = "skip"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Monitor represents the interface to collect jobs metrics.
|
// Monitor represents the interface to collect jobs metrics.
|
||||||
|
|||||||
225
vendor/github.com/go-co-op/gocron/v2/scheduler.go
generated
vendored
225
vendor/github.com/go-co-op/gocron/v2/scheduler.go
generated
vendored
@@ -44,6 +44,9 @@ type Scheduler interface {
|
|||||||
// Update replaces the existing Job's JobDefinition with the provided
|
// Update replaces the existing Job's JobDefinition with the provided
|
||||||
// JobDefinition. The Job's Job.ID() remains the same.
|
// JobDefinition. The Job's Job.ID() remains the same.
|
||||||
Update(uuid.UUID, JobDefinition, Task, ...JobOption) (Job, error)
|
Update(uuid.UUID, JobDefinition, Task, ...JobOption) (Job, error)
|
||||||
|
// JobsWaitingInQueue number of jobs waiting in Queue in case of LimitModeWait
|
||||||
|
// In case of LimitModeReschedule or no limit it will be always zero
|
||||||
|
JobsWaitingInQueue() int
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
@@ -53,25 +56,43 @@ type Scheduler interface {
|
|||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
|
|
||||||
type scheduler struct {
|
type scheduler struct {
|
||||||
shutdownCtx context.Context
|
// context used for shutting down
|
||||||
shutdownCancel context.CancelFunc
|
shutdownCtx context.Context
|
||||||
exec executor
|
// cancel used to signal scheduler should shut down
|
||||||
jobs map[uuid.UUID]internalJob
|
shutdownCancel context.CancelFunc
|
||||||
location *time.Location
|
// the executor, which actually runs the jobs sent to it via the scheduler
|
||||||
clock clockwork.Clock
|
exec executor
|
||||||
started bool
|
// the map of jobs registered in the scheduler
|
||||||
|
jobs map[uuid.UUID]internalJob
|
||||||
|
// the location used by the scheduler for scheduling when relevant
|
||||||
|
location *time.Location
|
||||||
|
// whether the scheduler has been started or not
|
||||||
|
started bool
|
||||||
|
// globally applied JobOption's set on all jobs added to the scheduler
|
||||||
|
// note: individually set JobOption's take precedence.
|
||||||
globalJobOptions []JobOption
|
globalJobOptions []JobOption
|
||||||
logger Logger
|
// the scheduler's logger
|
||||||
|
logger Logger
|
||||||
|
|
||||||
startCh chan struct{}
|
// used to tell the scheduler to start
|
||||||
startedCh chan struct{}
|
startCh chan struct{}
|
||||||
stopCh chan struct{}
|
// used to report that the scheduler has started
|
||||||
stopErrCh chan error
|
startedCh chan struct{}
|
||||||
allJobsOutRequest chan allJobsOutRequest
|
// used to tell the scheduler to stop
|
||||||
jobOutRequestCh chan jobOutRequest
|
stopCh chan struct{}
|
||||||
runJobRequestCh chan runJobRequest
|
// used to report that the scheduler has stopped
|
||||||
newJobCh chan newJobIn
|
stopErrCh chan error
|
||||||
removeJobCh chan uuid.UUID
|
// used to send all the jobs out when a request is made by the client
|
||||||
|
allJobsOutRequest chan allJobsOutRequest
|
||||||
|
// used to send a jobs out when a request is made by the client
|
||||||
|
jobOutRequestCh chan jobOutRequest
|
||||||
|
// used to run a job on-demand when requested by the client
|
||||||
|
runJobRequestCh chan runJobRequest
|
||||||
|
// new jobs are received here
|
||||||
|
newJobCh chan newJobIn
|
||||||
|
// requests from the client to remove jobs by ID are received here
|
||||||
|
removeJobCh chan uuid.UUID
|
||||||
|
// requests from the client to remove jobs by tags are received here
|
||||||
removeJobsByTagsCh chan []string
|
removeJobsByTagsCh chan []string
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,6 +129,7 @@ func NewScheduler(options ...SchedulerOption) (Scheduler, error) {
|
|||||||
stopTimeout: time.Second * 10,
|
stopTimeout: time.Second * 10,
|
||||||
singletonRunners: nil,
|
singletonRunners: nil,
|
||||||
logger: &noOpLogger{},
|
logger: &noOpLogger{},
|
||||||
|
clock: clockwork.NewRealClock(),
|
||||||
|
|
||||||
jobsIn: make(chan jobIn),
|
jobsIn: make(chan jobIn),
|
||||||
jobsOutForRescheduling: make(chan uuid.UUID),
|
jobsOutForRescheduling: make(chan uuid.UUID),
|
||||||
@@ -122,7 +144,6 @@ func NewScheduler(options ...SchedulerOption) (Scheduler, error) {
|
|||||||
exec: exec,
|
exec: exec,
|
||||||
jobs: make(map[uuid.UUID]internalJob),
|
jobs: make(map[uuid.UUID]internalJob),
|
||||||
location: time.Local,
|
location: time.Local,
|
||||||
clock: clockwork.NewRealClock(),
|
|
||||||
logger: &noOpLogger{},
|
logger: &noOpLogger{},
|
||||||
|
|
||||||
newJobCh: make(chan newJobIn),
|
newJobCh: make(chan newJobIn),
|
||||||
@@ -292,20 +313,42 @@ func (s *scheduler) selectRemoveJob(id uuid.UUID) {
|
|||||||
// Jobs coming back from the executor to the scheduler that
|
// Jobs coming back from the executor to the scheduler that
|
||||||
// need to evaluated for rescheduling.
|
// need to evaluated for rescheduling.
|
||||||
func (s *scheduler) selectExecJobsOutForRescheduling(id uuid.UUID) {
|
func (s *scheduler) selectExecJobsOutForRescheduling(id uuid.UUID) {
|
||||||
|
select {
|
||||||
|
case <-s.shutdownCtx.Done():
|
||||||
|
return
|
||||||
|
default:
|
||||||
|
}
|
||||||
j, ok := s.jobs[id]
|
j, ok := s.jobs[id]
|
||||||
if !ok {
|
if !ok {
|
||||||
// the job was removed while it was running, and
|
// the job was removed while it was running, and
|
||||||
// so we don't need to reschedule it.
|
// so we don't need to reschedule it.
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
j.lastScheduledRun = j.nextScheduled
|
|
||||||
|
|
||||||
next := j.next(j.lastScheduledRun)
|
if j.stopTimeReached(s.now()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
scheduleFrom := j.lastRun
|
||||||
|
if len(j.nextScheduled) > 0 {
|
||||||
|
// always grab the last element in the slice as that is the furthest
|
||||||
|
// out in the future and the time from which we want to calculate
|
||||||
|
// the subsequent next run time.
|
||||||
|
slices.SortStableFunc(j.nextScheduled, ascendingTime)
|
||||||
|
scheduleFrom = j.nextScheduled[len(j.nextScheduled)-1]
|
||||||
|
}
|
||||||
|
|
||||||
|
if scheduleFrom.IsZero() {
|
||||||
|
scheduleFrom = j.startTime
|
||||||
|
}
|
||||||
|
|
||||||
|
next := j.next(scheduleFrom)
|
||||||
if next.IsZero() {
|
if next.IsZero() {
|
||||||
// the job's next function will return zero for OneTime jobs.
|
// the job's next function will return zero for OneTime jobs.
|
||||||
// since they are one time only, they do not need rescheduling.
|
// since they are one time only, they do not need rescheduling.
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if next.Before(s.now()) {
|
if next.Before(s.now()) {
|
||||||
// in some cases the next run time can be in the past, for example:
|
// in some cases the next run time can be in the past, for example:
|
||||||
// - the time on the machine was incorrect and has been synced with ntp
|
// - the time on the machine was incorrect and has been synced with ntp
|
||||||
@@ -316,8 +359,8 @@ func (s *scheduler) selectExecJobsOutForRescheduling(id uuid.UUID) {
|
|||||||
next = j.next(next)
|
next = j.next(next)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
j.nextScheduled = next
|
j.nextScheduled = append(j.nextScheduled, next)
|
||||||
j.timer = s.clock.AfterFunc(next.Sub(s.now()), func() {
|
j.timer = s.exec.clock.AfterFunc(next.Sub(s.now()), func() {
|
||||||
// set the actual timer on the job here and listen for
|
// set the actual timer on the job here and listen for
|
||||||
// shut down events so that the job doesn't attempt to
|
// shut down events so that the job doesn't attempt to
|
||||||
// run if the scheduler has been shutdown.
|
// run if the scheduler has been shutdown.
|
||||||
@@ -340,6 +383,17 @@ func (s *scheduler) selectExecJobsOutCompleted(id uuid.UUID) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if the job has nextScheduled time in the past,
|
||||||
|
// we need to remove any that are in the past.
|
||||||
|
var newNextScheduled []time.Time
|
||||||
|
for _, t := range j.nextScheduled {
|
||||||
|
if t.Before(s.now()) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
newNextScheduled = append(newNextScheduled, t)
|
||||||
|
}
|
||||||
|
j.nextScheduled = newNextScheduled
|
||||||
|
|
||||||
// if the job has a limited number of runs set, we need to
|
// if the job has a limited number of runs set, we need to
|
||||||
// check how many runs have occurred and stop running this
|
// check how many runs have occurred and stop running this
|
||||||
// job if it has reached the limit.
|
// job if it has reached the limit.
|
||||||
@@ -390,7 +444,7 @@ func (s *scheduler) selectNewJob(in newJobIn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
id := j.id
|
id := j.id
|
||||||
j.timer = s.clock.AfterFunc(next.Sub(s.now()), func() {
|
j.timer = s.exec.clock.AfterFunc(next.Sub(s.now()), func() {
|
||||||
select {
|
select {
|
||||||
case <-s.shutdownCtx.Done():
|
case <-s.shutdownCtx.Done():
|
||||||
case s.exec.jobsIn <- jobIn{
|
case s.exec.jobsIn <- jobIn{
|
||||||
@@ -400,7 +454,8 @@ func (s *scheduler) selectNewJob(in newJobIn) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
j.nextScheduled = next
|
j.startTime = next
|
||||||
|
j.nextScheduled = append(j.nextScheduled, next)
|
||||||
}
|
}
|
||||||
|
|
||||||
s.jobs[j.id] = j
|
s.jobs[j.id] = j
|
||||||
@@ -441,7 +496,7 @@ func (s *scheduler) selectStart() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jobID := id
|
jobID := id
|
||||||
j.timer = s.clock.AfterFunc(next.Sub(s.now()), func() {
|
j.timer = s.exec.clock.AfterFunc(next.Sub(s.now()), func() {
|
||||||
select {
|
select {
|
||||||
case <-s.shutdownCtx.Done():
|
case <-s.shutdownCtx.Done():
|
||||||
case s.exec.jobsIn <- jobIn{
|
case s.exec.jobsIn <- jobIn{
|
||||||
@@ -451,7 +506,8 @@ func (s *scheduler) selectStart() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
j.nextScheduled = next
|
j.startTime = next
|
||||||
|
j.nextScheduled = append(j.nextScheduled, next)
|
||||||
s.jobs[id] = j
|
s.jobs[id] = j
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
@@ -468,7 +524,7 @@ func (s *scheduler) selectStart() {
|
|||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
|
|
||||||
func (s *scheduler) now() time.Time {
|
func (s *scheduler) now() time.Time {
|
||||||
return s.clock.Now().In(s.location)
|
return s.exec.clock.Now().In(s.location)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *scheduler) jobFromInternalJob(in internalJob) job {
|
func (s *scheduler) jobFromInternalJob(in internalJob) job {
|
||||||
@@ -501,6 +557,70 @@ func (s *scheduler) NewJob(jobDefinition JobDefinition, task Task, options ...Jo
|
|||||||
return s.addOrUpdateJob(uuid.Nil, jobDefinition, task, options)
|
return s.addOrUpdateJob(uuid.Nil, jobDefinition, task, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *scheduler) verifyInterfaceVariadic(taskFunc reflect.Value, tsk task, variadicStart int) error {
|
||||||
|
ifaceType := taskFunc.Type().In(variadicStart).Elem()
|
||||||
|
for i := variadicStart; i < len(tsk.parameters); i++ {
|
||||||
|
if !reflect.TypeOf(tsk.parameters[i]).Implements(ifaceType) {
|
||||||
|
return ErrNewJobWrongTypeOfParameters
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *scheduler) verifyVariadic(taskFunc reflect.Value, tsk task, variadicStart int) error {
|
||||||
|
if err := s.verifyNonVariadic(taskFunc, tsk, variadicStart); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
parameterType := taskFunc.Type().In(variadicStart).Elem().Kind()
|
||||||
|
if parameterType == reflect.Interface {
|
||||||
|
return s.verifyInterfaceVariadic(taskFunc, tsk, variadicStart)
|
||||||
|
}
|
||||||
|
if parameterType == reflect.Pointer {
|
||||||
|
parameterType = reflect.Indirect(reflect.ValueOf(taskFunc.Type().In(variadicStart))).Kind()
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := variadicStart; i < len(tsk.parameters); i++ {
|
||||||
|
argumentType := reflect.TypeOf(tsk.parameters[i]).Kind()
|
||||||
|
if argumentType == reflect.Interface || argumentType == reflect.Pointer {
|
||||||
|
argumentType = reflect.TypeOf(tsk.parameters[i]).Elem().Kind()
|
||||||
|
}
|
||||||
|
if argumentType != parameterType {
|
||||||
|
return ErrNewJobWrongTypeOfParameters
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *scheduler) verifyNonVariadic(taskFunc reflect.Value, tsk task, length int) error {
|
||||||
|
for i := 0; i < length; i++ {
|
||||||
|
t1 := reflect.TypeOf(tsk.parameters[i]).Kind()
|
||||||
|
if t1 == reflect.Interface || t1 == reflect.Pointer {
|
||||||
|
t1 = reflect.TypeOf(tsk.parameters[i]).Elem().Kind()
|
||||||
|
}
|
||||||
|
t2 := reflect.New(taskFunc.Type().In(i)).Elem().Kind()
|
||||||
|
if t2 == reflect.Interface || t2 == reflect.Pointer {
|
||||||
|
t2 = reflect.Indirect(reflect.ValueOf(taskFunc.Type().In(i))).Kind()
|
||||||
|
}
|
||||||
|
if t1 != t2 {
|
||||||
|
return ErrNewJobWrongTypeOfParameters
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *scheduler) verifyParameterType(taskFunc reflect.Value, tsk task) error {
|
||||||
|
isVariadic := taskFunc.Type().IsVariadic()
|
||||||
|
if isVariadic {
|
||||||
|
variadicStart := taskFunc.Type().NumIn() - 1
|
||||||
|
return s.verifyVariadic(taskFunc, tsk, variadicStart)
|
||||||
|
}
|
||||||
|
expectedParameterLength := taskFunc.Type().NumIn()
|
||||||
|
if len(tsk.parameters) != expectedParameterLength {
|
||||||
|
return ErrNewJobWrongNumberOfParameters
|
||||||
|
}
|
||||||
|
return s.verifyNonVariadic(taskFunc, tsk, expectedParameterLength)
|
||||||
|
}
|
||||||
|
|
||||||
func (s *scheduler) addOrUpdateJob(id uuid.UUID, definition JobDefinition, taskWrapper Task, options []JobOption) (Job, error) {
|
func (s *scheduler) addOrUpdateJob(id uuid.UUID, definition JobDefinition, taskWrapper Task, options []JobOption) (Job, error) {
|
||||||
j := internalJob{}
|
j := internalJob{}
|
||||||
if id == uuid.Nil {
|
if id == uuid.Nil {
|
||||||
@@ -535,23 +655,8 @@ func (s *scheduler) addOrUpdateJob(id uuid.UUID, definition JobDefinition, taskW
|
|||||||
return nil, ErrNewJobTaskNotFunc
|
return nil, ErrNewJobTaskNotFunc
|
||||||
}
|
}
|
||||||
|
|
||||||
expectedParameterLength := taskFunc.Type().NumIn()
|
if err := s.verifyParameterType(taskFunc, tsk); err != nil {
|
||||||
if len(tsk.parameters) != expectedParameterLength {
|
return nil, err
|
||||||
return nil, ErrNewJobWrongNumberOfParameters
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := 0; i < expectedParameterLength; i++ {
|
|
||||||
t1 := reflect.TypeOf(tsk.parameters[i]).Kind()
|
|
||||||
if t1 == reflect.Interface || t1 == reflect.Pointer {
|
|
||||||
t1 = reflect.TypeOf(tsk.parameters[i]).Elem().Kind()
|
|
||||||
}
|
|
||||||
t2 := reflect.New(taskFunc.Type().In(i)).Elem().Kind()
|
|
||||||
if t2 == reflect.Interface || t2 == reflect.Pointer {
|
|
||||||
t2 = reflect.Indirect(reflect.ValueOf(taskFunc.Type().In(i))).Kind()
|
|
||||||
}
|
|
||||||
if t1 != t2 {
|
|
||||||
return nil, ErrNewJobWrongTypeOfParameters
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
j.name = runtime.FuncForPC(taskFunc.Pointer()).Name()
|
j.name = runtime.FuncForPC(taskFunc.Pointer()).Name()
|
||||||
@@ -560,19 +665,19 @@ func (s *scheduler) addOrUpdateJob(id uuid.UUID, definition JobDefinition, taskW
|
|||||||
|
|
||||||
// apply global job options
|
// apply global job options
|
||||||
for _, option := range s.globalJobOptions {
|
for _, option := range s.globalJobOptions {
|
||||||
if err := option(&j); err != nil {
|
if err := option(&j, s.now()); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// apply job specific options, which take precedence
|
// apply job specific options, which take precedence
|
||||||
for _, option := range options {
|
for _, option := range options {
|
||||||
if err := option(&j); err != nil {
|
if err := option(&j, s.now()); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := definition.setup(&j, s.location); err != nil {
|
if err := definition.setup(&j, s.location, s.exec.clock.Now()); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -591,13 +696,8 @@ func (s *scheduler) addOrUpdateJob(id uuid.UUID, definition JobDefinition, taskW
|
|||||||
case <-s.shutdownCtx.Done():
|
case <-s.shutdownCtx.Done():
|
||||||
}
|
}
|
||||||
|
|
||||||
return &job{
|
out := s.jobFromInternalJob(j)
|
||||||
id: j.id,
|
return &out, nil
|
||||||
name: j.name,
|
|
||||||
tags: slices.Clone(j.tags),
|
|
||||||
jobOutRequest: s.jobOutRequestCh,
|
|
||||||
runJobRequest: s.runJobRequestCh,
|
|
||||||
}, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *scheduler) RemoveByTags(tags ...string) {
|
func (s *scheduler) RemoveByTags(tags ...string) {
|
||||||
@@ -656,6 +756,13 @@ func (s *scheduler) Update(id uuid.UUID, jobDefinition JobDefinition, task Task,
|
|||||||
return s.addOrUpdateJob(id, jobDefinition, task, options)
|
return s.addOrUpdateJob(id, jobDefinition, task, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *scheduler) JobsWaitingInQueue() int {
|
||||||
|
if s.exec.limitMode != nil && s.exec.limitMode.mode == LimitModeWait {
|
||||||
|
return len(s.exec.limitMode.in)
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
// ------------- Scheduler Options ---------------
|
// ------------- Scheduler Options ---------------
|
||||||
@@ -673,7 +780,7 @@ func WithClock(clock clockwork.Clock) SchedulerOption {
|
|||||||
if clock == nil {
|
if clock == nil {
|
||||||
return ErrWithClockNil
|
return ErrWithClockNil
|
||||||
}
|
}
|
||||||
s.clock = clock
|
s.exec.clock = clock
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -756,6 +863,14 @@ const (
|
|||||||
// WithLimitConcurrentJobs sets the limit and mode to be used by the
|
// WithLimitConcurrentJobs sets the limit and mode to be used by the
|
||||||
// Scheduler for limiting the number of jobs that may be running at
|
// Scheduler for limiting the number of jobs that may be running at
|
||||||
// a given time.
|
// a given time.
|
||||||
|
//
|
||||||
|
// Note: the limit mode selected for WithLimitConcurrentJobs takes initial
|
||||||
|
// precedence in the event you are also running a limit mode at the job level
|
||||||
|
// using WithSingletonMode.
|
||||||
|
//
|
||||||
|
// Warning: a single time consuming job can dominate your limit in the event
|
||||||
|
// you are running both the scheduler limit WithLimitConcurrentJobs(1, LimitModeWait)
|
||||||
|
// and a job limit WithSingletonMode(LimitModeReschedule).
|
||||||
func WithLimitConcurrentJobs(limit uint, mode LimitMode) SchedulerOption {
|
func WithLimitConcurrentJobs(limit uint, mode LimitMode) SchedulerOption {
|
||||||
return func(s *scheduler) error {
|
return func(s *scheduler) error {
|
||||||
if limit == 0 {
|
if limit == 0 {
|
||||||
|
|||||||
8
vendor/github.com/go-co-op/gocron/v2/util.go
generated
vendored
8
vendor/github.com/go-co-op/gocron/v2/util.go
generated
vendored
@@ -88,12 +88,14 @@ func convertAtTimesToDateTime(atTimes AtTimes, location *time.Location) ([]time.
|
|||||||
}
|
}
|
||||||
atTimesDate = append(atTimesDate, at.time(location))
|
atTimesDate = append(atTimesDate, at.time(location))
|
||||||
}
|
}
|
||||||
slices.SortStableFunc(atTimesDate, func(a, b time.Time) int {
|
slices.SortStableFunc(atTimesDate, ascendingTime)
|
||||||
return a.Compare(b)
|
|
||||||
})
|
|
||||||
return atTimesDate, nil
|
return atTimesDate, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ascendingTime(a, b time.Time) int {
|
||||||
|
return a.Compare(b)
|
||||||
|
}
|
||||||
|
|
||||||
type waitGroupWithMutex struct {
|
type waitGroupWithMutex struct {
|
||||||
wg sync.WaitGroup
|
wg sync.WaitGroup
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
|
|||||||
4
vendor/golang.org/x/exp/LICENSE
generated
vendored
4
vendor/golang.org/x/exp/LICENSE
generated
vendored
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
Copyright 2009 The Go Authors.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are
|
modification, are permitted provided that the following conditions are
|
||||||
@@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
|
|||||||
copyright notice, this list of conditions and the following disclaimer
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
in the documentation and/or other materials provided with the
|
in the documentation and/or other materials provided with the
|
||||||
distribution.
|
distribution.
|
||||||
* Neither the name of Google Inc. nor the names of its
|
* Neither the name of Google LLC nor the names of its
|
||||||
contributors may be used to endorse or promote products derived from
|
contributors may be used to endorse or promote products derived from
|
||||||
this software without specific prior written permission.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
|||||||
4
vendor/golang.org/x/exp/slices/sort.go
generated
vendored
4
vendor/golang.org/x/exp/slices/sort.go
generated
vendored
@@ -22,10 +22,12 @@ func Sort[S ~[]E, E constraints.Ordered](x S) {
|
|||||||
// SortFunc sorts the slice x in ascending order as determined by the cmp
|
// SortFunc sorts the slice x in ascending order as determined by the cmp
|
||||||
// function. This sort is not guaranteed to be stable.
|
// function. This sort is not guaranteed to be stable.
|
||||||
// cmp(a, b) should return a negative number when a < b, a positive number when
|
// cmp(a, b) should return a negative number when a < b, a positive number when
|
||||||
// a > b and zero when a == b.
|
// a > b and zero when a == b or when a is not comparable to b in the sense
|
||||||
|
// of the formal definition of Strict Weak Ordering.
|
||||||
//
|
//
|
||||||
// SortFunc requires that cmp is a strict weak ordering.
|
// SortFunc requires that cmp is a strict weak ordering.
|
||||||
// See https://en.wikipedia.org/wiki/Weak_ordering#Strict_weak_orderings.
|
// See https://en.wikipedia.org/wiki/Weak_ordering#Strict_weak_orderings.
|
||||||
|
// To indicate 'uncomparable', return 0 from the function.
|
||||||
func SortFunc[S ~[]E, E any](x S, cmp func(a, b E) int) {
|
func SortFunc[S ~[]E, E any](x S, cmp func(a, b E) int) {
|
||||||
n := len(x)
|
n := len(x)
|
||||||
pdqsortCmpFunc(x, 0, n, bits.Len(uint(n)), cmp)
|
pdqsortCmpFunc(x, 0, n, bits.Len(uint(n)), cmp)
|
||||||
|
|||||||
4
vendor/golang.org/x/sys/LICENSE
generated
vendored
4
vendor/golang.org/x/sys/LICENSE
generated
vendored
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
Copyright 2009 The Go Authors.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are
|
modification, are permitted provided that the following conditions are
|
||||||
@@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
|
|||||||
copyright notice, this list of conditions and the following disclaimer
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
in the documentation and/or other materials provided with the
|
in the documentation and/or other materials provided with the
|
||||||
distribution.
|
distribution.
|
||||||
* Neither the name of Google Inc. nor the names of its
|
* Neither the name of Google LLC nor the names of its
|
||||||
contributors may be used to endorse or promote products derived from
|
contributors may be used to endorse or promote products derived from
|
||||||
this software without specific prior written permission.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
|||||||
675
vendor/golang.org/x/sys/unix/asm_zos_s390x.s
generated
vendored
675
vendor/golang.org/x/sys/unix/asm_zos_s390x.s
generated
vendored
@@ -9,9 +9,11 @@
|
|||||||
#define PSALAA 1208(R0)
|
#define PSALAA 1208(R0)
|
||||||
#define GTAB64(x) 80(x)
|
#define GTAB64(x) 80(x)
|
||||||
#define LCA64(x) 88(x)
|
#define LCA64(x) 88(x)
|
||||||
|
#define SAVSTACK_ASYNC(x) 336(x) // in the LCA
|
||||||
#define CAA(x) 8(x)
|
#define CAA(x) 8(x)
|
||||||
#define EDCHPXV(x) 1016(x) // in the CAA
|
#define CEECAATHDID(x) 976(x) // in the CAA
|
||||||
#define SAVSTACK_ASYNC(x) 336(x) // in the LCA
|
#define EDCHPXV(x) 1016(x) // in the CAA
|
||||||
|
#define GOCB(x) 1104(x) // in the CAA
|
||||||
|
|
||||||
// SS_*, where x=SAVSTACK_ASYNC
|
// SS_*, where x=SAVSTACK_ASYNC
|
||||||
#define SS_LE(x) 0(x)
|
#define SS_LE(x) 0(x)
|
||||||
@@ -19,394 +21,125 @@
|
|||||||
#define SS_ERRNO(x) 16(x)
|
#define SS_ERRNO(x) 16(x)
|
||||||
#define SS_ERRNOJR(x) 20(x)
|
#define SS_ERRNOJR(x) 20(x)
|
||||||
|
|
||||||
#define LE_CALL BYTE $0x0D; BYTE $0x76; // BL R7, R6
|
// Function Descriptor Offsets
|
||||||
|
#define __errno 0x156*16
|
||||||
|
#define __err2ad 0x16C*16
|
||||||
|
|
||||||
TEXT ·clearErrno(SB),NOSPLIT,$0-0
|
// Call Instructions
|
||||||
BL addrerrno<>(SB)
|
#define LE_CALL BYTE $0x0D; BYTE $0x76 // BL R7, R6
|
||||||
MOVD $0, 0(R3)
|
#define SVC_LOAD BYTE $0x0A; BYTE $0x08 // SVC 08 LOAD
|
||||||
|
#define SVC_DELETE BYTE $0x0A; BYTE $0x09 // SVC 09 DELETE
|
||||||
|
|
||||||
|
DATA zosLibVec<>(SB)/8, $0
|
||||||
|
GLOBL zosLibVec<>(SB), NOPTR, $8
|
||||||
|
|
||||||
|
TEXT ·initZosLibVec(SB), NOSPLIT|NOFRAME, $0-0
|
||||||
|
MOVW PSALAA, R8
|
||||||
|
MOVD LCA64(R8), R8
|
||||||
|
MOVD CAA(R8), R8
|
||||||
|
MOVD EDCHPXV(R8), R8
|
||||||
|
MOVD R8, zosLibVec<>(SB)
|
||||||
|
RET
|
||||||
|
|
||||||
|
TEXT ·GetZosLibVec(SB), NOSPLIT|NOFRAME, $0-0
|
||||||
|
MOVD zosLibVec<>(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
TEXT ·clearErrno(SB), NOSPLIT, $0-0
|
||||||
|
BL addrerrno<>(SB)
|
||||||
|
MOVD $0, 0(R3)
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// Returns the address of errno in R3.
|
// Returns the address of errno in R3.
|
||||||
TEXT addrerrno<>(SB),NOSPLIT|NOFRAME,$0-0
|
TEXT addrerrno<>(SB), NOSPLIT|NOFRAME, $0-0
|
||||||
// Get library control area (LCA).
|
// Get library control area (LCA).
|
||||||
MOVW PSALAA, R8
|
MOVW PSALAA, R8
|
||||||
MOVD LCA64(R8), R8
|
MOVD LCA64(R8), R8
|
||||||
|
|
||||||
// Get __errno FuncDesc.
|
// Get __errno FuncDesc.
|
||||||
MOVD CAA(R8), R9
|
MOVD CAA(R8), R9
|
||||||
MOVD EDCHPXV(R9), R9
|
MOVD EDCHPXV(R9), R9
|
||||||
ADD $(0x156*16), R9
|
ADD $(__errno), R9
|
||||||
LMG 0(R9), R5, R6
|
LMG 0(R9), R5, R6
|
||||||
|
|
||||||
// Switch to saved LE stack.
|
// Switch to saved LE stack.
|
||||||
MOVD SAVSTACK_ASYNC(R8), R9
|
MOVD SAVSTACK_ASYNC(R8), R9
|
||||||
MOVD 0(R9), R4
|
MOVD 0(R9), R4
|
||||||
MOVD $0, 0(R9)
|
MOVD $0, 0(R9)
|
||||||
|
|
||||||
// Call __errno function.
|
// Call __errno function.
|
||||||
LE_CALL
|
LE_CALL
|
||||||
NOPH
|
NOPH
|
||||||
|
|
||||||
// Switch back to Go stack.
|
// Switch back to Go stack.
|
||||||
XOR R0, R0 // Restore R0 to $0.
|
XOR R0, R0 // Restore R0 to $0.
|
||||||
MOVD R4, 0(R9) // Save stack pointer.
|
MOVD R4, 0(R9) // Save stack pointer.
|
||||||
RET
|
|
||||||
|
|
||||||
TEXT ·syscall_syscall(SB),NOSPLIT,$0-56
|
|
||||||
BL runtime·entersyscall(SB)
|
|
||||||
MOVD a1+8(FP), R1
|
|
||||||
MOVD a2+16(FP), R2
|
|
||||||
MOVD a3+24(FP), R3
|
|
||||||
|
|
||||||
// Get library control area (LCA).
|
|
||||||
MOVW PSALAA, R8
|
|
||||||
MOVD LCA64(R8), R8
|
|
||||||
|
|
||||||
// Get function.
|
|
||||||
MOVD CAA(R8), R9
|
|
||||||
MOVD EDCHPXV(R9), R9
|
|
||||||
MOVD trap+0(FP), R5
|
|
||||||
SLD $4, R5
|
|
||||||
ADD R5, R9
|
|
||||||
LMG 0(R9), R5, R6
|
|
||||||
|
|
||||||
// Restore LE stack.
|
|
||||||
MOVD SAVSTACK_ASYNC(R8), R9
|
|
||||||
MOVD 0(R9), R4
|
|
||||||
MOVD $0, 0(R9)
|
|
||||||
|
|
||||||
// Call function.
|
|
||||||
LE_CALL
|
|
||||||
NOPH
|
|
||||||
XOR R0, R0 // Restore R0 to $0.
|
|
||||||
MOVD R4, 0(R9) // Save stack pointer.
|
|
||||||
|
|
||||||
MOVD R3, r1+32(FP)
|
|
||||||
MOVD R0, r2+40(FP)
|
|
||||||
MOVD R0, err+48(FP)
|
|
||||||
MOVW R3, R4
|
|
||||||
CMP R4, $-1
|
|
||||||
BNE done
|
|
||||||
BL addrerrno<>(SB)
|
|
||||||
MOVWZ 0(R3), R3
|
|
||||||
MOVD R3, err+48(FP)
|
|
||||||
done:
|
|
||||||
BL runtime·exitsyscall(SB)
|
|
||||||
RET
|
|
||||||
|
|
||||||
TEXT ·syscall_rawsyscall(SB),NOSPLIT,$0-56
|
|
||||||
MOVD a1+8(FP), R1
|
|
||||||
MOVD a2+16(FP), R2
|
|
||||||
MOVD a3+24(FP), R3
|
|
||||||
|
|
||||||
// Get library control area (LCA).
|
|
||||||
MOVW PSALAA, R8
|
|
||||||
MOVD LCA64(R8), R8
|
|
||||||
|
|
||||||
// Get function.
|
|
||||||
MOVD CAA(R8), R9
|
|
||||||
MOVD EDCHPXV(R9), R9
|
|
||||||
MOVD trap+0(FP), R5
|
|
||||||
SLD $4, R5
|
|
||||||
ADD R5, R9
|
|
||||||
LMG 0(R9), R5, R6
|
|
||||||
|
|
||||||
// Restore LE stack.
|
|
||||||
MOVD SAVSTACK_ASYNC(R8), R9
|
|
||||||
MOVD 0(R9), R4
|
|
||||||
MOVD $0, 0(R9)
|
|
||||||
|
|
||||||
// Call function.
|
|
||||||
LE_CALL
|
|
||||||
NOPH
|
|
||||||
XOR R0, R0 // Restore R0 to $0.
|
|
||||||
MOVD R4, 0(R9) // Save stack pointer.
|
|
||||||
|
|
||||||
MOVD R3, r1+32(FP)
|
|
||||||
MOVD R0, r2+40(FP)
|
|
||||||
MOVD R0, err+48(FP)
|
|
||||||
MOVW R3, R4
|
|
||||||
CMP R4, $-1
|
|
||||||
BNE done
|
|
||||||
BL addrerrno<>(SB)
|
|
||||||
MOVWZ 0(R3), R3
|
|
||||||
MOVD R3, err+48(FP)
|
|
||||||
done:
|
|
||||||
RET
|
|
||||||
|
|
||||||
TEXT ·syscall_syscall6(SB),NOSPLIT,$0-80
|
|
||||||
BL runtime·entersyscall(SB)
|
|
||||||
MOVD a1+8(FP), R1
|
|
||||||
MOVD a2+16(FP), R2
|
|
||||||
MOVD a3+24(FP), R3
|
|
||||||
|
|
||||||
// Get library control area (LCA).
|
|
||||||
MOVW PSALAA, R8
|
|
||||||
MOVD LCA64(R8), R8
|
|
||||||
|
|
||||||
// Get function.
|
|
||||||
MOVD CAA(R8), R9
|
|
||||||
MOVD EDCHPXV(R9), R9
|
|
||||||
MOVD trap+0(FP), R5
|
|
||||||
SLD $4, R5
|
|
||||||
ADD R5, R9
|
|
||||||
LMG 0(R9), R5, R6
|
|
||||||
|
|
||||||
// Restore LE stack.
|
|
||||||
MOVD SAVSTACK_ASYNC(R8), R9
|
|
||||||
MOVD 0(R9), R4
|
|
||||||
MOVD $0, 0(R9)
|
|
||||||
|
|
||||||
// Fill in parameter list.
|
|
||||||
MOVD a4+32(FP), R12
|
|
||||||
MOVD R12, (2176+24)(R4)
|
|
||||||
MOVD a5+40(FP), R12
|
|
||||||
MOVD R12, (2176+32)(R4)
|
|
||||||
MOVD a6+48(FP), R12
|
|
||||||
MOVD R12, (2176+40)(R4)
|
|
||||||
|
|
||||||
// Call function.
|
|
||||||
LE_CALL
|
|
||||||
NOPH
|
|
||||||
XOR R0, R0 // Restore R0 to $0.
|
|
||||||
MOVD R4, 0(R9) // Save stack pointer.
|
|
||||||
|
|
||||||
MOVD R3, r1+56(FP)
|
|
||||||
MOVD R0, r2+64(FP)
|
|
||||||
MOVD R0, err+72(FP)
|
|
||||||
MOVW R3, R4
|
|
||||||
CMP R4, $-1
|
|
||||||
BNE done
|
|
||||||
BL addrerrno<>(SB)
|
|
||||||
MOVWZ 0(R3), R3
|
|
||||||
MOVD R3, err+72(FP)
|
|
||||||
done:
|
|
||||||
BL runtime·exitsyscall(SB)
|
|
||||||
RET
|
|
||||||
|
|
||||||
TEXT ·syscall_rawsyscall6(SB),NOSPLIT,$0-80
|
|
||||||
MOVD a1+8(FP), R1
|
|
||||||
MOVD a2+16(FP), R2
|
|
||||||
MOVD a3+24(FP), R3
|
|
||||||
|
|
||||||
// Get library control area (LCA).
|
|
||||||
MOVW PSALAA, R8
|
|
||||||
MOVD LCA64(R8), R8
|
|
||||||
|
|
||||||
// Get function.
|
|
||||||
MOVD CAA(R8), R9
|
|
||||||
MOVD EDCHPXV(R9), R9
|
|
||||||
MOVD trap+0(FP), R5
|
|
||||||
SLD $4, R5
|
|
||||||
ADD R5, R9
|
|
||||||
LMG 0(R9), R5, R6
|
|
||||||
|
|
||||||
// Restore LE stack.
|
|
||||||
MOVD SAVSTACK_ASYNC(R8), R9
|
|
||||||
MOVD 0(R9), R4
|
|
||||||
MOVD $0, 0(R9)
|
|
||||||
|
|
||||||
// Fill in parameter list.
|
|
||||||
MOVD a4+32(FP), R12
|
|
||||||
MOVD R12, (2176+24)(R4)
|
|
||||||
MOVD a5+40(FP), R12
|
|
||||||
MOVD R12, (2176+32)(R4)
|
|
||||||
MOVD a6+48(FP), R12
|
|
||||||
MOVD R12, (2176+40)(R4)
|
|
||||||
|
|
||||||
// Call function.
|
|
||||||
LE_CALL
|
|
||||||
NOPH
|
|
||||||
XOR R0, R0 // Restore R0 to $0.
|
|
||||||
MOVD R4, 0(R9) // Save stack pointer.
|
|
||||||
|
|
||||||
MOVD R3, r1+56(FP)
|
|
||||||
MOVD R0, r2+64(FP)
|
|
||||||
MOVD R0, err+72(FP)
|
|
||||||
MOVW R3, R4
|
|
||||||
CMP R4, $-1
|
|
||||||
BNE done
|
|
||||||
BL ·rrno<>(SB)
|
|
||||||
MOVWZ 0(R3), R3
|
|
||||||
MOVD R3, err+72(FP)
|
|
||||||
done:
|
|
||||||
RET
|
|
||||||
|
|
||||||
TEXT ·syscall_syscall9(SB),NOSPLIT,$0
|
|
||||||
BL runtime·entersyscall(SB)
|
|
||||||
MOVD a1+8(FP), R1
|
|
||||||
MOVD a2+16(FP), R2
|
|
||||||
MOVD a3+24(FP), R3
|
|
||||||
|
|
||||||
// Get library control area (LCA).
|
|
||||||
MOVW PSALAA, R8
|
|
||||||
MOVD LCA64(R8), R8
|
|
||||||
|
|
||||||
// Get function.
|
|
||||||
MOVD CAA(R8), R9
|
|
||||||
MOVD EDCHPXV(R9), R9
|
|
||||||
MOVD trap+0(FP), R5
|
|
||||||
SLD $4, R5
|
|
||||||
ADD R5, R9
|
|
||||||
LMG 0(R9), R5, R6
|
|
||||||
|
|
||||||
// Restore LE stack.
|
|
||||||
MOVD SAVSTACK_ASYNC(R8), R9
|
|
||||||
MOVD 0(R9), R4
|
|
||||||
MOVD $0, 0(R9)
|
|
||||||
|
|
||||||
// Fill in parameter list.
|
|
||||||
MOVD a4+32(FP), R12
|
|
||||||
MOVD R12, (2176+24)(R4)
|
|
||||||
MOVD a5+40(FP), R12
|
|
||||||
MOVD R12, (2176+32)(R4)
|
|
||||||
MOVD a6+48(FP), R12
|
|
||||||
MOVD R12, (2176+40)(R4)
|
|
||||||
MOVD a7+56(FP), R12
|
|
||||||
MOVD R12, (2176+48)(R4)
|
|
||||||
MOVD a8+64(FP), R12
|
|
||||||
MOVD R12, (2176+56)(R4)
|
|
||||||
MOVD a9+72(FP), R12
|
|
||||||
MOVD R12, (2176+64)(R4)
|
|
||||||
|
|
||||||
// Call function.
|
|
||||||
LE_CALL
|
|
||||||
NOPH
|
|
||||||
XOR R0, R0 // Restore R0 to $0.
|
|
||||||
MOVD R4, 0(R9) // Save stack pointer.
|
|
||||||
|
|
||||||
MOVD R3, r1+80(FP)
|
|
||||||
MOVD R0, r2+88(FP)
|
|
||||||
MOVD R0, err+96(FP)
|
|
||||||
MOVW R3, R4
|
|
||||||
CMP R4, $-1
|
|
||||||
BNE done
|
|
||||||
BL addrerrno<>(SB)
|
|
||||||
MOVWZ 0(R3), R3
|
|
||||||
MOVD R3, err+96(FP)
|
|
||||||
done:
|
|
||||||
BL runtime·exitsyscall(SB)
|
|
||||||
RET
|
|
||||||
|
|
||||||
TEXT ·syscall_rawsyscall9(SB),NOSPLIT,$0
|
|
||||||
MOVD a1+8(FP), R1
|
|
||||||
MOVD a2+16(FP), R2
|
|
||||||
MOVD a3+24(FP), R3
|
|
||||||
|
|
||||||
// Get library control area (LCA).
|
|
||||||
MOVW PSALAA, R8
|
|
||||||
MOVD LCA64(R8), R8
|
|
||||||
|
|
||||||
// Get function.
|
|
||||||
MOVD CAA(R8), R9
|
|
||||||
MOVD EDCHPXV(R9), R9
|
|
||||||
MOVD trap+0(FP), R5
|
|
||||||
SLD $4, R5
|
|
||||||
ADD R5, R9
|
|
||||||
LMG 0(R9), R5, R6
|
|
||||||
|
|
||||||
// Restore LE stack.
|
|
||||||
MOVD SAVSTACK_ASYNC(R8), R9
|
|
||||||
MOVD 0(R9), R4
|
|
||||||
MOVD $0, 0(R9)
|
|
||||||
|
|
||||||
// Fill in parameter list.
|
|
||||||
MOVD a4+32(FP), R12
|
|
||||||
MOVD R12, (2176+24)(R4)
|
|
||||||
MOVD a5+40(FP), R12
|
|
||||||
MOVD R12, (2176+32)(R4)
|
|
||||||
MOVD a6+48(FP), R12
|
|
||||||
MOVD R12, (2176+40)(R4)
|
|
||||||
MOVD a7+56(FP), R12
|
|
||||||
MOVD R12, (2176+48)(R4)
|
|
||||||
MOVD a8+64(FP), R12
|
|
||||||
MOVD R12, (2176+56)(R4)
|
|
||||||
MOVD a9+72(FP), R12
|
|
||||||
MOVD R12, (2176+64)(R4)
|
|
||||||
|
|
||||||
// Call function.
|
|
||||||
LE_CALL
|
|
||||||
NOPH
|
|
||||||
XOR R0, R0 // Restore R0 to $0.
|
|
||||||
MOVD R4, 0(R9) // Save stack pointer.
|
|
||||||
|
|
||||||
MOVD R3, r1+80(FP)
|
|
||||||
MOVD R0, r2+88(FP)
|
|
||||||
MOVD R0, err+96(FP)
|
|
||||||
MOVW R3, R4
|
|
||||||
CMP R4, $-1
|
|
||||||
BNE done
|
|
||||||
BL addrerrno<>(SB)
|
|
||||||
MOVWZ 0(R3), R3
|
|
||||||
MOVD R3, err+96(FP)
|
|
||||||
done:
|
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// func svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64)
|
// func svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64)
|
||||||
TEXT ·svcCall(SB),NOSPLIT,$0
|
TEXT ·svcCall(SB), NOSPLIT, $0
|
||||||
BL runtime·save_g(SB) // Save g and stack pointer
|
BL runtime·save_g(SB) // Save g and stack pointer
|
||||||
MOVW PSALAA, R8
|
MOVW PSALAA, R8
|
||||||
MOVD LCA64(R8), R8
|
MOVD LCA64(R8), R8
|
||||||
MOVD SAVSTACK_ASYNC(R8), R9
|
MOVD SAVSTACK_ASYNC(R8), R9
|
||||||
MOVD R15, 0(R9)
|
MOVD R15, 0(R9)
|
||||||
|
|
||||||
MOVD argv+8(FP), R1 // Move function arguments into registers
|
MOVD argv+8(FP), R1 // Move function arguments into registers
|
||||||
MOVD dsa+16(FP), g
|
MOVD dsa+16(FP), g
|
||||||
MOVD fnptr+0(FP), R15
|
MOVD fnptr+0(FP), R15
|
||||||
|
|
||||||
BYTE $0x0D // Branch to function
|
BYTE $0x0D // Branch to function
|
||||||
BYTE $0xEF
|
BYTE $0xEF
|
||||||
|
|
||||||
BL runtime·load_g(SB) // Restore g and stack pointer
|
BL runtime·load_g(SB) // Restore g and stack pointer
|
||||||
MOVW PSALAA, R8
|
MOVW PSALAA, R8
|
||||||
MOVD LCA64(R8), R8
|
MOVD LCA64(R8), R8
|
||||||
MOVD SAVSTACK_ASYNC(R8), R9
|
MOVD SAVSTACK_ASYNC(R8), R9
|
||||||
MOVD 0(R9), R15
|
MOVD 0(R9), R15
|
||||||
|
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// func svcLoad(name *byte) unsafe.Pointer
|
// func svcLoad(name *byte) unsafe.Pointer
|
||||||
TEXT ·svcLoad(SB),NOSPLIT,$0
|
TEXT ·svcLoad(SB), NOSPLIT, $0
|
||||||
MOVD R15, R2 // Save go stack pointer
|
MOVD R15, R2 // Save go stack pointer
|
||||||
MOVD name+0(FP), R0 // Move SVC args into registers
|
MOVD name+0(FP), R0 // Move SVC args into registers
|
||||||
MOVD $0x80000000, R1
|
MOVD $0x80000000, R1
|
||||||
MOVD $0, R15
|
MOVD $0, R15
|
||||||
BYTE $0x0A // SVC 08 LOAD
|
SVC_LOAD
|
||||||
BYTE $0x08
|
MOVW R15, R3 // Save return code from SVC
|
||||||
MOVW R15, R3 // Save return code from SVC
|
MOVD R2, R15 // Restore go stack pointer
|
||||||
MOVD R2, R15 // Restore go stack pointer
|
CMP R3, $0 // Check SVC return code
|
||||||
CMP R3, $0 // Check SVC return code
|
BNE error
|
||||||
BNE error
|
|
||||||
|
|
||||||
MOVD $-2, R3 // Reset last bit of entry point to zero
|
MOVD $-2, R3 // Reset last bit of entry point to zero
|
||||||
AND R0, R3
|
AND R0, R3
|
||||||
MOVD R3, addr+8(FP) // Return entry point returned by SVC
|
MOVD R3, ret+8(FP) // Return entry point returned by SVC
|
||||||
CMP R0, R3 // Check if last bit of entry point was set
|
CMP R0, R3 // Check if last bit of entry point was set
|
||||||
BNE done
|
BNE done
|
||||||
|
|
||||||
MOVD R15, R2 // Save go stack pointer
|
MOVD R15, R2 // Save go stack pointer
|
||||||
MOVD $0, R15 // Move SVC args into registers (entry point still in r0 from SVC 08)
|
MOVD $0, R15 // Move SVC args into registers (entry point still in r0 from SVC 08)
|
||||||
BYTE $0x0A // SVC 09 DELETE
|
SVC_DELETE
|
||||||
BYTE $0x09
|
MOVD R2, R15 // Restore go stack pointer
|
||||||
MOVD R2, R15 // Restore go stack pointer
|
|
||||||
|
|
||||||
error:
|
error:
|
||||||
MOVD $0, addr+8(FP) // Return 0 on failure
|
MOVD $0, ret+8(FP) // Return 0 on failure
|
||||||
|
|
||||||
done:
|
done:
|
||||||
XOR R0, R0 // Reset r0 to 0
|
XOR R0, R0 // Reset r0 to 0
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// func svcUnload(name *byte, fnptr unsafe.Pointer) int64
|
// func svcUnload(name *byte, fnptr unsafe.Pointer) int64
|
||||||
TEXT ·svcUnload(SB),NOSPLIT,$0
|
TEXT ·svcUnload(SB), NOSPLIT, $0
|
||||||
MOVD R15, R2 // Save go stack pointer
|
MOVD R15, R2 // Save go stack pointer
|
||||||
MOVD name+0(FP), R0 // Move SVC args into registers
|
MOVD name+0(FP), R0 // Move SVC args into registers
|
||||||
MOVD addr+8(FP), R15
|
MOVD fnptr+8(FP), R15
|
||||||
BYTE $0x0A // SVC 09
|
SVC_DELETE
|
||||||
BYTE $0x09
|
XOR R0, R0 // Reset r0 to 0
|
||||||
XOR R0, R0 // Reset r0 to 0
|
MOVD R15, R1 // Save SVC return code
|
||||||
MOVD R15, R1 // Save SVC return code
|
MOVD R2, R15 // Restore go stack pointer
|
||||||
MOVD R2, R15 // Restore go stack pointer
|
MOVD R1, ret+16(FP) // Return SVC return code
|
||||||
MOVD R1, rc+0(FP) // Return SVC return code
|
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// func gettid() uint64
|
// func gettid() uint64
|
||||||
@@ -417,7 +150,233 @@ TEXT ·gettid(SB), NOSPLIT, $0
|
|||||||
|
|
||||||
// Get CEECAATHDID
|
// Get CEECAATHDID
|
||||||
MOVD CAA(R8), R9
|
MOVD CAA(R8), R9
|
||||||
MOVD 0x3D0(R9), R9
|
MOVD CEECAATHDID(R9), R9
|
||||||
MOVD R9, ret+0(FP)
|
MOVD R9, ret+0(FP)
|
||||||
|
|
||||||
RET
|
RET
|
||||||
|
|
||||||
|
//
|
||||||
|
// Call LE function, if the return is -1
|
||||||
|
// errno and errno2 is retrieved
|
||||||
|
//
|
||||||
|
TEXT ·CallLeFuncWithErr(SB), NOSPLIT, $0
|
||||||
|
MOVW PSALAA, R8
|
||||||
|
MOVD LCA64(R8), R8
|
||||||
|
MOVD CAA(R8), R9
|
||||||
|
MOVD g, GOCB(R9)
|
||||||
|
|
||||||
|
// Restore LE stack.
|
||||||
|
MOVD SAVSTACK_ASYNC(R8), R9 // R9-> LE stack frame saving address
|
||||||
|
MOVD 0(R9), R4 // R4-> restore previously saved stack frame pointer
|
||||||
|
|
||||||
|
MOVD parms_base+8(FP), R7 // R7 -> argument array
|
||||||
|
MOVD parms_len+16(FP), R8 // R8 number of arguments
|
||||||
|
|
||||||
|
// arg 1 ---> R1
|
||||||
|
CMP R8, $0
|
||||||
|
BEQ docall
|
||||||
|
SUB $1, R8
|
||||||
|
MOVD 0(R7), R1
|
||||||
|
|
||||||
|
// arg 2 ---> R2
|
||||||
|
CMP R8, $0
|
||||||
|
BEQ docall
|
||||||
|
SUB $1, R8
|
||||||
|
ADD $8, R7
|
||||||
|
MOVD 0(R7), R2
|
||||||
|
|
||||||
|
// arg 3 --> R3
|
||||||
|
CMP R8, $0
|
||||||
|
BEQ docall
|
||||||
|
SUB $1, R8
|
||||||
|
ADD $8, R7
|
||||||
|
MOVD 0(R7), R3
|
||||||
|
|
||||||
|
CMP R8, $0
|
||||||
|
BEQ docall
|
||||||
|
MOVD $2176+16, R6 // starting LE stack address-8 to store 4th argument
|
||||||
|
|
||||||
|
repeat:
|
||||||
|
ADD $8, R7
|
||||||
|
MOVD 0(R7), R0 // advance arg pointer by 8 byte
|
||||||
|
ADD $8, R6 // advance LE argument address by 8 byte
|
||||||
|
MOVD R0, (R4)(R6*1) // copy argument from go-slice to le-frame
|
||||||
|
SUB $1, R8
|
||||||
|
CMP R8, $0
|
||||||
|
BNE repeat
|
||||||
|
|
||||||
|
docall:
|
||||||
|
MOVD funcdesc+0(FP), R8 // R8-> function descriptor
|
||||||
|
LMG 0(R8), R5, R6
|
||||||
|
MOVD $0, 0(R9) // R9 address of SAVSTACK_ASYNC
|
||||||
|
LE_CALL // balr R7, R6 (return #1)
|
||||||
|
NOPH
|
||||||
|
MOVD R3, ret+32(FP)
|
||||||
|
CMP R3, $-1 // compare result to -1
|
||||||
|
BNE done
|
||||||
|
|
||||||
|
// retrieve errno and errno2
|
||||||
|
MOVD zosLibVec<>(SB), R8
|
||||||
|
ADD $(__errno), R8
|
||||||
|
LMG 0(R8), R5, R6
|
||||||
|
LE_CALL // balr R7, R6 __errno (return #3)
|
||||||
|
NOPH
|
||||||
|
MOVWZ 0(R3), R3
|
||||||
|
MOVD R3, err+48(FP)
|
||||||
|
MOVD zosLibVec<>(SB), R8
|
||||||
|
ADD $(__err2ad), R8
|
||||||
|
LMG 0(R8), R5, R6
|
||||||
|
LE_CALL // balr R7, R6 __err2ad (return #2)
|
||||||
|
NOPH
|
||||||
|
MOVW (R3), R2 // retrieve errno2
|
||||||
|
MOVD R2, errno2+40(FP) // store in return area
|
||||||
|
|
||||||
|
done:
|
||||||
|
MOVD R4, 0(R9) // Save stack pointer.
|
||||||
|
RET
|
||||||
|
|
||||||
|
//
|
||||||
|
// Call LE function, if the return is 0
|
||||||
|
// errno and errno2 is retrieved
|
||||||
|
//
|
||||||
|
TEXT ·CallLeFuncWithPtrReturn(SB), NOSPLIT, $0
|
||||||
|
MOVW PSALAA, R8
|
||||||
|
MOVD LCA64(R8), R8
|
||||||
|
MOVD CAA(R8), R9
|
||||||
|
MOVD g, GOCB(R9)
|
||||||
|
|
||||||
|
// Restore LE stack.
|
||||||
|
MOVD SAVSTACK_ASYNC(R8), R9 // R9-> LE stack frame saving address
|
||||||
|
MOVD 0(R9), R4 // R4-> restore previously saved stack frame pointer
|
||||||
|
|
||||||
|
MOVD parms_base+8(FP), R7 // R7 -> argument array
|
||||||
|
MOVD parms_len+16(FP), R8 // R8 number of arguments
|
||||||
|
|
||||||
|
// arg 1 ---> R1
|
||||||
|
CMP R8, $0
|
||||||
|
BEQ docall
|
||||||
|
SUB $1, R8
|
||||||
|
MOVD 0(R7), R1
|
||||||
|
|
||||||
|
// arg 2 ---> R2
|
||||||
|
CMP R8, $0
|
||||||
|
BEQ docall
|
||||||
|
SUB $1, R8
|
||||||
|
ADD $8, R7
|
||||||
|
MOVD 0(R7), R2
|
||||||
|
|
||||||
|
// arg 3 --> R3
|
||||||
|
CMP R8, $0
|
||||||
|
BEQ docall
|
||||||
|
SUB $1, R8
|
||||||
|
ADD $8, R7
|
||||||
|
MOVD 0(R7), R3
|
||||||
|
|
||||||
|
CMP R8, $0
|
||||||
|
BEQ docall
|
||||||
|
MOVD $2176+16, R6 // starting LE stack address-8 to store 4th argument
|
||||||
|
|
||||||
|
repeat:
|
||||||
|
ADD $8, R7
|
||||||
|
MOVD 0(R7), R0 // advance arg pointer by 8 byte
|
||||||
|
ADD $8, R6 // advance LE argument address by 8 byte
|
||||||
|
MOVD R0, (R4)(R6*1) // copy argument from go-slice to le-frame
|
||||||
|
SUB $1, R8
|
||||||
|
CMP R8, $0
|
||||||
|
BNE repeat
|
||||||
|
|
||||||
|
docall:
|
||||||
|
MOVD funcdesc+0(FP), R8 // R8-> function descriptor
|
||||||
|
LMG 0(R8), R5, R6
|
||||||
|
MOVD $0, 0(R9) // R9 address of SAVSTACK_ASYNC
|
||||||
|
LE_CALL // balr R7, R6 (return #1)
|
||||||
|
NOPH
|
||||||
|
MOVD R3, ret+32(FP)
|
||||||
|
CMP R3, $0 // compare result to 0
|
||||||
|
BNE done
|
||||||
|
|
||||||
|
// retrieve errno and errno2
|
||||||
|
MOVD zosLibVec<>(SB), R8
|
||||||
|
ADD $(__errno), R8
|
||||||
|
LMG 0(R8), R5, R6
|
||||||
|
LE_CALL // balr R7, R6 __errno (return #3)
|
||||||
|
NOPH
|
||||||
|
MOVWZ 0(R3), R3
|
||||||
|
MOVD R3, err+48(FP)
|
||||||
|
MOVD zosLibVec<>(SB), R8
|
||||||
|
ADD $(__err2ad), R8
|
||||||
|
LMG 0(R8), R5, R6
|
||||||
|
LE_CALL // balr R7, R6 __err2ad (return #2)
|
||||||
|
NOPH
|
||||||
|
MOVW (R3), R2 // retrieve errno2
|
||||||
|
MOVD R2, errno2+40(FP) // store in return area
|
||||||
|
XOR R2, R2
|
||||||
|
MOVWZ R2, (R3) // clear errno2
|
||||||
|
|
||||||
|
done:
|
||||||
|
MOVD R4, 0(R9) // Save stack pointer.
|
||||||
|
RET
|
||||||
|
|
||||||
|
//
|
||||||
|
// function to test if a pointer can be safely dereferenced (content read)
|
||||||
|
// return 0 for succces
|
||||||
|
//
|
||||||
|
TEXT ·ptrtest(SB), NOSPLIT, $0-16
|
||||||
|
MOVD arg+0(FP), R10 // test pointer in R10
|
||||||
|
|
||||||
|
// set up R2 to point to CEECAADMC
|
||||||
|
BYTE $0xE3; BYTE $0x20; BYTE $0x04; BYTE $0xB8; BYTE $0x00; BYTE $0x17 // llgt 2,1208
|
||||||
|
BYTE $0xB9; BYTE $0x17; BYTE $0x00; BYTE $0x22 // llgtr 2,2
|
||||||
|
BYTE $0xA5; BYTE $0x26; BYTE $0x7F; BYTE $0xFF // nilh 2,32767
|
||||||
|
BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x58; BYTE $0x00; BYTE $0x04 // lg 2,88(2)
|
||||||
|
BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x08; BYTE $0x00; BYTE $0x04 // lg 2,8(2)
|
||||||
|
BYTE $0x41; BYTE $0x22; BYTE $0x03; BYTE $0x68 // la 2,872(2)
|
||||||
|
|
||||||
|
// set up R5 to point to the "shunt" path which set 1 to R3 (failure)
|
||||||
|
BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x33 // xgr 3,3
|
||||||
|
BYTE $0xA7; BYTE $0x55; BYTE $0x00; BYTE $0x04 // bras 5,lbl1
|
||||||
|
BYTE $0xA7; BYTE $0x39; BYTE $0x00; BYTE $0x01 // lghi 3,1
|
||||||
|
|
||||||
|
// if r3 is not zero (failed) then branch to finish
|
||||||
|
BYTE $0xB9; BYTE $0x02; BYTE $0x00; BYTE $0x33 // lbl1 ltgr 3,3
|
||||||
|
BYTE $0xA7; BYTE $0x74; BYTE $0x00; BYTE $0x08 // brc b'0111',lbl2
|
||||||
|
|
||||||
|
// stomic store shunt address in R5 into CEECAADMC
|
||||||
|
BYTE $0xE3; BYTE $0x52; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 5,0(2)
|
||||||
|
|
||||||
|
// now try reading from the test pointer in R10, if it fails it branches to the "lghi" instruction above
|
||||||
|
BYTE $0xE3; BYTE $0x9A; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x04 // lg 9,0(10)
|
||||||
|
|
||||||
|
// finish here, restore 0 into CEECAADMC
|
||||||
|
BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x99 // lbl2 xgr 9,9
|
||||||
|
BYTE $0xE3; BYTE $0x92; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 9,0(2)
|
||||||
|
MOVD R3, ret+8(FP) // result in R3
|
||||||
|
RET
|
||||||
|
|
||||||
|
//
|
||||||
|
// function to test if a untptr can be loaded from a pointer
|
||||||
|
// return 1: the 8-byte content
|
||||||
|
// 2: 0 for success, 1 for failure
|
||||||
|
//
|
||||||
|
// func safeload(ptr uintptr) ( value uintptr, error uintptr)
|
||||||
|
TEXT ·safeload(SB), NOSPLIT, $0-24
|
||||||
|
MOVD ptr+0(FP), R10 // test pointer in R10
|
||||||
|
MOVD $0x0, R6
|
||||||
|
BYTE $0xE3; BYTE $0x20; BYTE $0x04; BYTE $0xB8; BYTE $0x00; BYTE $0x17 // llgt 2,1208
|
||||||
|
BYTE $0xB9; BYTE $0x17; BYTE $0x00; BYTE $0x22 // llgtr 2,2
|
||||||
|
BYTE $0xA5; BYTE $0x26; BYTE $0x7F; BYTE $0xFF // nilh 2,32767
|
||||||
|
BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x58; BYTE $0x00; BYTE $0x04 // lg 2,88(2)
|
||||||
|
BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x08; BYTE $0x00; BYTE $0x04 // lg 2,8(2)
|
||||||
|
BYTE $0x41; BYTE $0x22; BYTE $0x03; BYTE $0x68 // la 2,872(2)
|
||||||
|
BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x33 // xgr 3,3
|
||||||
|
BYTE $0xA7; BYTE $0x55; BYTE $0x00; BYTE $0x04 // bras 5,lbl1
|
||||||
|
BYTE $0xA7; BYTE $0x39; BYTE $0x00; BYTE $0x01 // lghi 3,1
|
||||||
|
BYTE $0xB9; BYTE $0x02; BYTE $0x00; BYTE $0x33 // lbl1 ltgr 3,3
|
||||||
|
BYTE $0xA7; BYTE $0x74; BYTE $0x00; BYTE $0x08 // brc b'0111',lbl2
|
||||||
|
BYTE $0xE3; BYTE $0x52; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 5,0(2)
|
||||||
|
BYTE $0xE3; BYTE $0x6A; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x04 // lg 6,0(10)
|
||||||
|
BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x99 // lbl2 xgr 9,9
|
||||||
|
BYTE $0xE3; BYTE $0x92; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 9,0(2)
|
||||||
|
MOVD R6, value+8(FP) // result in R6
|
||||||
|
MOVD R3, error+16(FP) // error in R3
|
||||||
|
RET
|
||||||
|
|||||||
657
vendor/golang.org/x/sys/unix/bpxsvc_zos.go
generated
vendored
Normal file
657
vendor/golang.org/x/sys/unix/bpxsvc_zos.go
generated
vendored
Normal file
@@ -0,0 +1,657 @@
|
|||||||
|
// Copyright 2024 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 zos
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"fmt"
|
||||||
|
"unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
//go:noescape
|
||||||
|
func bpxcall(plist []unsafe.Pointer, bpx_offset int64)
|
||||||
|
|
||||||
|
//go:noescape
|
||||||
|
func A2e([]byte)
|
||||||
|
|
||||||
|
//go:noescape
|
||||||
|
func E2a([]byte)
|
||||||
|
|
||||||
|
const (
|
||||||
|
BPX4STA = 192 // stat
|
||||||
|
BPX4FST = 104 // fstat
|
||||||
|
BPX4LST = 132 // lstat
|
||||||
|
BPX4OPN = 156 // open
|
||||||
|
BPX4CLO = 72 // close
|
||||||
|
BPX4CHR = 500 // chattr
|
||||||
|
BPX4FCR = 504 // fchattr
|
||||||
|
BPX4LCR = 1180 // lchattr
|
||||||
|
BPX4CTW = 492 // cond_timed_wait
|
||||||
|
BPX4GTH = 1056 // __getthent
|
||||||
|
BPX4PTQ = 412 // pthread_quiesc
|
||||||
|
BPX4PTR = 320 // ptrace
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
//options
|
||||||
|
//byte1
|
||||||
|
BPX_OPNFHIGH = 0x80
|
||||||
|
//byte2
|
||||||
|
BPX_OPNFEXEC = 0x80
|
||||||
|
//byte3
|
||||||
|
BPX_O_NOLARGEFILE = 0x08
|
||||||
|
BPX_O_LARGEFILE = 0x04
|
||||||
|
BPX_O_ASYNCSIG = 0x02
|
||||||
|
BPX_O_SYNC = 0x01
|
||||||
|
//byte4
|
||||||
|
BPX_O_CREXCL = 0xc0
|
||||||
|
BPX_O_CREAT = 0x80
|
||||||
|
BPX_O_EXCL = 0x40
|
||||||
|
BPX_O_NOCTTY = 0x20
|
||||||
|
BPX_O_TRUNC = 0x10
|
||||||
|
BPX_O_APPEND = 0x08
|
||||||
|
BPX_O_NONBLOCK = 0x04
|
||||||
|
BPX_FNDELAY = 0x04
|
||||||
|
BPX_O_RDWR = 0x03
|
||||||
|
BPX_O_RDONLY = 0x02
|
||||||
|
BPX_O_WRONLY = 0x01
|
||||||
|
BPX_O_ACCMODE = 0x03
|
||||||
|
BPX_O_GETFL = 0x0f
|
||||||
|
|
||||||
|
//mode
|
||||||
|
// byte1 (file type)
|
||||||
|
BPX_FT_DIR = 1
|
||||||
|
BPX_FT_CHARSPEC = 2
|
||||||
|
BPX_FT_REGFILE = 3
|
||||||
|
BPX_FT_FIFO = 4
|
||||||
|
BPX_FT_SYMLINK = 5
|
||||||
|
BPX_FT_SOCKET = 6
|
||||||
|
//byte3
|
||||||
|
BPX_S_ISUID = 0x08
|
||||||
|
BPX_S_ISGID = 0x04
|
||||||
|
BPX_S_ISVTX = 0x02
|
||||||
|
BPX_S_IRWXU1 = 0x01
|
||||||
|
BPX_S_IRUSR = 0x01
|
||||||
|
//byte4
|
||||||
|
BPX_S_IRWXU2 = 0xc0
|
||||||
|
BPX_S_IWUSR = 0x80
|
||||||
|
BPX_S_IXUSR = 0x40
|
||||||
|
BPX_S_IRWXG = 0x38
|
||||||
|
BPX_S_IRGRP = 0x20
|
||||||
|
BPX_S_IWGRP = 0x10
|
||||||
|
BPX_S_IXGRP = 0x08
|
||||||
|
BPX_S_IRWXOX = 0x07
|
||||||
|
BPX_S_IROTH = 0x04
|
||||||
|
BPX_S_IWOTH = 0x02
|
||||||
|
BPX_S_IXOTH = 0x01
|
||||||
|
|
||||||
|
CW_INTRPT = 1
|
||||||
|
CW_CONDVAR = 32
|
||||||
|
CW_TIMEOUT = 64
|
||||||
|
|
||||||
|
PGTHA_NEXT = 2
|
||||||
|
PGTHA_CURRENT = 1
|
||||||
|
PGTHA_FIRST = 0
|
||||||
|
PGTHA_LAST = 3
|
||||||
|
PGTHA_PROCESS = 0x80
|
||||||
|
PGTHA_CONTTY = 0x40
|
||||||
|
PGTHA_PATH = 0x20
|
||||||
|
PGTHA_COMMAND = 0x10
|
||||||
|
PGTHA_FILEDATA = 0x08
|
||||||
|
PGTHA_THREAD = 0x04
|
||||||
|
PGTHA_PTAG = 0x02
|
||||||
|
PGTHA_COMMANDLONG = 0x01
|
||||||
|
PGTHA_THREADFAST = 0x80
|
||||||
|
PGTHA_FILEPATH = 0x40
|
||||||
|
PGTHA_THDSIGMASK = 0x20
|
||||||
|
// thread quiece mode
|
||||||
|
QUIESCE_TERM int32 = 1
|
||||||
|
QUIESCE_FORCE int32 = 2
|
||||||
|
QUIESCE_QUERY int32 = 3
|
||||||
|
QUIESCE_FREEZE int32 = 4
|
||||||
|
QUIESCE_UNFREEZE int32 = 5
|
||||||
|
FREEZE_THIS_THREAD int32 = 6
|
||||||
|
FREEZE_EXIT int32 = 8
|
||||||
|
QUIESCE_SRB int32 = 9
|
||||||
|
)
|
||||||
|
|
||||||
|
type Pgtha struct {
|
||||||
|
Pid uint32 // 0
|
||||||
|
Tid0 uint32 // 4
|
||||||
|
Tid1 uint32
|
||||||
|
Accesspid byte // C
|
||||||
|
Accesstid byte // D
|
||||||
|
Accessasid uint16 // E
|
||||||
|
Loginname [8]byte // 10
|
||||||
|
Flag1 byte // 18
|
||||||
|
Flag1b2 byte // 19
|
||||||
|
}
|
||||||
|
|
||||||
|
type Bpxystat_t struct { // DSECT BPXYSTAT
|
||||||
|
St_id [4]uint8 // 0
|
||||||
|
St_length uint16 // 0x4
|
||||||
|
St_version uint16 // 0x6
|
||||||
|
St_mode uint32 // 0x8
|
||||||
|
St_ino uint32 // 0xc
|
||||||
|
St_dev uint32 // 0x10
|
||||||
|
St_nlink uint32 // 0x14
|
||||||
|
St_uid uint32 // 0x18
|
||||||
|
St_gid uint32 // 0x1c
|
||||||
|
St_size uint64 // 0x20
|
||||||
|
St_atime uint32 // 0x28
|
||||||
|
St_mtime uint32 // 0x2c
|
||||||
|
St_ctime uint32 // 0x30
|
||||||
|
St_rdev uint32 // 0x34
|
||||||
|
St_auditoraudit uint32 // 0x38
|
||||||
|
St_useraudit uint32 // 0x3c
|
||||||
|
St_blksize uint32 // 0x40
|
||||||
|
St_createtime uint32 // 0x44
|
||||||
|
St_auditid [4]uint32 // 0x48
|
||||||
|
St_res01 uint32 // 0x58
|
||||||
|
Ft_ccsid uint16 // 0x5c
|
||||||
|
Ft_flags uint16 // 0x5e
|
||||||
|
St_res01a [2]uint32 // 0x60
|
||||||
|
St_res02 uint32 // 0x68
|
||||||
|
St_blocks uint32 // 0x6c
|
||||||
|
St_opaque [3]uint8 // 0x70
|
||||||
|
St_visible uint8 // 0x73
|
||||||
|
St_reftime uint32 // 0x74
|
||||||
|
St_fid uint64 // 0x78
|
||||||
|
St_filefmt uint8 // 0x80
|
||||||
|
St_fspflag2 uint8 // 0x81
|
||||||
|
St_res03 [2]uint8 // 0x82
|
||||||
|
St_ctimemsec uint32 // 0x84
|
||||||
|
St_seclabel [8]uint8 // 0x88
|
||||||
|
St_res04 [4]uint8 // 0x90
|
||||||
|
// end of version 1
|
||||||
|
_ uint32 // 0x94
|
||||||
|
St_atime64 uint64 // 0x98
|
||||||
|
St_mtime64 uint64 // 0xa0
|
||||||
|
St_ctime64 uint64 // 0xa8
|
||||||
|
St_createtime64 uint64 // 0xb0
|
||||||
|
St_reftime64 uint64 // 0xb8
|
||||||
|
_ uint64 // 0xc0
|
||||||
|
St_res05 [16]uint8 // 0xc8
|
||||||
|
// end of version 2
|
||||||
|
}
|
||||||
|
|
||||||
|
type BpxFilestatus struct {
|
||||||
|
Oflag1 byte
|
||||||
|
Oflag2 byte
|
||||||
|
Oflag3 byte
|
||||||
|
Oflag4 byte
|
||||||
|
}
|
||||||
|
|
||||||
|
type BpxMode struct {
|
||||||
|
Ftype byte
|
||||||
|
Mode1 byte
|
||||||
|
Mode2 byte
|
||||||
|
Mode3 byte
|
||||||
|
}
|
||||||
|
|
||||||
|
// Thr attribute structure for extended attributes
|
||||||
|
type Bpxyatt_t struct { // DSECT BPXYATT
|
||||||
|
Att_id [4]uint8
|
||||||
|
Att_version uint16
|
||||||
|
Att_res01 [2]uint8
|
||||||
|
Att_setflags1 uint8
|
||||||
|
Att_setflags2 uint8
|
||||||
|
Att_setflags3 uint8
|
||||||
|
Att_setflags4 uint8
|
||||||
|
Att_mode uint32
|
||||||
|
Att_uid uint32
|
||||||
|
Att_gid uint32
|
||||||
|
Att_opaquemask [3]uint8
|
||||||
|
Att_visblmaskres uint8
|
||||||
|
Att_opaque [3]uint8
|
||||||
|
Att_visibleres uint8
|
||||||
|
Att_size_h uint32
|
||||||
|
Att_size_l uint32
|
||||||
|
Att_atime uint32
|
||||||
|
Att_mtime uint32
|
||||||
|
Att_auditoraudit uint32
|
||||||
|
Att_useraudit uint32
|
||||||
|
Att_ctime uint32
|
||||||
|
Att_reftime uint32
|
||||||
|
// end of version 1
|
||||||
|
Att_filefmt uint8
|
||||||
|
Att_res02 [3]uint8
|
||||||
|
Att_filetag uint32
|
||||||
|
Att_res03 [8]uint8
|
||||||
|
// end of version 2
|
||||||
|
Att_atime64 uint64
|
||||||
|
Att_mtime64 uint64
|
||||||
|
Att_ctime64 uint64
|
||||||
|
Att_reftime64 uint64
|
||||||
|
Att_seclabel [8]uint8
|
||||||
|
Att_ver3res02 [8]uint8
|
||||||
|
// end of version 3
|
||||||
|
}
|
||||||
|
|
||||||
|
func BpxOpen(name string, options *BpxFilestatus, mode *BpxMode) (rv int32, rc int32, rn int32) {
|
||||||
|
if len(name) < 1024 {
|
||||||
|
var namebuf [1024]byte
|
||||||
|
sz := int32(copy(namebuf[:], name))
|
||||||
|
A2e(namebuf[:sz])
|
||||||
|
var parms [7]unsafe.Pointer
|
||||||
|
parms[0] = unsafe.Pointer(&sz)
|
||||||
|
parms[1] = unsafe.Pointer(&namebuf[0])
|
||||||
|
parms[2] = unsafe.Pointer(options)
|
||||||
|
parms[3] = unsafe.Pointer(mode)
|
||||||
|
parms[4] = unsafe.Pointer(&rv)
|
||||||
|
parms[5] = unsafe.Pointer(&rc)
|
||||||
|
parms[6] = unsafe.Pointer(&rn)
|
||||||
|
bpxcall(parms[:], BPX4OPN)
|
||||||
|
return rv, rc, rn
|
||||||
|
}
|
||||||
|
return -1, -1, -1
|
||||||
|
}
|
||||||
|
|
||||||
|
func BpxClose(fd int32) (rv int32, rc int32, rn int32) {
|
||||||
|
var parms [4]unsafe.Pointer
|
||||||
|
parms[0] = unsafe.Pointer(&fd)
|
||||||
|
parms[1] = unsafe.Pointer(&rv)
|
||||||
|
parms[2] = unsafe.Pointer(&rc)
|
||||||
|
parms[3] = unsafe.Pointer(&rn)
|
||||||
|
bpxcall(parms[:], BPX4CLO)
|
||||||
|
return rv, rc, rn
|
||||||
|
}
|
||||||
|
|
||||||
|
func BpxFileFStat(fd int32, st *Bpxystat_t) (rv int32, rc int32, rn int32) {
|
||||||
|
st.St_id = [4]uint8{0xe2, 0xe3, 0xc1, 0xe3}
|
||||||
|
st.St_version = 2
|
||||||
|
stat_sz := uint32(unsafe.Sizeof(*st))
|
||||||
|
var parms [6]unsafe.Pointer
|
||||||
|
parms[0] = unsafe.Pointer(&fd)
|
||||||
|
parms[1] = unsafe.Pointer(&stat_sz)
|
||||||
|
parms[2] = unsafe.Pointer(st)
|
||||||
|
parms[3] = unsafe.Pointer(&rv)
|
||||||
|
parms[4] = unsafe.Pointer(&rc)
|
||||||
|
parms[5] = unsafe.Pointer(&rn)
|
||||||
|
bpxcall(parms[:], BPX4FST)
|
||||||
|
return rv, rc, rn
|
||||||
|
}
|
||||||
|
|
||||||
|
func BpxFileStat(name string, st *Bpxystat_t) (rv int32, rc int32, rn int32) {
|
||||||
|
if len(name) < 1024 {
|
||||||
|
var namebuf [1024]byte
|
||||||
|
sz := int32(copy(namebuf[:], name))
|
||||||
|
A2e(namebuf[:sz])
|
||||||
|
st.St_id = [4]uint8{0xe2, 0xe3, 0xc1, 0xe3}
|
||||||
|
st.St_version = 2
|
||||||
|
stat_sz := uint32(unsafe.Sizeof(*st))
|
||||||
|
var parms [7]unsafe.Pointer
|
||||||
|
parms[0] = unsafe.Pointer(&sz)
|
||||||
|
parms[1] = unsafe.Pointer(&namebuf[0])
|
||||||
|
parms[2] = unsafe.Pointer(&stat_sz)
|
||||||
|
parms[3] = unsafe.Pointer(st)
|
||||||
|
parms[4] = unsafe.Pointer(&rv)
|
||||||
|
parms[5] = unsafe.Pointer(&rc)
|
||||||
|
parms[6] = unsafe.Pointer(&rn)
|
||||||
|
bpxcall(parms[:], BPX4STA)
|
||||||
|
return rv, rc, rn
|
||||||
|
}
|
||||||
|
return -1, -1, -1
|
||||||
|
}
|
||||||
|
|
||||||
|
func BpxFileLStat(name string, st *Bpxystat_t) (rv int32, rc int32, rn int32) {
|
||||||
|
if len(name) < 1024 {
|
||||||
|
var namebuf [1024]byte
|
||||||
|
sz := int32(copy(namebuf[:], name))
|
||||||
|
A2e(namebuf[:sz])
|
||||||
|
st.St_id = [4]uint8{0xe2, 0xe3, 0xc1, 0xe3}
|
||||||
|
st.St_version = 2
|
||||||
|
stat_sz := uint32(unsafe.Sizeof(*st))
|
||||||
|
var parms [7]unsafe.Pointer
|
||||||
|
parms[0] = unsafe.Pointer(&sz)
|
||||||
|
parms[1] = unsafe.Pointer(&namebuf[0])
|
||||||
|
parms[2] = unsafe.Pointer(&stat_sz)
|
||||||
|
parms[3] = unsafe.Pointer(st)
|
||||||
|
parms[4] = unsafe.Pointer(&rv)
|
||||||
|
parms[5] = unsafe.Pointer(&rc)
|
||||||
|
parms[6] = unsafe.Pointer(&rn)
|
||||||
|
bpxcall(parms[:], BPX4LST)
|
||||||
|
return rv, rc, rn
|
||||||
|
}
|
||||||
|
return -1, -1, -1
|
||||||
|
}
|
||||||
|
|
||||||
|
func BpxChattr(path string, attr *Bpxyatt_t) (rv int32, rc int32, rn int32) {
|
||||||
|
if len(path) >= 1024 {
|
||||||
|
return -1, -1, -1
|
||||||
|
}
|
||||||
|
var namebuf [1024]byte
|
||||||
|
sz := int32(copy(namebuf[:], path))
|
||||||
|
A2e(namebuf[:sz])
|
||||||
|
attr_sz := uint32(unsafe.Sizeof(*attr))
|
||||||
|
var parms [7]unsafe.Pointer
|
||||||
|
parms[0] = unsafe.Pointer(&sz)
|
||||||
|
parms[1] = unsafe.Pointer(&namebuf[0])
|
||||||
|
parms[2] = unsafe.Pointer(&attr_sz)
|
||||||
|
parms[3] = unsafe.Pointer(attr)
|
||||||
|
parms[4] = unsafe.Pointer(&rv)
|
||||||
|
parms[5] = unsafe.Pointer(&rc)
|
||||||
|
parms[6] = unsafe.Pointer(&rn)
|
||||||
|
bpxcall(parms[:], BPX4CHR)
|
||||||
|
return rv, rc, rn
|
||||||
|
}
|
||||||
|
|
||||||
|
func BpxLchattr(path string, attr *Bpxyatt_t) (rv int32, rc int32, rn int32) {
|
||||||
|
if len(path) >= 1024 {
|
||||||
|
return -1, -1, -1
|
||||||
|
}
|
||||||
|
var namebuf [1024]byte
|
||||||
|
sz := int32(copy(namebuf[:], path))
|
||||||
|
A2e(namebuf[:sz])
|
||||||
|
attr_sz := uint32(unsafe.Sizeof(*attr))
|
||||||
|
var parms [7]unsafe.Pointer
|
||||||
|
parms[0] = unsafe.Pointer(&sz)
|
||||||
|
parms[1] = unsafe.Pointer(&namebuf[0])
|
||||||
|
parms[2] = unsafe.Pointer(&attr_sz)
|
||||||
|
parms[3] = unsafe.Pointer(attr)
|
||||||
|
parms[4] = unsafe.Pointer(&rv)
|
||||||
|
parms[5] = unsafe.Pointer(&rc)
|
||||||
|
parms[6] = unsafe.Pointer(&rn)
|
||||||
|
bpxcall(parms[:], BPX4LCR)
|
||||||
|
return rv, rc, rn
|
||||||
|
}
|
||||||
|
|
||||||
|
func BpxFchattr(fd int32, attr *Bpxyatt_t) (rv int32, rc int32, rn int32) {
|
||||||
|
attr_sz := uint32(unsafe.Sizeof(*attr))
|
||||||
|
var parms [6]unsafe.Pointer
|
||||||
|
parms[0] = unsafe.Pointer(&fd)
|
||||||
|
parms[1] = unsafe.Pointer(&attr_sz)
|
||||||
|
parms[2] = unsafe.Pointer(attr)
|
||||||
|
parms[3] = unsafe.Pointer(&rv)
|
||||||
|
parms[4] = unsafe.Pointer(&rc)
|
||||||
|
parms[5] = unsafe.Pointer(&rn)
|
||||||
|
bpxcall(parms[:], BPX4FCR)
|
||||||
|
return rv, rc, rn
|
||||||
|
}
|
||||||
|
|
||||||
|
func BpxCondTimedWait(sec uint32, nsec uint32, events uint32, secrem *uint32, nsecrem *uint32) (rv int32, rc int32, rn int32) {
|
||||||
|
var parms [8]unsafe.Pointer
|
||||||
|
parms[0] = unsafe.Pointer(&sec)
|
||||||
|
parms[1] = unsafe.Pointer(&nsec)
|
||||||
|
parms[2] = unsafe.Pointer(&events)
|
||||||
|
parms[3] = unsafe.Pointer(secrem)
|
||||||
|
parms[4] = unsafe.Pointer(nsecrem)
|
||||||
|
parms[5] = unsafe.Pointer(&rv)
|
||||||
|
parms[6] = unsafe.Pointer(&rc)
|
||||||
|
parms[7] = unsafe.Pointer(&rn)
|
||||||
|
bpxcall(parms[:], BPX4CTW)
|
||||||
|
return rv, rc, rn
|
||||||
|
}
|
||||||
|
func BpxGetthent(in *Pgtha, outlen *uint32, out unsafe.Pointer) (rv int32, rc int32, rn int32) {
|
||||||
|
var parms [7]unsafe.Pointer
|
||||||
|
inlen := uint32(26) // nothing else will work. Go says Pgtha is 28-byte because of alignment, but Pgtha is "packed" and must be 26-byte
|
||||||
|
parms[0] = unsafe.Pointer(&inlen)
|
||||||
|
parms[1] = unsafe.Pointer(&in)
|
||||||
|
parms[2] = unsafe.Pointer(outlen)
|
||||||
|
parms[3] = unsafe.Pointer(&out)
|
||||||
|
parms[4] = unsafe.Pointer(&rv)
|
||||||
|
parms[5] = unsafe.Pointer(&rc)
|
||||||
|
parms[6] = unsafe.Pointer(&rn)
|
||||||
|
bpxcall(parms[:], BPX4GTH)
|
||||||
|
return rv, rc, rn
|
||||||
|
}
|
||||||
|
func ZosJobname() (jobname string, err error) {
|
||||||
|
var pgtha Pgtha
|
||||||
|
pgtha.Pid = uint32(Getpid())
|
||||||
|
pgtha.Accesspid = PGTHA_CURRENT
|
||||||
|
pgtha.Flag1 = PGTHA_PROCESS
|
||||||
|
var out [256]byte
|
||||||
|
var outlen uint32
|
||||||
|
outlen = 256
|
||||||
|
rv, rc, rn := BpxGetthent(&pgtha, &outlen, unsafe.Pointer(&out[0]))
|
||||||
|
if rv == 0 {
|
||||||
|
gthc := []byte{0x87, 0xa3, 0x88, 0x83} // 'gthc' in ebcdic
|
||||||
|
ix := bytes.Index(out[:], gthc)
|
||||||
|
if ix == -1 {
|
||||||
|
err = fmt.Errorf("BPX4GTH: gthc return data not found")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
jn := out[ix+80 : ix+88] // we didn't declare Pgthc, but jobname is 8-byte at offset 80
|
||||||
|
E2a(jn)
|
||||||
|
jobname = string(bytes.TrimRight(jn, " "))
|
||||||
|
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("BPX4GTH: rc=%d errno=%d reason=code=0x%x", rv, rc, rn)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
func Bpx4ptq(code int32, data string) (rv int32, rc int32, rn int32) {
|
||||||
|
var userdata [8]byte
|
||||||
|
var parms [5]unsafe.Pointer
|
||||||
|
copy(userdata[:], data+" ")
|
||||||
|
A2e(userdata[:])
|
||||||
|
parms[0] = unsafe.Pointer(&code)
|
||||||
|
parms[1] = unsafe.Pointer(&userdata[0])
|
||||||
|
parms[2] = unsafe.Pointer(&rv)
|
||||||
|
parms[3] = unsafe.Pointer(&rc)
|
||||||
|
parms[4] = unsafe.Pointer(&rn)
|
||||||
|
bpxcall(parms[:], BPX4PTQ)
|
||||||
|
return rv, rc, rn
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
PT_TRACE_ME = 0 // Debug this process
|
||||||
|
PT_READ_I = 1 // Read a full word
|
||||||
|
PT_READ_D = 2 // Read a full word
|
||||||
|
PT_READ_U = 3 // Read control info
|
||||||
|
PT_WRITE_I = 4 //Write a full word
|
||||||
|
PT_WRITE_D = 5 //Write a full word
|
||||||
|
PT_CONTINUE = 7 //Continue the process
|
||||||
|
PT_KILL = 8 //Terminate the process
|
||||||
|
PT_READ_GPR = 11 // Read GPR, CR, PSW
|
||||||
|
PT_READ_FPR = 12 // Read FPR
|
||||||
|
PT_READ_VR = 13 // Read VR
|
||||||
|
PT_WRITE_GPR = 14 // Write GPR, CR, PSW
|
||||||
|
PT_WRITE_FPR = 15 // Write FPR
|
||||||
|
PT_WRITE_VR = 16 // Write VR
|
||||||
|
PT_READ_BLOCK = 17 // Read storage
|
||||||
|
PT_WRITE_BLOCK = 19 // Write storage
|
||||||
|
PT_READ_GPRH = 20 // Read GPRH
|
||||||
|
PT_WRITE_GPRH = 21 // Write GPRH
|
||||||
|
PT_REGHSET = 22 // Read all GPRHs
|
||||||
|
PT_ATTACH = 30 // Attach to a process
|
||||||
|
PT_DETACH = 31 // Detach from a process
|
||||||
|
PT_REGSET = 32 // Read all GPRs
|
||||||
|
PT_REATTACH = 33 // Reattach to a process
|
||||||
|
PT_LDINFO = 34 // Read loader info
|
||||||
|
PT_MULTI = 35 // Multi process mode
|
||||||
|
PT_LD64INFO = 36 // RMODE64 Info Area
|
||||||
|
PT_BLOCKREQ = 40 // Block request
|
||||||
|
PT_THREAD_INFO = 60 // Read thread info
|
||||||
|
PT_THREAD_MODIFY = 61
|
||||||
|
PT_THREAD_READ_FOCUS = 62
|
||||||
|
PT_THREAD_WRITE_FOCUS = 63
|
||||||
|
PT_THREAD_HOLD = 64
|
||||||
|
PT_THREAD_SIGNAL = 65
|
||||||
|
PT_EXPLAIN = 66
|
||||||
|
PT_EVENTS = 67
|
||||||
|
PT_THREAD_INFO_EXTENDED = 68
|
||||||
|
PT_REATTACH2 = 71
|
||||||
|
PT_CAPTURE = 72
|
||||||
|
PT_UNCAPTURE = 73
|
||||||
|
PT_GET_THREAD_TCB = 74
|
||||||
|
PT_GET_ALET = 75
|
||||||
|
PT_SWAPIN = 76
|
||||||
|
PT_EXTENDED_EVENT = 98
|
||||||
|
PT_RECOVER = 99 // Debug a program check
|
||||||
|
PT_GPR0 = 0 // General purpose register 0
|
||||||
|
PT_GPR1 = 1 // General purpose register 1
|
||||||
|
PT_GPR2 = 2 // General purpose register 2
|
||||||
|
PT_GPR3 = 3 // General purpose register 3
|
||||||
|
PT_GPR4 = 4 // General purpose register 4
|
||||||
|
PT_GPR5 = 5 // General purpose register 5
|
||||||
|
PT_GPR6 = 6 // General purpose register 6
|
||||||
|
PT_GPR7 = 7 // General purpose register 7
|
||||||
|
PT_GPR8 = 8 // General purpose register 8
|
||||||
|
PT_GPR9 = 9 // General purpose register 9
|
||||||
|
PT_GPR10 = 10 // General purpose register 10
|
||||||
|
PT_GPR11 = 11 // General purpose register 11
|
||||||
|
PT_GPR12 = 12 // General purpose register 12
|
||||||
|
PT_GPR13 = 13 // General purpose register 13
|
||||||
|
PT_GPR14 = 14 // General purpose register 14
|
||||||
|
PT_GPR15 = 15 // General purpose register 15
|
||||||
|
PT_FPR0 = 16 // Floating point register 0
|
||||||
|
PT_FPR1 = 17 // Floating point register 1
|
||||||
|
PT_FPR2 = 18 // Floating point register 2
|
||||||
|
PT_FPR3 = 19 // Floating point register 3
|
||||||
|
PT_FPR4 = 20 // Floating point register 4
|
||||||
|
PT_FPR5 = 21 // Floating point register 5
|
||||||
|
PT_FPR6 = 22 // Floating point register 6
|
||||||
|
PT_FPR7 = 23 // Floating point register 7
|
||||||
|
PT_FPR8 = 24 // Floating point register 8
|
||||||
|
PT_FPR9 = 25 // Floating point register 9
|
||||||
|
PT_FPR10 = 26 // Floating point register 10
|
||||||
|
PT_FPR11 = 27 // Floating point register 11
|
||||||
|
PT_FPR12 = 28 // Floating point register 12
|
||||||
|
PT_FPR13 = 29 // Floating point register 13
|
||||||
|
PT_FPR14 = 30 // Floating point register 14
|
||||||
|
PT_FPR15 = 31 // Floating point register 15
|
||||||
|
PT_FPC = 32 // Floating point control register
|
||||||
|
PT_PSW = 40 // PSW
|
||||||
|
PT_PSW0 = 40 // Left half of the PSW
|
||||||
|
PT_PSW1 = 41 // Right half of the PSW
|
||||||
|
PT_CR0 = 42 // Control register 0
|
||||||
|
PT_CR1 = 43 // Control register 1
|
||||||
|
PT_CR2 = 44 // Control register 2
|
||||||
|
PT_CR3 = 45 // Control register 3
|
||||||
|
PT_CR4 = 46 // Control register 4
|
||||||
|
PT_CR5 = 47 // Control register 5
|
||||||
|
PT_CR6 = 48 // Control register 6
|
||||||
|
PT_CR7 = 49 // Control register 7
|
||||||
|
PT_CR8 = 50 // Control register 8
|
||||||
|
PT_CR9 = 51 // Control register 9
|
||||||
|
PT_CR10 = 52 // Control register 10
|
||||||
|
PT_CR11 = 53 // Control register 11
|
||||||
|
PT_CR12 = 54 // Control register 12
|
||||||
|
PT_CR13 = 55 // Control register 13
|
||||||
|
PT_CR14 = 56 // Control register 14
|
||||||
|
PT_CR15 = 57 // Control register 15
|
||||||
|
PT_GPRH0 = 58 // GP High register 0
|
||||||
|
PT_GPRH1 = 59 // GP High register 1
|
||||||
|
PT_GPRH2 = 60 // GP High register 2
|
||||||
|
PT_GPRH3 = 61 // GP High register 3
|
||||||
|
PT_GPRH4 = 62 // GP High register 4
|
||||||
|
PT_GPRH5 = 63 // GP High register 5
|
||||||
|
PT_GPRH6 = 64 // GP High register 6
|
||||||
|
PT_GPRH7 = 65 // GP High register 7
|
||||||
|
PT_GPRH8 = 66 // GP High register 8
|
||||||
|
PT_GPRH9 = 67 // GP High register 9
|
||||||
|
PT_GPRH10 = 68 // GP High register 10
|
||||||
|
PT_GPRH11 = 69 // GP High register 11
|
||||||
|
PT_GPRH12 = 70 // GP High register 12
|
||||||
|
PT_GPRH13 = 71 // GP High register 13
|
||||||
|
PT_GPRH14 = 72 // GP High register 14
|
||||||
|
PT_GPRH15 = 73 // GP High register 15
|
||||||
|
PT_VR0 = 74 // Vector register 0
|
||||||
|
PT_VR1 = 75 // Vector register 1
|
||||||
|
PT_VR2 = 76 // Vector register 2
|
||||||
|
PT_VR3 = 77 // Vector register 3
|
||||||
|
PT_VR4 = 78 // Vector register 4
|
||||||
|
PT_VR5 = 79 // Vector register 5
|
||||||
|
PT_VR6 = 80 // Vector register 6
|
||||||
|
PT_VR7 = 81 // Vector register 7
|
||||||
|
PT_VR8 = 82 // Vector register 8
|
||||||
|
PT_VR9 = 83 // Vector register 9
|
||||||
|
PT_VR10 = 84 // Vector register 10
|
||||||
|
PT_VR11 = 85 // Vector register 11
|
||||||
|
PT_VR12 = 86 // Vector register 12
|
||||||
|
PT_VR13 = 87 // Vector register 13
|
||||||
|
PT_VR14 = 88 // Vector register 14
|
||||||
|
PT_VR15 = 89 // Vector register 15
|
||||||
|
PT_VR16 = 90 // Vector register 16
|
||||||
|
PT_VR17 = 91 // Vector register 17
|
||||||
|
PT_VR18 = 92 // Vector register 18
|
||||||
|
PT_VR19 = 93 // Vector register 19
|
||||||
|
PT_VR20 = 94 // Vector register 20
|
||||||
|
PT_VR21 = 95 // Vector register 21
|
||||||
|
PT_VR22 = 96 // Vector register 22
|
||||||
|
PT_VR23 = 97 // Vector register 23
|
||||||
|
PT_VR24 = 98 // Vector register 24
|
||||||
|
PT_VR25 = 99 // Vector register 25
|
||||||
|
PT_VR26 = 100 // Vector register 26
|
||||||
|
PT_VR27 = 101 // Vector register 27
|
||||||
|
PT_VR28 = 102 // Vector register 28
|
||||||
|
PT_VR29 = 103 // Vector register 29
|
||||||
|
PT_VR30 = 104 // Vector register 30
|
||||||
|
PT_VR31 = 105 // Vector register 31
|
||||||
|
PT_PSWG = 106 // PSWG
|
||||||
|
PT_PSWG0 = 106 // Bytes 0-3
|
||||||
|
PT_PSWG1 = 107 // Bytes 4-7
|
||||||
|
PT_PSWG2 = 108 // Bytes 8-11 (IA high word)
|
||||||
|
PT_PSWG3 = 109 // Bytes 12-15 (IA low word)
|
||||||
|
)
|
||||||
|
|
||||||
|
func Bpx4ptr(request int32, pid int32, addr unsafe.Pointer, data unsafe.Pointer, buffer unsafe.Pointer) (rv int32, rc int32, rn int32) {
|
||||||
|
var parms [8]unsafe.Pointer
|
||||||
|
parms[0] = unsafe.Pointer(&request)
|
||||||
|
parms[1] = unsafe.Pointer(&pid)
|
||||||
|
parms[2] = unsafe.Pointer(&addr)
|
||||||
|
parms[3] = unsafe.Pointer(&data)
|
||||||
|
parms[4] = unsafe.Pointer(&buffer)
|
||||||
|
parms[5] = unsafe.Pointer(&rv)
|
||||||
|
parms[6] = unsafe.Pointer(&rc)
|
||||||
|
parms[7] = unsafe.Pointer(&rn)
|
||||||
|
bpxcall(parms[:], BPX4PTR)
|
||||||
|
return rv, rc, rn
|
||||||
|
}
|
||||||
|
|
||||||
|
func copyU8(val uint8, dest []uint8) int {
|
||||||
|
if len(dest) < 1 {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
dest[0] = val
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
func copyU8Arr(src, dest []uint8) int {
|
||||||
|
if len(dest) < len(src) {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
for i, v := range src {
|
||||||
|
dest[i] = v
|
||||||
|
}
|
||||||
|
return len(src)
|
||||||
|
}
|
||||||
|
|
||||||
|
func copyU16(val uint16, dest []uint16) int {
|
||||||
|
if len(dest) < 1 {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
dest[0] = val
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
func copyU32(val uint32, dest []uint32) int {
|
||||||
|
if len(dest) < 1 {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
dest[0] = val
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
func copyU32Arr(src, dest []uint32) int {
|
||||||
|
if len(dest) < len(src) {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
for i, v := range src {
|
||||||
|
dest[i] = v
|
||||||
|
}
|
||||||
|
return len(src)
|
||||||
|
}
|
||||||
|
|
||||||
|
func copyU64(val uint64, dest []uint64) int {
|
||||||
|
if len(dest) < 1 {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
dest[0] = val
|
||||||
|
return 1
|
||||||
|
}
|
||||||
192
vendor/golang.org/x/sys/unix/bpxsvc_zos.s
generated
vendored
Normal file
192
vendor/golang.org/x/sys/unix/bpxsvc_zos.s
generated
vendored
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
// Copyright 2024 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.
|
||||||
|
|
||||||
|
#include "go_asm.h"
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
// function to call USS assembly language services
|
||||||
|
//
|
||||||
|
// doc: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_3.1.0/com.ibm.zos.v3r1.bpxb100/bit64env.htm
|
||||||
|
//
|
||||||
|
// arg1 unsafe.Pointer array that ressembles an OS PLIST
|
||||||
|
//
|
||||||
|
// arg2 function offset as in
|
||||||
|
// doc: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_3.1.0/com.ibm.zos.v3r1.bpxb100/bpx2cr_List_of_offsets.htm
|
||||||
|
//
|
||||||
|
// func bpxcall(plist []unsafe.Pointer, bpx_offset int64)
|
||||||
|
|
||||||
|
TEXT ·bpxcall(SB), NOSPLIT|NOFRAME, $0
|
||||||
|
MOVD plist_base+0(FP), R1 // r1 points to plist
|
||||||
|
MOVD bpx_offset+24(FP), R2 // r2 offset to BPX vector table
|
||||||
|
MOVD R14, R7 // save r14
|
||||||
|
MOVD R15, R8 // save r15
|
||||||
|
MOVWZ 16(R0), R9
|
||||||
|
MOVWZ 544(R9), R9
|
||||||
|
MOVWZ 24(R9), R9 // call vector in r9
|
||||||
|
ADD R2, R9 // add offset to vector table
|
||||||
|
MOVWZ (R9), R9 // r9 points to entry point
|
||||||
|
BYTE $0x0D // BL R14,R9 --> basr r14,r9
|
||||||
|
BYTE $0xE9 // clobbers 0,1,14,15
|
||||||
|
MOVD R8, R15 // restore 15
|
||||||
|
JMP R7 // return via saved return address
|
||||||
|
|
||||||
|
// func A2e(arr [] byte)
|
||||||
|
// code page conversion from 819 to 1047
|
||||||
|
TEXT ·A2e(SB), NOSPLIT|NOFRAME, $0
|
||||||
|
MOVD arg_base+0(FP), R2 // pointer to arry of characters
|
||||||
|
MOVD arg_len+8(FP), R3 // count
|
||||||
|
XOR R0, R0
|
||||||
|
XOR R1, R1
|
||||||
|
BYTE $0xA7; BYTE $0x15; BYTE $0x00; BYTE $0x82 // BRAS 1,(2+(256/2))
|
||||||
|
|
||||||
|
// ASCII -> EBCDIC conversion table:
|
||||||
|
BYTE $0x00; BYTE $0x01; BYTE $0x02; BYTE $0x03
|
||||||
|
BYTE $0x37; BYTE $0x2d; BYTE $0x2e; BYTE $0x2f
|
||||||
|
BYTE $0x16; BYTE $0x05; BYTE $0x15; BYTE $0x0b
|
||||||
|
BYTE $0x0c; BYTE $0x0d; BYTE $0x0e; BYTE $0x0f
|
||||||
|
BYTE $0x10; BYTE $0x11; BYTE $0x12; BYTE $0x13
|
||||||
|
BYTE $0x3c; BYTE $0x3d; BYTE $0x32; BYTE $0x26
|
||||||
|
BYTE $0x18; BYTE $0x19; BYTE $0x3f; BYTE $0x27
|
||||||
|
BYTE $0x1c; BYTE $0x1d; BYTE $0x1e; BYTE $0x1f
|
||||||
|
BYTE $0x40; BYTE $0x5a; BYTE $0x7f; BYTE $0x7b
|
||||||
|
BYTE $0x5b; BYTE $0x6c; BYTE $0x50; BYTE $0x7d
|
||||||
|
BYTE $0x4d; BYTE $0x5d; BYTE $0x5c; BYTE $0x4e
|
||||||
|
BYTE $0x6b; BYTE $0x60; BYTE $0x4b; BYTE $0x61
|
||||||
|
BYTE $0xf0; BYTE $0xf1; BYTE $0xf2; BYTE $0xf3
|
||||||
|
BYTE $0xf4; BYTE $0xf5; BYTE $0xf6; BYTE $0xf7
|
||||||
|
BYTE $0xf8; BYTE $0xf9; BYTE $0x7a; BYTE $0x5e
|
||||||
|
BYTE $0x4c; BYTE $0x7e; BYTE $0x6e; BYTE $0x6f
|
||||||
|
BYTE $0x7c; BYTE $0xc1; BYTE $0xc2; BYTE $0xc3
|
||||||
|
BYTE $0xc4; BYTE $0xc5; BYTE $0xc6; BYTE $0xc7
|
||||||
|
BYTE $0xc8; BYTE $0xc9; BYTE $0xd1; BYTE $0xd2
|
||||||
|
BYTE $0xd3; BYTE $0xd4; BYTE $0xd5; BYTE $0xd6
|
||||||
|
BYTE $0xd7; BYTE $0xd8; BYTE $0xd9; BYTE $0xe2
|
||||||
|
BYTE $0xe3; BYTE $0xe4; BYTE $0xe5; BYTE $0xe6
|
||||||
|
BYTE $0xe7; BYTE $0xe8; BYTE $0xe9; BYTE $0xad
|
||||||
|
BYTE $0xe0; BYTE $0xbd; BYTE $0x5f; BYTE $0x6d
|
||||||
|
BYTE $0x79; BYTE $0x81; BYTE $0x82; BYTE $0x83
|
||||||
|
BYTE $0x84; BYTE $0x85; BYTE $0x86; BYTE $0x87
|
||||||
|
BYTE $0x88; BYTE $0x89; BYTE $0x91; BYTE $0x92
|
||||||
|
BYTE $0x93; BYTE $0x94; BYTE $0x95; BYTE $0x96
|
||||||
|
BYTE $0x97; BYTE $0x98; BYTE $0x99; BYTE $0xa2
|
||||||
|
BYTE $0xa3; BYTE $0xa4; BYTE $0xa5; BYTE $0xa6
|
||||||
|
BYTE $0xa7; BYTE $0xa8; BYTE $0xa9; BYTE $0xc0
|
||||||
|
BYTE $0x4f; BYTE $0xd0; BYTE $0xa1; BYTE $0x07
|
||||||
|
BYTE $0x20; BYTE $0x21; BYTE $0x22; BYTE $0x23
|
||||||
|
BYTE $0x24; BYTE $0x25; BYTE $0x06; BYTE $0x17
|
||||||
|
BYTE $0x28; BYTE $0x29; BYTE $0x2a; BYTE $0x2b
|
||||||
|
BYTE $0x2c; BYTE $0x09; BYTE $0x0a; BYTE $0x1b
|
||||||
|
BYTE $0x30; BYTE $0x31; BYTE $0x1a; BYTE $0x33
|
||||||
|
BYTE $0x34; BYTE $0x35; BYTE $0x36; BYTE $0x08
|
||||||
|
BYTE $0x38; BYTE $0x39; BYTE $0x3a; BYTE $0x3b
|
||||||
|
BYTE $0x04; BYTE $0x14; BYTE $0x3e; BYTE $0xff
|
||||||
|
BYTE $0x41; BYTE $0xaa; BYTE $0x4a; BYTE $0xb1
|
||||||
|
BYTE $0x9f; BYTE $0xb2; BYTE $0x6a; BYTE $0xb5
|
||||||
|
BYTE $0xbb; BYTE $0xb4; BYTE $0x9a; BYTE $0x8a
|
||||||
|
BYTE $0xb0; BYTE $0xca; BYTE $0xaf; BYTE $0xbc
|
||||||
|
BYTE $0x90; BYTE $0x8f; BYTE $0xea; BYTE $0xfa
|
||||||
|
BYTE $0xbe; BYTE $0xa0; BYTE $0xb6; BYTE $0xb3
|
||||||
|
BYTE $0x9d; BYTE $0xda; BYTE $0x9b; BYTE $0x8b
|
||||||
|
BYTE $0xb7; BYTE $0xb8; BYTE $0xb9; BYTE $0xab
|
||||||
|
BYTE $0x64; BYTE $0x65; BYTE $0x62; BYTE $0x66
|
||||||
|
BYTE $0x63; BYTE $0x67; BYTE $0x9e; BYTE $0x68
|
||||||
|
BYTE $0x74; BYTE $0x71; BYTE $0x72; BYTE $0x73
|
||||||
|
BYTE $0x78; BYTE $0x75; BYTE $0x76; BYTE $0x77
|
||||||
|
BYTE $0xac; BYTE $0x69; BYTE $0xed; BYTE $0xee
|
||||||
|
BYTE $0xeb; BYTE $0xef; BYTE $0xec; BYTE $0xbf
|
||||||
|
BYTE $0x80; BYTE $0xfd; BYTE $0xfe; BYTE $0xfb
|
||||||
|
BYTE $0xfc; BYTE $0xba; BYTE $0xae; BYTE $0x59
|
||||||
|
BYTE $0x44; BYTE $0x45; BYTE $0x42; BYTE $0x46
|
||||||
|
BYTE $0x43; BYTE $0x47; BYTE $0x9c; BYTE $0x48
|
||||||
|
BYTE $0x54; BYTE $0x51; BYTE $0x52; BYTE $0x53
|
||||||
|
BYTE $0x58; BYTE $0x55; BYTE $0x56; BYTE $0x57
|
||||||
|
BYTE $0x8c; BYTE $0x49; BYTE $0xcd; BYTE $0xce
|
||||||
|
BYTE $0xcb; BYTE $0xcf; BYTE $0xcc; BYTE $0xe1
|
||||||
|
BYTE $0x70; BYTE $0xdd; BYTE $0xde; BYTE $0xdb
|
||||||
|
BYTE $0xdc; BYTE $0x8d; BYTE $0x8e; BYTE $0xdf
|
||||||
|
|
||||||
|
retry:
|
||||||
|
WORD $0xB9931022 // TROO 2,2,b'0001'
|
||||||
|
BVS retry
|
||||||
|
RET
|
||||||
|
|
||||||
|
// func e2a(arr [] byte)
|
||||||
|
// code page conversion from 1047 to 819
|
||||||
|
TEXT ·E2a(SB), NOSPLIT|NOFRAME, $0
|
||||||
|
MOVD arg_base+0(FP), R2 // pointer to arry of characters
|
||||||
|
MOVD arg_len+8(FP), R3 // count
|
||||||
|
XOR R0, R0
|
||||||
|
XOR R1, R1
|
||||||
|
BYTE $0xA7; BYTE $0x15; BYTE $0x00; BYTE $0x82 // BRAS 1,(2+(256/2))
|
||||||
|
|
||||||
|
// EBCDIC -> ASCII conversion table:
|
||||||
|
BYTE $0x00; BYTE $0x01; BYTE $0x02; BYTE $0x03
|
||||||
|
BYTE $0x9c; BYTE $0x09; BYTE $0x86; BYTE $0x7f
|
||||||
|
BYTE $0x97; BYTE $0x8d; BYTE $0x8e; BYTE $0x0b
|
||||||
|
BYTE $0x0c; BYTE $0x0d; BYTE $0x0e; BYTE $0x0f
|
||||||
|
BYTE $0x10; BYTE $0x11; BYTE $0x12; BYTE $0x13
|
||||||
|
BYTE $0x9d; BYTE $0x0a; BYTE $0x08; BYTE $0x87
|
||||||
|
BYTE $0x18; BYTE $0x19; BYTE $0x92; BYTE $0x8f
|
||||||
|
BYTE $0x1c; BYTE $0x1d; BYTE $0x1e; BYTE $0x1f
|
||||||
|
BYTE $0x80; BYTE $0x81; BYTE $0x82; BYTE $0x83
|
||||||
|
BYTE $0x84; BYTE $0x85; BYTE $0x17; BYTE $0x1b
|
||||||
|
BYTE $0x88; BYTE $0x89; BYTE $0x8a; BYTE $0x8b
|
||||||
|
BYTE $0x8c; BYTE $0x05; BYTE $0x06; BYTE $0x07
|
||||||
|
BYTE $0x90; BYTE $0x91; BYTE $0x16; BYTE $0x93
|
||||||
|
BYTE $0x94; BYTE $0x95; BYTE $0x96; BYTE $0x04
|
||||||
|
BYTE $0x98; BYTE $0x99; BYTE $0x9a; BYTE $0x9b
|
||||||
|
BYTE $0x14; BYTE $0x15; BYTE $0x9e; BYTE $0x1a
|
||||||
|
BYTE $0x20; BYTE $0xa0; BYTE $0xe2; BYTE $0xe4
|
||||||
|
BYTE $0xe0; BYTE $0xe1; BYTE $0xe3; BYTE $0xe5
|
||||||
|
BYTE $0xe7; BYTE $0xf1; BYTE $0xa2; BYTE $0x2e
|
||||||
|
BYTE $0x3c; BYTE $0x28; BYTE $0x2b; BYTE $0x7c
|
||||||
|
BYTE $0x26; BYTE $0xe9; BYTE $0xea; BYTE $0xeb
|
||||||
|
BYTE $0xe8; BYTE $0xed; BYTE $0xee; BYTE $0xef
|
||||||
|
BYTE $0xec; BYTE $0xdf; BYTE $0x21; BYTE $0x24
|
||||||
|
BYTE $0x2a; BYTE $0x29; BYTE $0x3b; BYTE $0x5e
|
||||||
|
BYTE $0x2d; BYTE $0x2f; BYTE $0xc2; BYTE $0xc4
|
||||||
|
BYTE $0xc0; BYTE $0xc1; BYTE $0xc3; BYTE $0xc5
|
||||||
|
BYTE $0xc7; BYTE $0xd1; BYTE $0xa6; BYTE $0x2c
|
||||||
|
BYTE $0x25; BYTE $0x5f; BYTE $0x3e; BYTE $0x3f
|
||||||
|
BYTE $0xf8; BYTE $0xc9; BYTE $0xca; BYTE $0xcb
|
||||||
|
BYTE $0xc8; BYTE $0xcd; BYTE $0xce; BYTE $0xcf
|
||||||
|
BYTE $0xcc; BYTE $0x60; BYTE $0x3a; BYTE $0x23
|
||||||
|
BYTE $0x40; BYTE $0x27; BYTE $0x3d; BYTE $0x22
|
||||||
|
BYTE $0xd8; BYTE $0x61; BYTE $0x62; BYTE $0x63
|
||||||
|
BYTE $0x64; BYTE $0x65; BYTE $0x66; BYTE $0x67
|
||||||
|
BYTE $0x68; BYTE $0x69; BYTE $0xab; BYTE $0xbb
|
||||||
|
BYTE $0xf0; BYTE $0xfd; BYTE $0xfe; BYTE $0xb1
|
||||||
|
BYTE $0xb0; BYTE $0x6a; BYTE $0x6b; BYTE $0x6c
|
||||||
|
BYTE $0x6d; BYTE $0x6e; BYTE $0x6f; BYTE $0x70
|
||||||
|
BYTE $0x71; BYTE $0x72; BYTE $0xaa; BYTE $0xba
|
||||||
|
BYTE $0xe6; BYTE $0xb8; BYTE $0xc6; BYTE $0xa4
|
||||||
|
BYTE $0xb5; BYTE $0x7e; BYTE $0x73; BYTE $0x74
|
||||||
|
BYTE $0x75; BYTE $0x76; BYTE $0x77; BYTE $0x78
|
||||||
|
BYTE $0x79; BYTE $0x7a; BYTE $0xa1; BYTE $0xbf
|
||||||
|
BYTE $0xd0; BYTE $0x5b; BYTE $0xde; BYTE $0xae
|
||||||
|
BYTE $0xac; BYTE $0xa3; BYTE $0xa5; BYTE $0xb7
|
||||||
|
BYTE $0xa9; BYTE $0xa7; BYTE $0xb6; BYTE $0xbc
|
||||||
|
BYTE $0xbd; BYTE $0xbe; BYTE $0xdd; BYTE $0xa8
|
||||||
|
BYTE $0xaf; BYTE $0x5d; BYTE $0xb4; BYTE $0xd7
|
||||||
|
BYTE $0x7b; BYTE $0x41; BYTE $0x42; BYTE $0x43
|
||||||
|
BYTE $0x44; BYTE $0x45; BYTE $0x46; BYTE $0x47
|
||||||
|
BYTE $0x48; BYTE $0x49; BYTE $0xad; BYTE $0xf4
|
||||||
|
BYTE $0xf6; BYTE $0xf2; BYTE $0xf3; BYTE $0xf5
|
||||||
|
BYTE $0x7d; BYTE $0x4a; BYTE $0x4b; BYTE $0x4c
|
||||||
|
BYTE $0x4d; BYTE $0x4e; BYTE $0x4f; BYTE $0x50
|
||||||
|
BYTE $0x51; BYTE $0x52; BYTE $0xb9; BYTE $0xfb
|
||||||
|
BYTE $0xfc; BYTE $0xf9; BYTE $0xfa; BYTE $0xff
|
||||||
|
BYTE $0x5c; BYTE $0xf7; BYTE $0x53; BYTE $0x54
|
||||||
|
BYTE $0x55; BYTE $0x56; BYTE $0x57; BYTE $0x58
|
||||||
|
BYTE $0x59; BYTE $0x5a; BYTE $0xb2; BYTE $0xd4
|
||||||
|
BYTE $0xd6; BYTE $0xd2; BYTE $0xd3; BYTE $0xd5
|
||||||
|
BYTE $0x30; BYTE $0x31; BYTE $0x32; BYTE $0x33
|
||||||
|
BYTE $0x34; BYTE $0x35; BYTE $0x36; BYTE $0x37
|
||||||
|
BYTE $0x38; BYTE $0x39; BYTE $0xb3; BYTE $0xdb
|
||||||
|
BYTE $0xdc; BYTE $0xd9; BYTE $0xda; BYTE $0x9f
|
||||||
|
|
||||||
|
retry:
|
||||||
|
WORD $0xB9931022 // TROO 2,2,b'0001'
|
||||||
|
BVS retry
|
||||||
|
RET
|
||||||
220
vendor/golang.org/x/sys/unix/epoll_zos.go
generated
vendored
220
vendor/golang.org/x/sys/unix/epoll_zos.go
generated
vendored
@@ -1,220 +0,0 @@
|
|||||||
// Copyright 2020 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 zos && s390x
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
import (
|
|
||||||
"sync"
|
|
||||||
)
|
|
||||||
|
|
||||||
// This file simulates epoll on z/OS using poll.
|
|
||||||
|
|
||||||
// Analogous to epoll_event on Linux.
|
|
||||||
// TODO(neeilan): Pad is because the Linux kernel expects a 96-bit struct. We never pass this to the kernel; remove?
|
|
||||||
type EpollEvent struct {
|
|
||||||
Events uint32
|
|
||||||
Fd int32
|
|
||||||
Pad int32
|
|
||||||
}
|
|
||||||
|
|
||||||
const (
|
|
||||||
EPOLLERR = 0x8
|
|
||||||
EPOLLHUP = 0x10
|
|
||||||
EPOLLIN = 0x1
|
|
||||||
EPOLLMSG = 0x400
|
|
||||||
EPOLLOUT = 0x4
|
|
||||||
EPOLLPRI = 0x2
|
|
||||||
EPOLLRDBAND = 0x80
|
|
||||||
EPOLLRDNORM = 0x40
|
|
||||||
EPOLLWRBAND = 0x200
|
|
||||||
EPOLLWRNORM = 0x100
|
|
||||||
EPOLL_CTL_ADD = 0x1
|
|
||||||
EPOLL_CTL_DEL = 0x2
|
|
||||||
EPOLL_CTL_MOD = 0x3
|
|
||||||
// The following constants are part of the epoll API, but represent
|
|
||||||
// currently unsupported functionality on z/OS.
|
|
||||||
// EPOLL_CLOEXEC = 0x80000
|
|
||||||
// EPOLLET = 0x80000000
|
|
||||||
// EPOLLONESHOT = 0x40000000
|
|
||||||
// EPOLLRDHUP = 0x2000 // Typically used with edge-triggered notis
|
|
||||||
// EPOLLEXCLUSIVE = 0x10000000 // Exclusive wake-up mode
|
|
||||||
// EPOLLWAKEUP = 0x20000000 // Relies on Linux's BLOCK_SUSPEND capability
|
|
||||||
)
|
|
||||||
|
|
||||||
// TODO(neeilan): We can eliminate these epToPoll / pToEpoll calls by using identical mask values for POLL/EPOLL
|
|
||||||
// constants where possible The lower 16 bits of epoll events (uint32) can fit any system poll event (int16).
|
|
||||||
|
|
||||||
// epToPollEvt converts epoll event field to poll equivalent.
|
|
||||||
// In epoll, Events is a 32-bit field, while poll uses 16 bits.
|
|
||||||
func epToPollEvt(events uint32) int16 {
|
|
||||||
var ep2p = map[uint32]int16{
|
|
||||||
EPOLLIN: POLLIN,
|
|
||||||
EPOLLOUT: POLLOUT,
|
|
||||||
EPOLLHUP: POLLHUP,
|
|
||||||
EPOLLPRI: POLLPRI,
|
|
||||||
EPOLLERR: POLLERR,
|
|
||||||
}
|
|
||||||
|
|
||||||
var pollEvts int16 = 0
|
|
||||||
for epEvt, pEvt := range ep2p {
|
|
||||||
if (events & epEvt) != 0 {
|
|
||||||
pollEvts |= pEvt
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return pollEvts
|
|
||||||
}
|
|
||||||
|
|
||||||
// pToEpollEvt converts 16 bit poll event bitfields to 32-bit epoll event fields.
|
|
||||||
func pToEpollEvt(revents int16) uint32 {
|
|
||||||
var p2ep = map[int16]uint32{
|
|
||||||
POLLIN: EPOLLIN,
|
|
||||||
POLLOUT: EPOLLOUT,
|
|
||||||
POLLHUP: EPOLLHUP,
|
|
||||||
POLLPRI: EPOLLPRI,
|
|
||||||
POLLERR: EPOLLERR,
|
|
||||||
}
|
|
||||||
|
|
||||||
var epollEvts uint32 = 0
|
|
||||||
for pEvt, epEvt := range p2ep {
|
|
||||||
if (revents & pEvt) != 0 {
|
|
||||||
epollEvts |= epEvt
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return epollEvts
|
|
||||||
}
|
|
||||||
|
|
||||||
// Per-process epoll implementation.
|
|
||||||
type epollImpl struct {
|
|
||||||
mu sync.Mutex
|
|
||||||
epfd2ep map[int]*eventPoll
|
|
||||||
nextEpfd int
|
|
||||||
}
|
|
||||||
|
|
||||||
// eventPoll holds a set of file descriptors being watched by the process. A process can have multiple epoll instances.
|
|
||||||
// On Linux, this is an in-kernel data structure accessed through a fd.
|
|
||||||
type eventPoll struct {
|
|
||||||
mu sync.Mutex
|
|
||||||
fds map[int]*EpollEvent
|
|
||||||
}
|
|
||||||
|
|
||||||
// epoll impl for this process.
|
|
||||||
var impl epollImpl = epollImpl{
|
|
||||||
epfd2ep: make(map[int]*eventPoll),
|
|
||||||
nextEpfd: 0,
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *epollImpl) epollcreate(size int) (epfd int, err error) {
|
|
||||||
e.mu.Lock()
|
|
||||||
defer e.mu.Unlock()
|
|
||||||
epfd = e.nextEpfd
|
|
||||||
e.nextEpfd++
|
|
||||||
|
|
||||||
e.epfd2ep[epfd] = &eventPoll{
|
|
||||||
fds: make(map[int]*EpollEvent),
|
|
||||||
}
|
|
||||||
return epfd, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *epollImpl) epollcreate1(flag int) (fd int, err error) {
|
|
||||||
return e.epollcreate(4)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *epollImpl) epollctl(epfd int, op int, fd int, event *EpollEvent) (err error) {
|
|
||||||
e.mu.Lock()
|
|
||||||
defer e.mu.Unlock()
|
|
||||||
|
|
||||||
ep, ok := e.epfd2ep[epfd]
|
|
||||||
if !ok {
|
|
||||||
|
|
||||||
return EBADF
|
|
||||||
}
|
|
||||||
|
|
||||||
switch op {
|
|
||||||
case EPOLL_CTL_ADD:
|
|
||||||
// TODO(neeilan): When we make epfds and fds disjoint, detect epoll
|
|
||||||
// loops here (instances watching each other) and return ELOOP.
|
|
||||||
if _, ok := ep.fds[fd]; ok {
|
|
||||||
return EEXIST
|
|
||||||
}
|
|
||||||
ep.fds[fd] = event
|
|
||||||
case EPOLL_CTL_MOD:
|
|
||||||
if _, ok := ep.fds[fd]; !ok {
|
|
||||||
return ENOENT
|
|
||||||
}
|
|
||||||
ep.fds[fd] = event
|
|
||||||
case EPOLL_CTL_DEL:
|
|
||||||
if _, ok := ep.fds[fd]; !ok {
|
|
||||||
return ENOENT
|
|
||||||
}
|
|
||||||
delete(ep.fds, fd)
|
|
||||||
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Must be called while holding ep.mu
|
|
||||||
func (ep *eventPoll) getFds() []int {
|
|
||||||
fds := make([]int, len(ep.fds))
|
|
||||||
for fd := range ep.fds {
|
|
||||||
fds = append(fds, fd)
|
|
||||||
}
|
|
||||||
return fds
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *epollImpl) epollwait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
|
||||||
e.mu.Lock() // in [rare] case of concurrent epollcreate + epollwait
|
|
||||||
ep, ok := e.epfd2ep[epfd]
|
|
||||||
|
|
||||||
if !ok {
|
|
||||||
e.mu.Unlock()
|
|
||||||
return 0, EBADF
|
|
||||||
}
|
|
||||||
|
|
||||||
pollfds := make([]PollFd, 4)
|
|
||||||
for fd, epollevt := range ep.fds {
|
|
||||||
pollfds = append(pollfds, PollFd{Fd: int32(fd), Events: epToPollEvt(epollevt.Events)})
|
|
||||||
}
|
|
||||||
e.mu.Unlock()
|
|
||||||
|
|
||||||
n, err = Poll(pollfds, msec)
|
|
||||||
if err != nil {
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
|
|
||||||
i := 0
|
|
||||||
for _, pFd := range pollfds {
|
|
||||||
if pFd.Revents != 0 {
|
|
||||||
events[i] = EpollEvent{Fd: pFd.Fd, Events: pToEpollEvt(pFd.Revents)}
|
|
||||||
i++
|
|
||||||
}
|
|
||||||
|
|
||||||
if i == n {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return n, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func EpollCreate(size int) (fd int, err error) {
|
|
||||||
return impl.epollcreate(size)
|
|
||||||
}
|
|
||||||
|
|
||||||
func EpollCreate1(flag int) (fd int, err error) {
|
|
||||||
return impl.epollcreate1(flag)
|
|
||||||
}
|
|
||||||
|
|
||||||
func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
|
|
||||||
return impl.epollctl(epfd, op, fd, event)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Because EpollWait mutates events, the caller is expected to coordinate
|
|
||||||
// concurrent access if calling with the same epfd from multiple goroutines.
|
|
||||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
|
||||||
return impl.epollwait(epfd, events, msec)
|
|
||||||
}
|
|
||||||
163
vendor/golang.org/x/sys/unix/fstatfs_zos.go
generated
vendored
163
vendor/golang.org/x/sys/unix/fstatfs_zos.go
generated
vendored
@@ -1,163 +0,0 @@
|
|||||||
// Copyright 2020 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 zos && s390x
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
import (
|
|
||||||
"unsafe"
|
|
||||||
)
|
|
||||||
|
|
||||||
// This file simulates fstatfs on z/OS using fstatvfs and w_getmntent.
|
|
||||||
|
|
||||||
func Fstatfs(fd int, stat *Statfs_t) (err error) {
|
|
||||||
var stat_v Statvfs_t
|
|
||||||
err = Fstatvfs(fd, &stat_v)
|
|
||||||
if err == nil {
|
|
||||||
// populate stat
|
|
||||||
stat.Type = 0
|
|
||||||
stat.Bsize = stat_v.Bsize
|
|
||||||
stat.Blocks = stat_v.Blocks
|
|
||||||
stat.Bfree = stat_v.Bfree
|
|
||||||
stat.Bavail = stat_v.Bavail
|
|
||||||
stat.Files = stat_v.Files
|
|
||||||
stat.Ffree = stat_v.Ffree
|
|
||||||
stat.Fsid = stat_v.Fsid
|
|
||||||
stat.Namelen = stat_v.Namemax
|
|
||||||
stat.Frsize = stat_v.Frsize
|
|
||||||
stat.Flags = stat_v.Flag
|
|
||||||
for passn := 0; passn < 5; passn++ {
|
|
||||||
switch passn {
|
|
||||||
case 0:
|
|
||||||
err = tryGetmntent64(stat)
|
|
||||||
break
|
|
||||||
case 1:
|
|
||||||
err = tryGetmntent128(stat)
|
|
||||||
break
|
|
||||||
case 2:
|
|
||||||
err = tryGetmntent256(stat)
|
|
||||||
break
|
|
||||||
case 3:
|
|
||||||
err = tryGetmntent512(stat)
|
|
||||||
break
|
|
||||||
case 4:
|
|
||||||
err = tryGetmntent1024(stat)
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
//proceed to return if: err is nil (found), err is nonnil but not ERANGE (another error occurred)
|
|
||||||
if err == nil || err != nil && err != ERANGE {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func tryGetmntent64(stat *Statfs_t) (err error) {
|
|
||||||
var mnt_ent_buffer struct {
|
|
||||||
header W_Mnth
|
|
||||||
filesys_info [64]W_Mntent
|
|
||||||
}
|
|
||||||
var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer))
|
|
||||||
fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
err = ERANGE //return ERANGE if no match is found in this batch
|
|
||||||
for i := 0; i < fs_count; i++ {
|
|
||||||
if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) {
|
|
||||||
stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0])
|
|
||||||
err = nil
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func tryGetmntent128(stat *Statfs_t) (err error) {
|
|
||||||
var mnt_ent_buffer struct {
|
|
||||||
header W_Mnth
|
|
||||||
filesys_info [128]W_Mntent
|
|
||||||
}
|
|
||||||
var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer))
|
|
||||||
fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
err = ERANGE //return ERANGE if no match is found in this batch
|
|
||||||
for i := 0; i < fs_count; i++ {
|
|
||||||
if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) {
|
|
||||||
stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0])
|
|
||||||
err = nil
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func tryGetmntent256(stat *Statfs_t) (err error) {
|
|
||||||
var mnt_ent_buffer struct {
|
|
||||||
header W_Mnth
|
|
||||||
filesys_info [256]W_Mntent
|
|
||||||
}
|
|
||||||
var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer))
|
|
||||||
fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
err = ERANGE //return ERANGE if no match is found in this batch
|
|
||||||
for i := 0; i < fs_count; i++ {
|
|
||||||
if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) {
|
|
||||||
stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0])
|
|
||||||
err = nil
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func tryGetmntent512(stat *Statfs_t) (err error) {
|
|
||||||
var mnt_ent_buffer struct {
|
|
||||||
header W_Mnth
|
|
||||||
filesys_info [512]W_Mntent
|
|
||||||
}
|
|
||||||
var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer))
|
|
||||||
fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
err = ERANGE //return ERANGE if no match is found in this batch
|
|
||||||
for i := 0; i < fs_count; i++ {
|
|
||||||
if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) {
|
|
||||||
stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0])
|
|
||||||
err = nil
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func tryGetmntent1024(stat *Statfs_t) (err error) {
|
|
||||||
var mnt_ent_buffer struct {
|
|
||||||
header W_Mnth
|
|
||||||
filesys_info [1024]W_Mntent
|
|
||||||
}
|
|
||||||
var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer))
|
|
||||||
fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
err = ERANGE //return ERANGE if no match is found in this batch
|
|
||||||
for i := 0; i < fs_count; i++ {
|
|
||||||
if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) {
|
|
||||||
stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0])
|
|
||||||
err = nil
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
4
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
4
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
@@ -58,6 +58,7 @@ includes_Darwin='
|
|||||||
#define _DARWIN_USE_64_BIT_INODE
|
#define _DARWIN_USE_64_BIT_INODE
|
||||||
#define __APPLE_USE_RFC_3542
|
#define __APPLE_USE_RFC_3542
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <sys/stdio.h>
|
||||||
#include <sys/attr.h>
|
#include <sys/attr.h>
|
||||||
#include <sys/clonefile.h>
|
#include <sys/clonefile.h>
|
||||||
#include <sys/kern_control.h>
|
#include <sys/kern_control.h>
|
||||||
@@ -263,6 +264,7 @@ struct ltchars {
|
|||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/seccomp.h>
|
#include <linux/seccomp.h>
|
||||||
#include <linux/serial.h>
|
#include <linux/serial.h>
|
||||||
|
#include <linux/sock_diag.h>
|
||||||
#include <linux/sockios.h>
|
#include <linux/sockios.h>
|
||||||
#include <linux/taskstats.h>
|
#include <linux/taskstats.h>
|
||||||
#include <linux/tipc.h>
|
#include <linux/tipc.h>
|
||||||
@@ -549,6 +551,8 @@ ccflags="$@"
|
|||||||
$2 !~ "NLA_TYPE_MASK" &&
|
$2 !~ "NLA_TYPE_MASK" &&
|
||||||
$2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ &&
|
$2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ &&
|
||||||
$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ ||
|
$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ ||
|
||||||
|
$2 ~ /^SOCK_|SK_DIAG_|SKNLGRP_$/ ||
|
||||||
|
$2 ~ /^(CONNECT|SAE)_/ ||
|
||||||
$2 ~ /^FIORDCHK$/ ||
|
$2 ~ /^FIORDCHK$/ ||
|
||||||
$2 ~ /^SIOC/ ||
|
$2 ~ /^SIOC/ ||
|
||||||
$2 ~ /^TIOC/ ||
|
$2 ~ /^TIOC/ ||
|
||||||
|
|||||||
5
vendor/golang.org/x/sys/unix/mremap.go
generated
vendored
5
vendor/golang.org/x/sys/unix/mremap.go
generated
vendored
@@ -50,3 +50,8 @@ func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data [
|
|||||||
func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
|
func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
|
||||||
return mapper.Mremap(oldData, newLength, flags)
|
return mapper.Mremap(oldData, newLength, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func MremapPtr(oldAddr unsafe.Pointer, oldSize uintptr, newAddr unsafe.Pointer, newSize uintptr, flags int) (ret unsafe.Pointer, err error) {
|
||||||
|
xaddr, err := mapper.mremap(uintptr(oldAddr), oldSize, newSize, flags, uintptr(newAddr))
|
||||||
|
return unsafe.Pointer(xaddr), err
|
||||||
|
}
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/pagesize_unix.go
generated
vendored
2
vendor/golang.org/x/sys/unix/pagesize_unix.go
generated
vendored
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
|
||||||
|
|
||||||
// For Unix, get the pagesize from the runtime.
|
// For Unix, get the pagesize from the runtime.
|
||||||
|
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/readdirent_getdirentries.go
generated
vendored
2
vendor/golang.org/x/sys/unix/readdirent_getdirentries.go
generated
vendored
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build darwin
|
//go:build darwin || zos
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
|||||||
58
vendor/golang.org/x/sys/unix/sockcmsg_zos.go
generated
vendored
Normal file
58
vendor/golang.org/x/sys/unix/sockcmsg_zos.go
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
// Copyright 2024 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.
|
||||||
|
|
||||||
|
// Socket control messages
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
import "unsafe"
|
||||||
|
|
||||||
|
// UnixCredentials encodes credentials into a socket control message
|
||||||
|
// for sending to another process. This can be used for
|
||||||
|
// authentication.
|
||||||
|
func UnixCredentials(ucred *Ucred) []byte {
|
||||||
|
b := make([]byte, CmsgSpace(SizeofUcred))
|
||||||
|
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
|
||||||
|
h.Level = SOL_SOCKET
|
||||||
|
h.Type = SCM_CREDENTIALS
|
||||||
|
h.SetLen(CmsgLen(SizeofUcred))
|
||||||
|
*(*Ucred)(h.data(0)) = *ucred
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
|
||||||
|
// ParseUnixCredentials decodes a socket control message that contains
|
||||||
|
// credentials in a Ucred structure. To receive such a message, the
|
||||||
|
// SO_PASSCRED option must be enabled on the socket.
|
||||||
|
func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
|
||||||
|
if m.Header.Level != SOL_SOCKET {
|
||||||
|
return nil, EINVAL
|
||||||
|
}
|
||||||
|
if m.Header.Type != SCM_CREDENTIALS {
|
||||||
|
return nil, EINVAL
|
||||||
|
}
|
||||||
|
ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
|
||||||
|
return &ucred, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO.
|
||||||
|
func PktInfo4(info *Inet4Pktinfo) []byte {
|
||||||
|
b := make([]byte, CmsgSpace(SizeofInet4Pktinfo))
|
||||||
|
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
|
||||||
|
h.Level = SOL_IP
|
||||||
|
h.Type = IP_PKTINFO
|
||||||
|
h.SetLen(CmsgLen(SizeofInet4Pktinfo))
|
||||||
|
*(*Inet4Pktinfo)(h.data(0)) = *info
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
|
||||||
|
// PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO.
|
||||||
|
func PktInfo6(info *Inet6Pktinfo) []byte {
|
||||||
|
b := make([]byte, CmsgSpace(SizeofInet6Pktinfo))
|
||||||
|
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
|
||||||
|
h.Level = SOL_IPV6
|
||||||
|
h.Type = IPV6_PKTINFO
|
||||||
|
h.SetLen(CmsgLen(SizeofInet6Pktinfo))
|
||||||
|
*(*Inet6Pktinfo)(h.data(0)) = *info
|
||||||
|
return b
|
||||||
|
}
|
||||||
75
vendor/golang.org/x/sys/unix/symaddr_zos_s390x.s
generated
vendored
Normal file
75
vendor/golang.org/x/sys/unix/symaddr_zos_s390x.s
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
// Copyright 2024 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 zos && s390x && gc
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
// provide the address of function variable to be fixed up.
|
||||||
|
|
||||||
|
TEXT ·getPipe2Addr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Pipe2(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
TEXT ·get_FlockAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Flock(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
TEXT ·get_GetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Getxattr(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
TEXT ·get_NanosleepAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Nanosleep(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
TEXT ·get_SetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Setxattr(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
TEXT ·get_Wait4Addr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Wait4(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
TEXT ·get_MountAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Mount(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
TEXT ·get_UnmountAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Unmount(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
TEXT ·get_UtimesNanoAtAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·UtimesNanoAt(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
TEXT ·get_UtimesNanoAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·UtimesNano(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
TEXT ·get_MkfifoatAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Mkfifoat(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
TEXT ·get_ChtagAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Chtag(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
TEXT ·get_ReadlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Readlinkat(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
61
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
61
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
@@ -402,6 +402,18 @@ func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error {
|
|||||||
return ioctlPtr(fd, SIOCSIFMTU, unsafe.Pointer(ifreq))
|
return ioctlPtr(fd, SIOCSIFMTU, unsafe.Pointer(ifreq))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sys renamexNp(from string, to string, flag uint32) (err error)
|
||||||
|
|
||||||
|
func RenamexNp(from string, to string, flag uint32) (err error) {
|
||||||
|
return renamexNp(from, to, flag)
|
||||||
|
}
|
||||||
|
|
||||||
|
//sys renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error)
|
||||||
|
|
||||||
|
func RenameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) {
|
||||||
|
return renameatxNp(fromfd, from, tofd, to, flag)
|
||||||
|
}
|
||||||
|
|
||||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL
|
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL
|
||||||
|
|
||||||
func Uname(uname *Utsname) error {
|
func Uname(uname *Utsname) error {
|
||||||
@@ -542,6 +554,55 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sys pthread_chdir_np(path string) (err error)
|
||||||
|
|
||||||
|
func PthreadChdir(path string) (err error) {
|
||||||
|
return pthread_chdir_np(path)
|
||||||
|
}
|
||||||
|
|
||||||
|
//sys pthread_fchdir_np(fd int) (err error)
|
||||||
|
|
||||||
|
func PthreadFchdir(fd int) (err error) {
|
||||||
|
return pthread_fchdir_np(fd)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Connectx calls connectx(2) to initiate a connection on a socket.
|
||||||
|
//
|
||||||
|
// srcIf, srcAddr, and dstAddr are filled into a [SaEndpoints] struct and passed as the endpoints argument.
|
||||||
|
//
|
||||||
|
// - srcIf is the optional source interface index. 0 means unspecified.
|
||||||
|
// - srcAddr is the optional source address. nil means unspecified.
|
||||||
|
// - dstAddr is the destination address.
|
||||||
|
//
|
||||||
|
// On success, Connectx returns the number of bytes enqueued for transmission.
|
||||||
|
func Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocID, flags uint32, iov []Iovec, connid *SaeConnID) (n uintptr, err error) {
|
||||||
|
endpoints := SaEndpoints{
|
||||||
|
Srcif: srcIf,
|
||||||
|
}
|
||||||
|
|
||||||
|
if srcAddr != nil {
|
||||||
|
addrp, addrlen, err := srcAddr.sockaddr()
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
endpoints.Srcaddr = (*RawSockaddr)(addrp)
|
||||||
|
endpoints.Srcaddrlen = uint32(addrlen)
|
||||||
|
}
|
||||||
|
|
||||||
|
if dstAddr != nil {
|
||||||
|
addrp, addrlen, err := dstAddr.sockaddr()
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
endpoints.Dstaddr = (*RawSockaddr)(addrp)
|
||||||
|
endpoints.Dstaddrlen = uint32(addrlen)
|
||||||
|
}
|
||||||
|
|
||||||
|
err = connectx(fd, &endpoints, associd, flags, iov, &n, connid)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//sys connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error)
|
||||||
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
|
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
|
||||||
|
|
||||||
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
|
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
|
||||||
|
|||||||
1
vendor/golang.org/x/sys/unix/syscall_hurd.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_hurd.go
generated
vendored
@@ -11,6 +11,7 @@ package unix
|
|||||||
int ioctl(int, unsigned long int, uintptr_t);
|
int ioctl(int, unsigned long int, uintptr_t);
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
import "unsafe"
|
||||||
|
|
||||||
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||||
r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg))
|
r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg))
|
||||||
|
|||||||
1
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
@@ -2592,3 +2592,4 @@ func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error)
|
//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error)
|
||||||
|
//sys Mseal(b []byte, flags uint) (err error)
|
||||||
|
|||||||
1
vendor/golang.org/x/sys/unix/syscall_openbsd.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_openbsd.go
generated
vendored
@@ -293,6 +293,7 @@ func Uname(uname *Utsname) error {
|
|||||||
//sys Mkfifoat(dirfd int, path string, mode uint32) (err error)
|
//sys Mkfifoat(dirfd int, path string, mode uint32) (err error)
|
||||||
//sys Mknod(path string, mode uint32, dev int) (err error)
|
//sys Mknod(path string, mode uint32, dev int) (err error)
|
||||||
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
|
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
|
||||||
|
//sys Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error)
|
||||||
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
||||||
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
||||||
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
|
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
|
||||||
|
|||||||
9
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
9
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
@@ -154,6 +154,15 @@ func Munmap(b []byte) (err error) {
|
|||||||
return mapper.Munmap(b)
|
return mapper.Munmap(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func MmapPtr(fd int, offset int64, addr unsafe.Pointer, length uintptr, prot int, flags int) (ret unsafe.Pointer, err error) {
|
||||||
|
xaddr, err := mapper.mmap(uintptr(addr), length, prot, flags, fd, offset)
|
||||||
|
return unsafe.Pointer(xaddr), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func MunmapPtr(addr unsafe.Pointer, length uintptr) (err error) {
|
||||||
|
return mapper.munmap(uintptr(addr), length)
|
||||||
|
}
|
||||||
|
|
||||||
func Read(fd int, p []byte) (n int, err error) {
|
func Read(fd int, p []byte) (n int, err error) {
|
||||||
n, err = read(fd, p)
|
n, err = read(fd, p)
|
||||||
if raceenabled {
|
if raceenabled {
|
||||||
|
|||||||
1509
vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
generated
vendored
1509
vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
generated
vendored
File diff suppressed because it is too large
Load Diff
2
vendor/golang.org/x/sys/unix/sysvshm_unix.go
generated
vendored
2
vendor/golang.org/x/sys/unix/sysvshm_unix.go
generated
vendored
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build (darwin && !ios) || linux
|
//go:build (darwin && !ios) || linux || zos
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
generated
vendored
2
vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
generated
vendored
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build darwin && !ios
|
//go:build (darwin && !ios) || zos
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
|||||||
12
vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
generated
vendored
12
vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
generated
vendored
@@ -237,6 +237,9 @@ const (
|
|||||||
CLOCK_UPTIME_RAW_APPROX = 0x9
|
CLOCK_UPTIME_RAW_APPROX = 0x9
|
||||||
CLONE_NOFOLLOW = 0x1
|
CLONE_NOFOLLOW = 0x1
|
||||||
CLONE_NOOWNERCOPY = 0x2
|
CLONE_NOOWNERCOPY = 0x2
|
||||||
|
CONNECT_DATA_AUTHENTICATED = 0x4
|
||||||
|
CONNECT_DATA_IDEMPOTENT = 0x2
|
||||||
|
CONNECT_RESUME_ON_READ_WRITE = 0x1
|
||||||
CR0 = 0x0
|
CR0 = 0x0
|
||||||
CR1 = 0x1000
|
CR1 = 0x1000
|
||||||
CR2 = 0x2000
|
CR2 = 0x2000
|
||||||
@@ -1169,6 +1172,11 @@ const (
|
|||||||
PT_WRITE_D = 0x5
|
PT_WRITE_D = 0x5
|
||||||
PT_WRITE_I = 0x4
|
PT_WRITE_I = 0x4
|
||||||
PT_WRITE_U = 0x6
|
PT_WRITE_U = 0x6
|
||||||
|
RENAME_EXCL = 0x4
|
||||||
|
RENAME_NOFOLLOW_ANY = 0x10
|
||||||
|
RENAME_RESERVED1 = 0x8
|
||||||
|
RENAME_SECLUDE = 0x1
|
||||||
|
RENAME_SWAP = 0x2
|
||||||
RLIMIT_AS = 0x5
|
RLIMIT_AS = 0x5
|
||||||
RLIMIT_CORE = 0x4
|
RLIMIT_CORE = 0x4
|
||||||
RLIMIT_CPU = 0x0
|
RLIMIT_CPU = 0x0
|
||||||
@@ -1260,6 +1268,10 @@ const (
|
|||||||
RTV_SSTHRESH = 0x20
|
RTV_SSTHRESH = 0x20
|
||||||
RUSAGE_CHILDREN = -0x1
|
RUSAGE_CHILDREN = -0x1
|
||||||
RUSAGE_SELF = 0x0
|
RUSAGE_SELF = 0x0
|
||||||
|
SAE_ASSOCID_ALL = 0xffffffff
|
||||||
|
SAE_ASSOCID_ANY = 0x0
|
||||||
|
SAE_CONNID_ALL = 0xffffffff
|
||||||
|
SAE_CONNID_ANY = 0x0
|
||||||
SCM_CREDS = 0x3
|
SCM_CREDS = 0x3
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
|
|||||||
12
vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
generated
vendored
12
vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
generated
vendored
@@ -237,6 +237,9 @@ const (
|
|||||||
CLOCK_UPTIME_RAW_APPROX = 0x9
|
CLOCK_UPTIME_RAW_APPROX = 0x9
|
||||||
CLONE_NOFOLLOW = 0x1
|
CLONE_NOFOLLOW = 0x1
|
||||||
CLONE_NOOWNERCOPY = 0x2
|
CLONE_NOOWNERCOPY = 0x2
|
||||||
|
CONNECT_DATA_AUTHENTICATED = 0x4
|
||||||
|
CONNECT_DATA_IDEMPOTENT = 0x2
|
||||||
|
CONNECT_RESUME_ON_READ_WRITE = 0x1
|
||||||
CR0 = 0x0
|
CR0 = 0x0
|
||||||
CR1 = 0x1000
|
CR1 = 0x1000
|
||||||
CR2 = 0x2000
|
CR2 = 0x2000
|
||||||
@@ -1169,6 +1172,11 @@ const (
|
|||||||
PT_WRITE_D = 0x5
|
PT_WRITE_D = 0x5
|
||||||
PT_WRITE_I = 0x4
|
PT_WRITE_I = 0x4
|
||||||
PT_WRITE_U = 0x6
|
PT_WRITE_U = 0x6
|
||||||
|
RENAME_EXCL = 0x4
|
||||||
|
RENAME_NOFOLLOW_ANY = 0x10
|
||||||
|
RENAME_RESERVED1 = 0x8
|
||||||
|
RENAME_SECLUDE = 0x1
|
||||||
|
RENAME_SWAP = 0x2
|
||||||
RLIMIT_AS = 0x5
|
RLIMIT_AS = 0x5
|
||||||
RLIMIT_CORE = 0x4
|
RLIMIT_CORE = 0x4
|
||||||
RLIMIT_CPU = 0x0
|
RLIMIT_CPU = 0x0
|
||||||
@@ -1260,6 +1268,10 @@ const (
|
|||||||
RTV_SSTHRESH = 0x20
|
RTV_SSTHRESH = 0x20
|
||||||
RUSAGE_CHILDREN = -0x1
|
RUSAGE_CHILDREN = -0x1
|
||||||
RUSAGE_SELF = 0x0
|
RUSAGE_SELF = 0x0
|
||||||
|
SAE_ASSOCID_ALL = 0xffffffff
|
||||||
|
SAE_ASSOCID_ANY = 0x0
|
||||||
|
SAE_CONNID_ALL = 0xffffffff
|
||||||
|
SAE_CONNID_ANY = 0x0
|
||||||
SCM_CREDS = 0x3
|
SCM_CREDS = 0x3
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
|
|||||||
67
vendor/golang.org/x/sys/unix/zerrors_linux.go
generated
vendored
67
vendor/golang.org/x/sys/unix/zerrors_linux.go
generated
vendored
@@ -457,6 +457,7 @@ const (
|
|||||||
B600 = 0x8
|
B600 = 0x8
|
||||||
B75 = 0x2
|
B75 = 0x2
|
||||||
B9600 = 0xd
|
B9600 = 0xd
|
||||||
|
BCACHEFS_SUPER_MAGIC = 0xca451a4e
|
||||||
BDEVFS_MAGIC = 0x62646576
|
BDEVFS_MAGIC = 0x62646576
|
||||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||||
BINFMTFS_MAGIC = 0x42494e4d
|
BINFMTFS_MAGIC = 0x42494e4d
|
||||||
@@ -491,6 +492,7 @@ const (
|
|||||||
BPF_F_REPLACE = 0x4
|
BPF_F_REPLACE = 0x4
|
||||||
BPF_F_SLEEPABLE = 0x10
|
BPF_F_SLEEPABLE = 0x10
|
||||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||||
|
BPF_F_TEST_REG_INVARIANTS = 0x80
|
||||||
BPF_F_TEST_RND_HI32 = 0x4
|
BPF_F_TEST_RND_HI32 = 0x4
|
||||||
BPF_F_TEST_RUN_ON_CPU = 0x1
|
BPF_F_TEST_RUN_ON_CPU = 0x1
|
||||||
BPF_F_TEST_STATE_FREQ = 0x8
|
BPF_F_TEST_STATE_FREQ = 0x8
|
||||||
@@ -501,6 +503,7 @@ const (
|
|||||||
BPF_IMM = 0x0
|
BPF_IMM = 0x0
|
||||||
BPF_IND = 0x40
|
BPF_IND = 0x40
|
||||||
BPF_JA = 0x0
|
BPF_JA = 0x0
|
||||||
|
BPF_JCOND = 0xe0
|
||||||
BPF_JEQ = 0x10
|
BPF_JEQ = 0x10
|
||||||
BPF_JGE = 0x30
|
BPF_JGE = 0x30
|
||||||
BPF_JGT = 0x20
|
BPF_JGT = 0x20
|
||||||
@@ -656,6 +659,9 @@ const (
|
|||||||
CAN_NPROTO = 0x8
|
CAN_NPROTO = 0x8
|
||||||
CAN_RAW = 0x1
|
CAN_RAW = 0x1
|
||||||
CAN_RAW_FILTER_MAX = 0x200
|
CAN_RAW_FILTER_MAX = 0x200
|
||||||
|
CAN_RAW_XL_VCID_RX_FILTER = 0x4
|
||||||
|
CAN_RAW_XL_VCID_TX_PASS = 0x2
|
||||||
|
CAN_RAW_XL_VCID_TX_SET = 0x1
|
||||||
CAN_RTR_FLAG = 0x40000000
|
CAN_RTR_FLAG = 0x40000000
|
||||||
CAN_SFF_ID_BITS = 0xb
|
CAN_SFF_ID_BITS = 0xb
|
||||||
CAN_SFF_MASK = 0x7ff
|
CAN_SFF_MASK = 0x7ff
|
||||||
@@ -923,6 +929,7 @@ const (
|
|||||||
EPOLL_CTL_ADD = 0x1
|
EPOLL_CTL_ADD = 0x1
|
||||||
EPOLL_CTL_DEL = 0x2
|
EPOLL_CTL_DEL = 0x2
|
||||||
EPOLL_CTL_MOD = 0x3
|
EPOLL_CTL_MOD = 0x3
|
||||||
|
EPOLL_IOC_TYPE = 0x8a
|
||||||
EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
|
EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
|
||||||
ESP_V4_FLOW = 0xa
|
ESP_V4_FLOW = 0xa
|
||||||
ESP_V6_FLOW = 0xc
|
ESP_V6_FLOW = 0xc
|
||||||
@@ -936,9 +943,6 @@ const (
|
|||||||
ETHTOOL_FEC_OFF = 0x4
|
ETHTOOL_FEC_OFF = 0x4
|
||||||
ETHTOOL_FEC_RS = 0x8
|
ETHTOOL_FEC_RS = 0x8
|
||||||
ETHTOOL_FLAG_ALL = 0x7
|
ETHTOOL_FLAG_ALL = 0x7
|
||||||
ETHTOOL_FLAG_COMPACT_BITSETS = 0x1
|
|
||||||
ETHTOOL_FLAG_OMIT_REPLY = 0x2
|
|
||||||
ETHTOOL_FLAG_STATS = 0x4
|
|
||||||
ETHTOOL_FLASHDEV = 0x33
|
ETHTOOL_FLASHDEV = 0x33
|
||||||
ETHTOOL_FLASH_MAX_FILENAME = 0x80
|
ETHTOOL_FLASH_MAX_FILENAME = 0x80
|
||||||
ETHTOOL_FWVERS_LEN = 0x20
|
ETHTOOL_FWVERS_LEN = 0x20
|
||||||
@@ -1338,6 +1342,7 @@ const (
|
|||||||
F_OFD_SETLK = 0x25
|
F_OFD_SETLK = 0x25
|
||||||
F_OFD_SETLKW = 0x26
|
F_OFD_SETLKW = 0x26
|
||||||
F_OK = 0x0
|
F_OK = 0x0
|
||||||
|
F_SEAL_EXEC = 0x20
|
||||||
F_SEAL_FUTURE_WRITE = 0x10
|
F_SEAL_FUTURE_WRITE = 0x10
|
||||||
F_SEAL_GROW = 0x4
|
F_SEAL_GROW = 0x4
|
||||||
F_SEAL_SEAL = 0x1
|
F_SEAL_SEAL = 0x1
|
||||||
@@ -1626,6 +1631,7 @@ const (
|
|||||||
IP_FREEBIND = 0xf
|
IP_FREEBIND = 0xf
|
||||||
IP_HDRINCL = 0x3
|
IP_HDRINCL = 0x3
|
||||||
IP_IPSEC_POLICY = 0x10
|
IP_IPSEC_POLICY = 0x10
|
||||||
|
IP_LOCAL_PORT_RANGE = 0x33
|
||||||
IP_MAXPACKET = 0xffff
|
IP_MAXPACKET = 0xffff
|
||||||
IP_MAX_MEMBERSHIPS = 0x14
|
IP_MAX_MEMBERSHIPS = 0x14
|
||||||
IP_MF = 0x2000
|
IP_MF = 0x2000
|
||||||
@@ -1652,6 +1658,7 @@ const (
|
|||||||
IP_PMTUDISC_OMIT = 0x5
|
IP_PMTUDISC_OMIT = 0x5
|
||||||
IP_PMTUDISC_PROBE = 0x3
|
IP_PMTUDISC_PROBE = 0x3
|
||||||
IP_PMTUDISC_WANT = 0x1
|
IP_PMTUDISC_WANT = 0x1
|
||||||
|
IP_PROTOCOL = 0x34
|
||||||
IP_RECVERR = 0xb
|
IP_RECVERR = 0xb
|
||||||
IP_RECVERR_RFC4884 = 0x1a
|
IP_RECVERR_RFC4884 = 0x1a
|
||||||
IP_RECVFRAGSIZE = 0x19
|
IP_RECVFRAGSIZE = 0x19
|
||||||
@@ -1697,6 +1704,8 @@ const (
|
|||||||
KEXEC_ARCH_S390 = 0x160000
|
KEXEC_ARCH_S390 = 0x160000
|
||||||
KEXEC_ARCH_SH = 0x2a0000
|
KEXEC_ARCH_SH = 0x2a0000
|
||||||
KEXEC_ARCH_X86_64 = 0x3e0000
|
KEXEC_ARCH_X86_64 = 0x3e0000
|
||||||
|
KEXEC_CRASH_HOTPLUG_SUPPORT = 0x8
|
||||||
|
KEXEC_FILE_DEBUG = 0x8
|
||||||
KEXEC_FILE_NO_INITRAMFS = 0x4
|
KEXEC_FILE_NO_INITRAMFS = 0x4
|
||||||
KEXEC_FILE_ON_CRASH = 0x2
|
KEXEC_FILE_ON_CRASH = 0x2
|
||||||
KEXEC_FILE_UNLOAD = 0x1
|
KEXEC_FILE_UNLOAD = 0x1
|
||||||
@@ -1771,6 +1780,7 @@ const (
|
|||||||
KEY_SPEC_USER_KEYRING = -0x4
|
KEY_SPEC_USER_KEYRING = -0x4
|
||||||
KEY_SPEC_USER_SESSION_KEYRING = -0x5
|
KEY_SPEC_USER_SESSION_KEYRING = -0x5
|
||||||
LANDLOCK_ACCESS_FS_EXECUTE = 0x1
|
LANDLOCK_ACCESS_FS_EXECUTE = 0x1
|
||||||
|
LANDLOCK_ACCESS_FS_IOCTL_DEV = 0x8000
|
||||||
LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800
|
LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800
|
||||||
LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40
|
LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40
|
||||||
LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80
|
LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80
|
||||||
@@ -1852,6 +1862,19 @@ const (
|
|||||||
MAP_FILE = 0x0
|
MAP_FILE = 0x0
|
||||||
MAP_FIXED = 0x10
|
MAP_FIXED = 0x10
|
||||||
MAP_FIXED_NOREPLACE = 0x100000
|
MAP_FIXED_NOREPLACE = 0x100000
|
||||||
|
MAP_HUGE_16GB = 0x88000000
|
||||||
|
MAP_HUGE_16KB = 0x38000000
|
||||||
|
MAP_HUGE_16MB = 0x60000000
|
||||||
|
MAP_HUGE_1GB = 0x78000000
|
||||||
|
MAP_HUGE_1MB = 0x50000000
|
||||||
|
MAP_HUGE_256MB = 0x70000000
|
||||||
|
MAP_HUGE_2GB = 0x7c000000
|
||||||
|
MAP_HUGE_2MB = 0x54000000
|
||||||
|
MAP_HUGE_32MB = 0x64000000
|
||||||
|
MAP_HUGE_512KB = 0x4c000000
|
||||||
|
MAP_HUGE_512MB = 0x74000000
|
||||||
|
MAP_HUGE_64KB = 0x40000000
|
||||||
|
MAP_HUGE_8MB = 0x5c000000
|
||||||
MAP_HUGE_MASK = 0x3f
|
MAP_HUGE_MASK = 0x3f
|
||||||
MAP_HUGE_SHIFT = 0x1a
|
MAP_HUGE_SHIFT = 0x1a
|
||||||
MAP_PRIVATE = 0x2
|
MAP_PRIVATE = 0x2
|
||||||
@@ -1898,6 +1921,7 @@ const (
|
|||||||
MNT_DETACH = 0x2
|
MNT_DETACH = 0x2
|
||||||
MNT_EXPIRE = 0x4
|
MNT_EXPIRE = 0x4
|
||||||
MNT_FORCE = 0x1
|
MNT_FORCE = 0x1
|
||||||
|
MNT_ID_REQ_SIZE_VER0 = 0x18
|
||||||
MODULE_INIT_COMPRESSED_FILE = 0x4
|
MODULE_INIT_COMPRESSED_FILE = 0x4
|
||||||
MODULE_INIT_IGNORE_MODVERSIONS = 0x1
|
MODULE_INIT_IGNORE_MODVERSIONS = 0x1
|
||||||
MODULE_INIT_IGNORE_VERMAGIC = 0x2
|
MODULE_INIT_IGNORE_VERMAGIC = 0x2
|
||||||
@@ -2166,7 +2190,7 @@ const (
|
|||||||
NFT_SECMARK_CTX_MAXLEN = 0x100
|
NFT_SECMARK_CTX_MAXLEN = 0x100
|
||||||
NFT_SET_MAXNAMELEN = 0x100
|
NFT_SET_MAXNAMELEN = 0x100
|
||||||
NFT_SOCKET_MAX = 0x3
|
NFT_SOCKET_MAX = 0x3
|
||||||
NFT_TABLE_F_MASK = 0x3
|
NFT_TABLE_F_MASK = 0x7
|
||||||
NFT_TABLE_MAXNAMELEN = 0x100
|
NFT_TABLE_MAXNAMELEN = 0x100
|
||||||
NFT_TRACETYPE_MAX = 0x3
|
NFT_TRACETYPE_MAX = 0x3
|
||||||
NFT_TUNNEL_F_MASK = 0x7
|
NFT_TUNNEL_F_MASK = 0x7
|
||||||
@@ -2302,6 +2326,7 @@ const (
|
|||||||
PERF_AUX_FLAG_PARTIAL = 0x4
|
PERF_AUX_FLAG_PARTIAL = 0x4
|
||||||
PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK = 0xff00
|
PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK = 0xff00
|
||||||
PERF_AUX_FLAG_TRUNCATED = 0x1
|
PERF_AUX_FLAG_TRUNCATED = 0x1
|
||||||
|
PERF_BRANCH_ENTRY_INFO_BITS_MAX = 0x21
|
||||||
PERF_BR_ARM64_DEBUG_DATA = 0x7
|
PERF_BR_ARM64_DEBUG_DATA = 0x7
|
||||||
PERF_BR_ARM64_DEBUG_EXIT = 0x5
|
PERF_BR_ARM64_DEBUG_EXIT = 0x5
|
||||||
PERF_BR_ARM64_DEBUG_HALT = 0x4
|
PERF_BR_ARM64_DEBUG_HALT = 0x4
|
||||||
@@ -2399,6 +2424,7 @@ const (
|
|||||||
PERF_RECORD_MISC_USER = 0x2
|
PERF_RECORD_MISC_USER = 0x2
|
||||||
PERF_SAMPLE_BRANCH_PLM_ALL = 0x7
|
PERF_SAMPLE_BRANCH_PLM_ALL = 0x7
|
||||||
PERF_SAMPLE_WEIGHT_TYPE = 0x1004000
|
PERF_SAMPLE_WEIGHT_TYPE = 0x1004000
|
||||||
|
PID_FS_MAGIC = 0x50494446
|
||||||
PIPEFS_MAGIC = 0x50495045
|
PIPEFS_MAGIC = 0x50495045
|
||||||
PPPIOCGNPMODE = 0xc008744c
|
PPPIOCGNPMODE = 0xc008744c
|
||||||
PPPIOCNEWUNIT = 0xc004743e
|
PPPIOCNEWUNIT = 0xc004743e
|
||||||
@@ -2486,6 +2512,23 @@ const (
|
|||||||
PR_PAC_GET_ENABLED_KEYS = 0x3d
|
PR_PAC_GET_ENABLED_KEYS = 0x3d
|
||||||
PR_PAC_RESET_KEYS = 0x36
|
PR_PAC_RESET_KEYS = 0x36
|
||||||
PR_PAC_SET_ENABLED_KEYS = 0x3c
|
PR_PAC_SET_ENABLED_KEYS = 0x3c
|
||||||
|
PR_PPC_DEXCR_CTRL_CLEAR = 0x4
|
||||||
|
PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC = 0x10
|
||||||
|
PR_PPC_DEXCR_CTRL_EDITABLE = 0x1
|
||||||
|
PR_PPC_DEXCR_CTRL_MASK = 0x1f
|
||||||
|
PR_PPC_DEXCR_CTRL_SET = 0x2
|
||||||
|
PR_PPC_DEXCR_CTRL_SET_ONEXEC = 0x8
|
||||||
|
PR_PPC_DEXCR_IBRTPD = 0x1
|
||||||
|
PR_PPC_DEXCR_NPHIE = 0x3
|
||||||
|
PR_PPC_DEXCR_SBHE = 0x0
|
||||||
|
PR_PPC_DEXCR_SRAPD = 0x2
|
||||||
|
PR_PPC_GET_DEXCR = 0x48
|
||||||
|
PR_PPC_SET_DEXCR = 0x49
|
||||||
|
PR_RISCV_CTX_SW_FENCEI_OFF = 0x1
|
||||||
|
PR_RISCV_CTX_SW_FENCEI_ON = 0x0
|
||||||
|
PR_RISCV_SCOPE_PER_PROCESS = 0x0
|
||||||
|
PR_RISCV_SCOPE_PER_THREAD = 0x1
|
||||||
|
PR_RISCV_SET_ICACHE_FLUSH_CTX = 0x47
|
||||||
PR_RISCV_V_GET_CONTROL = 0x46
|
PR_RISCV_V_GET_CONTROL = 0x46
|
||||||
PR_RISCV_V_SET_CONTROL = 0x45
|
PR_RISCV_V_SET_CONTROL = 0x45
|
||||||
PR_RISCV_V_VSTATE_CTRL_CUR_MASK = 0x3
|
PR_RISCV_V_VSTATE_CTRL_CUR_MASK = 0x3
|
||||||
@@ -2892,8 +2935,9 @@ const (
|
|||||||
RWF_APPEND = 0x10
|
RWF_APPEND = 0x10
|
||||||
RWF_DSYNC = 0x2
|
RWF_DSYNC = 0x2
|
||||||
RWF_HIPRI = 0x1
|
RWF_HIPRI = 0x1
|
||||||
|
RWF_NOAPPEND = 0x20
|
||||||
RWF_NOWAIT = 0x8
|
RWF_NOWAIT = 0x8
|
||||||
RWF_SUPPORTED = 0x1f
|
RWF_SUPPORTED = 0x3f
|
||||||
RWF_SYNC = 0x4
|
RWF_SYNC = 0x4
|
||||||
RWF_WRITE_LIFE_NOT_SET = 0x0
|
RWF_WRITE_LIFE_NOT_SET = 0x0
|
||||||
SCHED_BATCH = 0x3
|
SCHED_BATCH = 0x3
|
||||||
@@ -2914,7 +2958,9 @@ const (
|
|||||||
SCHED_RESET_ON_FORK = 0x40000000
|
SCHED_RESET_ON_FORK = 0x40000000
|
||||||
SCHED_RR = 0x2
|
SCHED_RR = 0x2
|
||||||
SCM_CREDENTIALS = 0x2
|
SCM_CREDENTIALS = 0x2
|
||||||
|
SCM_PIDFD = 0x4
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
|
SCM_SECURITY = 0x3
|
||||||
SCM_TIMESTAMP = 0x1d
|
SCM_TIMESTAMP = 0x1d
|
||||||
SC_LOG_FLUSH = 0x100000
|
SC_LOG_FLUSH = 0x100000
|
||||||
SECCOMP_ADDFD_FLAG_SEND = 0x2
|
SECCOMP_ADDFD_FLAG_SEND = 0x2
|
||||||
@@ -3047,6 +3093,8 @@ const (
|
|||||||
SIOCSMIIREG = 0x8949
|
SIOCSMIIREG = 0x8949
|
||||||
SIOCSRARP = 0x8962
|
SIOCSRARP = 0x8962
|
||||||
SIOCWANDEV = 0x894a
|
SIOCWANDEV = 0x894a
|
||||||
|
SK_DIAG_BPF_STORAGE_MAX = 0x3
|
||||||
|
SK_DIAG_BPF_STORAGE_REQ_MAX = 0x1
|
||||||
SMACK_MAGIC = 0x43415d53
|
SMACK_MAGIC = 0x43415d53
|
||||||
SMART_AUTOSAVE = 0xd2
|
SMART_AUTOSAVE = 0xd2
|
||||||
SMART_AUTO_OFFLINE = 0xdb
|
SMART_AUTO_OFFLINE = 0xdb
|
||||||
@@ -3067,6 +3115,8 @@ const (
|
|||||||
SOCKFS_MAGIC = 0x534f434b
|
SOCKFS_MAGIC = 0x534f434b
|
||||||
SOCK_BUF_LOCK_MASK = 0x3
|
SOCK_BUF_LOCK_MASK = 0x3
|
||||||
SOCK_DCCP = 0x6
|
SOCK_DCCP = 0x6
|
||||||
|
SOCK_DESTROY = 0x15
|
||||||
|
SOCK_DIAG_BY_FAMILY = 0x14
|
||||||
SOCK_IOC_TYPE = 0x89
|
SOCK_IOC_TYPE = 0x89
|
||||||
SOCK_PACKET = 0xa
|
SOCK_PACKET = 0xa
|
||||||
SOCK_RAW = 0x3
|
SOCK_RAW = 0x3
|
||||||
@@ -3168,10 +3218,12 @@ const (
|
|||||||
STATX_GID = 0x10
|
STATX_GID = 0x10
|
||||||
STATX_INO = 0x100
|
STATX_INO = 0x100
|
||||||
STATX_MNT_ID = 0x1000
|
STATX_MNT_ID = 0x1000
|
||||||
|
STATX_MNT_ID_UNIQUE = 0x4000
|
||||||
STATX_MODE = 0x2
|
STATX_MODE = 0x2
|
||||||
STATX_MTIME = 0x40
|
STATX_MTIME = 0x40
|
||||||
STATX_NLINK = 0x4
|
STATX_NLINK = 0x4
|
||||||
STATX_SIZE = 0x200
|
STATX_SIZE = 0x200
|
||||||
|
STATX_SUBVOL = 0x8000
|
||||||
STATX_TYPE = 0x1
|
STATX_TYPE = 0x1
|
||||||
STATX_UID = 0x8
|
STATX_UID = 0x8
|
||||||
STATX__RESERVED = 0x80000000
|
STATX__RESERVED = 0x80000000
|
||||||
@@ -3255,6 +3307,7 @@ const (
|
|||||||
TCP_MAX_WINSHIFT = 0xe
|
TCP_MAX_WINSHIFT = 0xe
|
||||||
TCP_MD5SIG = 0xe
|
TCP_MD5SIG = 0xe
|
||||||
TCP_MD5SIG_EXT = 0x20
|
TCP_MD5SIG_EXT = 0x20
|
||||||
|
TCP_MD5SIG_FLAG_IFINDEX = 0x2
|
||||||
TCP_MD5SIG_FLAG_PREFIX = 0x1
|
TCP_MD5SIG_FLAG_PREFIX = 0x1
|
||||||
TCP_MD5SIG_MAXKEYLEN = 0x50
|
TCP_MD5SIG_MAXKEYLEN = 0x50
|
||||||
TCP_MSS = 0x200
|
TCP_MSS = 0x200
|
||||||
@@ -3562,12 +3615,16 @@ const (
|
|||||||
XDP_RX_RING = 0x2
|
XDP_RX_RING = 0x2
|
||||||
XDP_SHARED_UMEM = 0x1
|
XDP_SHARED_UMEM = 0x1
|
||||||
XDP_STATISTICS = 0x7
|
XDP_STATISTICS = 0x7
|
||||||
|
XDP_TXMD_FLAGS_CHECKSUM = 0x2
|
||||||
|
XDP_TXMD_FLAGS_TIMESTAMP = 0x1
|
||||||
|
XDP_TX_METADATA = 0x2
|
||||||
XDP_TX_RING = 0x3
|
XDP_TX_RING = 0x3
|
||||||
XDP_UMEM_COMPLETION_RING = 0x6
|
XDP_UMEM_COMPLETION_RING = 0x6
|
||||||
XDP_UMEM_FILL_RING = 0x5
|
XDP_UMEM_FILL_RING = 0x5
|
||||||
XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
|
XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
|
||||||
XDP_UMEM_PGOFF_FILL_RING = 0x100000000
|
XDP_UMEM_PGOFF_FILL_RING = 0x100000000
|
||||||
XDP_UMEM_REG = 0x4
|
XDP_UMEM_REG = 0x4
|
||||||
|
XDP_UMEM_TX_SW_CSUM = 0x2
|
||||||
XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
|
XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
|
||||||
XDP_USE_NEED_WAKEUP = 0x8
|
XDP_USE_NEED_WAKEUP = 0x8
|
||||||
XDP_USE_SG = 0x10
|
XDP_USE_SG = 0x10
|
||||||
|
|||||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
@@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
@@ -118,6 +120,7 @@ const (
|
|||||||
IXOFF = 0x1000
|
IXOFF = 0x1000
|
||||||
IXON = 0x400
|
IXON = 0x400
|
||||||
MAP_32BIT = 0x40
|
MAP_32BIT = 0x40
|
||||||
|
MAP_ABOVE4G = 0x80
|
||||||
MAP_ANON = 0x20
|
MAP_ANON = 0x20
|
||||||
MAP_ANONYMOUS = 0x20
|
MAP_ANONYMOUS = 0x20
|
||||||
MAP_DENYWRITE = 0x800
|
MAP_DENYWRITE = 0x800
|
||||||
|
|||||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
@@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
@@ -118,6 +120,7 @@ const (
|
|||||||
IXOFF = 0x1000
|
IXOFF = 0x1000
|
||||||
IXON = 0x400
|
IXON = 0x400
|
||||||
MAP_32BIT = 0x40
|
MAP_32BIT = 0x40
|
||||||
|
MAP_ABOVE4G = 0x80
|
||||||
MAP_ANON = 0x20
|
MAP_ANON = 0x20
|
||||||
MAP_ANONYMOUS = 0x20
|
MAP_ANONYMOUS = 0x20
|
||||||
MAP_DENYWRITE = 0x800
|
MAP_DENYWRITE = 0x800
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
@@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|||||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
@@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
ESR_MAGIC = 0x45535201
|
ESR_MAGIC = 0x45535201
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
@@ -87,6 +89,7 @@ const (
|
|||||||
FICLONE = 0x40049409
|
FICLONE = 0x40049409
|
||||||
FICLONERANGE = 0x4020940d
|
FICLONERANGE = 0x4020940d
|
||||||
FLUSHO = 0x1000
|
FLUSHO = 0x1000
|
||||||
|
FPMR_MAGIC = 0x46504d52
|
||||||
FPSIMD_MAGIC = 0x46508001
|
FPSIMD_MAGIC = 0x46508001
|
||||||
FS_IOC_ENABLE_VERITY = 0x40806685
|
FS_IOC_ENABLE_VERITY = 0x40806685
|
||||||
FS_IOC_GETFLAGS = 0x80086601
|
FS_IOC_GETFLAGS = 0x80086601
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
generated
vendored
@@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
@@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x80
|
EFD_NONBLOCK = 0x80
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
@@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x80
|
EFD_NONBLOCK = 0x80
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
@@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x80
|
EFD_NONBLOCK = 0x80
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
@@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x80
|
EFD_NONBLOCK = 0x80
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
generated
vendored
@@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x20
|
ECHOPRT = 0x20
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000000
|
EXTPROC = 0x10000000
|
||||||
FF1 = 0x4000
|
FF1 = 0x4000
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
@@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x20
|
ECHOPRT = 0x20
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000000
|
EXTPROC = 0x10000000
|
||||||
FF1 = 0x4000
|
FF1 = 0x4000
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
@@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x20
|
ECHOPRT = 0x20
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000000
|
EXTPROC = 0x10000000
|
||||||
FF1 = 0x4000
|
FF1 = 0x4000
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
generated
vendored
@@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
@@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
@@ -82,6 +82,8 @@ const (
|
|||||||
EFD_CLOEXEC = 0x400000
|
EFD_CLOEXEC = 0x400000
|
||||||
EFD_NONBLOCK = 0x4000
|
EFD_NONBLOCK = 0x4000
|
||||||
EMT_TAGOVF = 0x1
|
EMT_TAGOVF = 0x1
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x400000
|
EPOLL_CLOEXEC = 0x400000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|||||||
235
vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go
generated
vendored
235
vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go
generated
vendored
@@ -10,41 +10,99 @@
|
|||||||
package unix
|
package unix
|
||||||
|
|
||||||
const (
|
const (
|
||||||
BRKINT = 0x0001
|
BRKINT = 0x0001
|
||||||
CLOCK_MONOTONIC = 0x1
|
CLOCAL = 0x1
|
||||||
CLOCK_PROCESS_CPUTIME_ID = 0x2
|
CLOCK_MONOTONIC = 0x1
|
||||||
CLOCK_REALTIME = 0x0
|
CLOCK_PROCESS_CPUTIME_ID = 0x2
|
||||||
CLOCK_THREAD_CPUTIME_ID = 0x3
|
CLOCK_REALTIME = 0x0
|
||||||
CS8 = 0x0030
|
CLOCK_THREAD_CPUTIME_ID = 0x3
|
||||||
CSIZE = 0x0030
|
CLONE_NEWIPC = 0x08000000
|
||||||
ECHO = 0x00000008
|
CLONE_NEWNET = 0x40000000
|
||||||
ECHONL = 0x00000001
|
CLONE_NEWNS = 0x00020000
|
||||||
FD_CLOEXEC = 0x01
|
CLONE_NEWPID = 0x20000000
|
||||||
FD_CLOFORK = 0x02
|
CLONE_NEWUTS = 0x04000000
|
||||||
FNDELAY = 0x04
|
CLONE_PARENT = 0x00008000
|
||||||
F_CLOSFD = 9
|
CS8 = 0x0030
|
||||||
F_CONTROL_CVT = 13
|
CSIZE = 0x0030
|
||||||
F_DUPFD = 0
|
ECHO = 0x00000008
|
||||||
F_DUPFD2 = 8
|
ECHONL = 0x00000001
|
||||||
F_GETFD = 1
|
EFD_SEMAPHORE = 0x00002000
|
||||||
F_GETFL = 259
|
EFD_CLOEXEC = 0x00001000
|
||||||
F_GETLK = 5
|
EFD_NONBLOCK = 0x00000004
|
||||||
F_GETOWN = 10
|
EPOLL_CLOEXEC = 0x00001000
|
||||||
F_OK = 0x0
|
EPOLL_CTL_ADD = 0
|
||||||
F_RDLCK = 1
|
EPOLL_CTL_MOD = 1
|
||||||
F_SETFD = 2
|
EPOLL_CTL_DEL = 2
|
||||||
F_SETFL = 4
|
EPOLLRDNORM = 0x0001
|
||||||
F_SETLK = 6
|
EPOLLRDBAND = 0x0002
|
||||||
F_SETLKW = 7
|
EPOLLIN = 0x0003
|
||||||
F_SETOWN = 11
|
EPOLLOUT = 0x0004
|
||||||
F_SETTAG = 12
|
EPOLLWRBAND = 0x0008
|
||||||
F_UNLCK = 3
|
EPOLLPRI = 0x0010
|
||||||
F_WRLCK = 2
|
EPOLLERR = 0x0020
|
||||||
FSTYPE_ZFS = 0xe9 //"Z"
|
EPOLLHUP = 0x0040
|
||||||
FSTYPE_HFS = 0xc8 //"H"
|
EPOLLEXCLUSIVE = 0x20000000
|
||||||
FSTYPE_NFS = 0xd5 //"N"
|
EPOLLONESHOT = 0x40000000
|
||||||
FSTYPE_TFS = 0xe3 //"T"
|
FD_CLOEXEC = 0x01
|
||||||
FSTYPE_AUTOMOUNT = 0xc1 //"A"
|
FD_CLOFORK = 0x02
|
||||||
|
FD_SETSIZE = 0x800
|
||||||
|
FNDELAY = 0x04
|
||||||
|
F_CLOSFD = 9
|
||||||
|
F_CONTROL_CVT = 13
|
||||||
|
F_DUPFD = 0
|
||||||
|
F_DUPFD2 = 8
|
||||||
|
F_GETFD = 1
|
||||||
|
F_GETFL = 259
|
||||||
|
F_GETLK = 5
|
||||||
|
F_GETOWN = 10
|
||||||
|
F_OK = 0x0
|
||||||
|
F_RDLCK = 1
|
||||||
|
F_SETFD = 2
|
||||||
|
F_SETFL = 4
|
||||||
|
F_SETLK = 6
|
||||||
|
F_SETLKW = 7
|
||||||
|
F_SETOWN = 11
|
||||||
|
F_SETTAG = 12
|
||||||
|
F_UNLCK = 3
|
||||||
|
F_WRLCK = 2
|
||||||
|
FSTYPE_ZFS = 0xe9 //"Z"
|
||||||
|
FSTYPE_HFS = 0xc8 //"H"
|
||||||
|
FSTYPE_NFS = 0xd5 //"N"
|
||||||
|
FSTYPE_TFS = 0xe3 //"T"
|
||||||
|
FSTYPE_AUTOMOUNT = 0xc1 //"A"
|
||||||
|
GRND_NONBLOCK = 1
|
||||||
|
GRND_RANDOM = 2
|
||||||
|
HUPCL = 0x0100 // Hang up on last close
|
||||||
|
IN_CLOEXEC = 0x00001000
|
||||||
|
IN_NONBLOCK = 0x00000004
|
||||||
|
IN_ACCESS = 0x00000001
|
||||||
|
IN_MODIFY = 0x00000002
|
||||||
|
IN_ATTRIB = 0x00000004
|
||||||
|
IN_CLOSE_WRITE = 0x00000008
|
||||||
|
IN_CLOSE_NOWRITE = 0x00000010
|
||||||
|
IN_OPEN = 0x00000020
|
||||||
|
IN_MOVED_FROM = 0x00000040
|
||||||
|
IN_MOVED_TO = 0x00000080
|
||||||
|
IN_CREATE = 0x00000100
|
||||||
|
IN_DELETE = 0x00000200
|
||||||
|
IN_DELETE_SELF = 0x00000400
|
||||||
|
IN_MOVE_SELF = 0x00000800
|
||||||
|
IN_UNMOUNT = 0x00002000
|
||||||
|
IN_Q_OVERFLOW = 0x00004000
|
||||||
|
IN_IGNORED = 0x00008000
|
||||||
|
IN_CLOSE = (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE)
|
||||||
|
IN_MOVE = (IN_MOVED_FROM | IN_MOVED_TO)
|
||||||
|
IN_ALL_EVENTS = (IN_ACCESS | IN_MODIFY | IN_ATTRIB |
|
||||||
|
IN_CLOSE | IN_OPEN | IN_MOVE |
|
||||||
|
IN_CREATE | IN_DELETE | IN_DELETE_SELF |
|
||||||
|
IN_MOVE_SELF)
|
||||||
|
IN_ONLYDIR = 0x01000000
|
||||||
|
IN_DONT_FOLLOW = 0x02000000
|
||||||
|
IN_EXCL_UNLINK = 0x04000000
|
||||||
|
IN_MASK_CREATE = 0x10000000
|
||||||
|
IN_MASK_ADD = 0x20000000
|
||||||
|
IN_ISDIR = 0x40000000
|
||||||
|
IN_ONESHOT = 0x80000000
|
||||||
IP6F_MORE_FRAG = 0x0001
|
IP6F_MORE_FRAG = 0x0001
|
||||||
IP6F_OFF_MASK = 0xfff8
|
IP6F_OFF_MASK = 0xfff8
|
||||||
IP6F_RESERVED_MASK = 0x0006
|
IP6F_RESERVED_MASK = 0x0006
|
||||||
@@ -152,10 +210,18 @@ const (
|
|||||||
IP_PKTINFO = 101
|
IP_PKTINFO = 101
|
||||||
IP_RECVPKTINFO = 102
|
IP_RECVPKTINFO = 102
|
||||||
IP_TOS = 2
|
IP_TOS = 2
|
||||||
IP_TTL = 3
|
IP_TTL = 14
|
||||||
IP_UNBLOCK_SOURCE = 11
|
IP_UNBLOCK_SOURCE = 11
|
||||||
|
ICMP6_FILTER = 1
|
||||||
|
MCAST_INCLUDE = 0
|
||||||
|
MCAST_EXCLUDE = 1
|
||||||
|
MCAST_JOIN_GROUP = 40
|
||||||
|
MCAST_LEAVE_GROUP = 41
|
||||||
|
MCAST_JOIN_SOURCE_GROUP = 42
|
||||||
|
MCAST_LEAVE_SOURCE_GROUP = 43
|
||||||
|
MCAST_BLOCK_SOURCE = 44
|
||||||
|
MCAST_UNBLOCK_SOURCE = 46
|
||||||
ICANON = 0x0010
|
ICANON = 0x0010
|
||||||
ICMP6_FILTER = 0x26
|
|
||||||
ICRNL = 0x0002
|
ICRNL = 0x0002
|
||||||
IEXTEN = 0x0020
|
IEXTEN = 0x0020
|
||||||
IGNBRK = 0x0004
|
IGNBRK = 0x0004
|
||||||
@@ -165,10 +231,10 @@ const (
|
|||||||
ISTRIP = 0x0080
|
ISTRIP = 0x0080
|
||||||
IXON = 0x0200
|
IXON = 0x0200
|
||||||
IXOFF = 0x0100
|
IXOFF = 0x0100
|
||||||
LOCK_SH = 0x1 // Not exist on zOS
|
LOCK_SH = 0x1
|
||||||
LOCK_EX = 0x2 // Not exist on zOS
|
LOCK_EX = 0x2
|
||||||
LOCK_NB = 0x4 // Not exist on zOS
|
LOCK_NB = 0x4
|
||||||
LOCK_UN = 0x8 // Not exist on zOS
|
LOCK_UN = 0x8
|
||||||
POLLIN = 0x0003
|
POLLIN = 0x0003
|
||||||
POLLOUT = 0x0004
|
POLLOUT = 0x0004
|
||||||
POLLPRI = 0x0010
|
POLLPRI = 0x0010
|
||||||
@@ -182,15 +248,29 @@ const (
|
|||||||
MAP_PRIVATE = 0x1 // changes are private
|
MAP_PRIVATE = 0x1 // changes are private
|
||||||
MAP_SHARED = 0x2 // changes are shared
|
MAP_SHARED = 0x2 // changes are shared
|
||||||
MAP_FIXED = 0x4 // place exactly
|
MAP_FIXED = 0x4 // place exactly
|
||||||
MCAST_JOIN_GROUP = 40
|
__MAP_MEGA = 0x8
|
||||||
MCAST_LEAVE_GROUP = 41
|
__MAP_64 = 0x10
|
||||||
MCAST_JOIN_SOURCE_GROUP = 42
|
MAP_ANON = 0x20
|
||||||
MCAST_LEAVE_SOURCE_GROUP = 43
|
MAP_ANONYMOUS = 0x20
|
||||||
MCAST_BLOCK_SOURCE = 44
|
|
||||||
MCAST_UNBLOCK_SOURCE = 45
|
|
||||||
MS_SYNC = 0x1 // msync - synchronous writes
|
MS_SYNC = 0x1 // msync - synchronous writes
|
||||||
MS_ASYNC = 0x2 // asynchronous writes
|
MS_ASYNC = 0x2 // asynchronous writes
|
||||||
MS_INVALIDATE = 0x4 // invalidate mappings
|
MS_INVALIDATE = 0x4 // invalidate mappings
|
||||||
|
MS_BIND = 0x00001000
|
||||||
|
MS_MOVE = 0x00002000
|
||||||
|
MS_NOSUID = 0x00000002
|
||||||
|
MS_PRIVATE = 0x00040000
|
||||||
|
MS_REC = 0x00004000
|
||||||
|
MS_REMOUNT = 0x00008000
|
||||||
|
MS_RDONLY = 0x00000001
|
||||||
|
MS_UNBINDABLE = 0x00020000
|
||||||
|
MNT_DETACH = 0x00000004
|
||||||
|
ZOSDSFS_SUPER_MAGIC = 0x44534653 // zOS DSFS
|
||||||
|
NFS_SUPER_MAGIC = 0x6969 // NFS
|
||||||
|
NSFS_MAGIC = 0x6e736673 // PROCNS
|
||||||
|
PROC_SUPER_MAGIC = 0x9fa0 // proc FS
|
||||||
|
ZOSTFS_SUPER_MAGIC = 0x544653 // zOS TFS
|
||||||
|
ZOSUFS_SUPER_MAGIC = 0x554653 // zOS UFS
|
||||||
|
ZOSZFS_SUPER_MAGIC = 0x5A4653 // zOS ZFS
|
||||||
MTM_RDONLY = 0x80000000
|
MTM_RDONLY = 0x80000000
|
||||||
MTM_RDWR = 0x40000000
|
MTM_RDWR = 0x40000000
|
||||||
MTM_UMOUNT = 0x10000000
|
MTM_UMOUNT = 0x10000000
|
||||||
@@ -205,13 +285,20 @@ const (
|
|||||||
MTM_REMOUNT = 0x00000100
|
MTM_REMOUNT = 0x00000100
|
||||||
MTM_NOSECURITY = 0x00000080
|
MTM_NOSECURITY = 0x00000080
|
||||||
NFDBITS = 0x20
|
NFDBITS = 0x20
|
||||||
|
ONLRET = 0x0020 // NL performs CR function
|
||||||
O_ACCMODE = 0x03
|
O_ACCMODE = 0x03
|
||||||
O_APPEND = 0x08
|
O_APPEND = 0x08
|
||||||
O_ASYNCSIG = 0x0200
|
O_ASYNCSIG = 0x0200
|
||||||
O_CREAT = 0x80
|
O_CREAT = 0x80
|
||||||
|
O_DIRECT = 0x00002000
|
||||||
|
O_NOFOLLOW = 0x00004000
|
||||||
|
O_DIRECTORY = 0x00008000
|
||||||
|
O_PATH = 0x00080000
|
||||||
|
O_CLOEXEC = 0x00001000
|
||||||
O_EXCL = 0x40
|
O_EXCL = 0x40
|
||||||
O_GETFL = 0x0F
|
O_GETFL = 0x0F
|
||||||
O_LARGEFILE = 0x0400
|
O_LARGEFILE = 0x0400
|
||||||
|
O_NDELAY = 0x4
|
||||||
O_NONBLOCK = 0x04
|
O_NONBLOCK = 0x04
|
||||||
O_RDONLY = 0x02
|
O_RDONLY = 0x02
|
||||||
O_RDWR = 0x03
|
O_RDWR = 0x03
|
||||||
@@ -248,6 +335,7 @@ const (
|
|||||||
AF_IUCV = 17
|
AF_IUCV = 17
|
||||||
AF_LAT = 14
|
AF_LAT = 14
|
||||||
AF_LINK = 18
|
AF_LINK = 18
|
||||||
|
AF_LOCAL = AF_UNIX // AF_LOCAL is an alias for AF_UNIX
|
||||||
AF_MAX = 30
|
AF_MAX = 30
|
||||||
AF_NBS = 7
|
AF_NBS = 7
|
||||||
AF_NDD = 23
|
AF_NDD = 23
|
||||||
@@ -285,15 +373,33 @@ const (
|
|||||||
RLIMIT_AS = 5
|
RLIMIT_AS = 5
|
||||||
RLIMIT_NOFILE = 6
|
RLIMIT_NOFILE = 6
|
||||||
RLIMIT_MEMLIMIT = 7
|
RLIMIT_MEMLIMIT = 7
|
||||||
|
RLIMIT_MEMLOCK = 0x8
|
||||||
RLIM_INFINITY = 2147483647
|
RLIM_INFINITY = 2147483647
|
||||||
|
SCHED_FIFO = 0x2
|
||||||
|
SCM_CREDENTIALS = 0x2
|
||||||
SCM_RIGHTS = 0x01
|
SCM_RIGHTS = 0x01
|
||||||
SF_CLOSE = 0x00000002
|
SF_CLOSE = 0x00000002
|
||||||
SF_REUSE = 0x00000001
|
SF_REUSE = 0x00000001
|
||||||
|
SHM_RND = 0x2
|
||||||
|
SHM_RDONLY = 0x1
|
||||||
|
SHMLBA = 0x1000
|
||||||
|
IPC_STAT = 0x3
|
||||||
|
IPC_SET = 0x2
|
||||||
|
IPC_RMID = 0x1
|
||||||
|
IPC_PRIVATE = 0x0
|
||||||
|
IPC_CREAT = 0x1000000
|
||||||
|
__IPC_MEGA = 0x4000000
|
||||||
|
__IPC_SHAREAS = 0x20000000
|
||||||
|
__IPC_BELOWBAR = 0x10000000
|
||||||
|
IPC_EXCL = 0x2000000
|
||||||
|
__IPC_GIGA = 0x8000000
|
||||||
SHUT_RD = 0
|
SHUT_RD = 0
|
||||||
SHUT_RDWR = 2
|
SHUT_RDWR = 2
|
||||||
SHUT_WR = 1
|
SHUT_WR = 1
|
||||||
|
SOCK_CLOEXEC = 0x00001000
|
||||||
SOCK_CONN_DGRAM = 6
|
SOCK_CONN_DGRAM = 6
|
||||||
SOCK_DGRAM = 2
|
SOCK_DGRAM = 2
|
||||||
|
SOCK_NONBLOCK = 0x800
|
||||||
SOCK_RAW = 3
|
SOCK_RAW = 3
|
||||||
SOCK_RDM = 4
|
SOCK_RDM = 4
|
||||||
SOCK_SEQPACKET = 5
|
SOCK_SEQPACKET = 5
|
||||||
@@ -378,8 +484,6 @@ const (
|
|||||||
S_IFMST = 0x00FF0000
|
S_IFMST = 0x00FF0000
|
||||||
TCP_KEEPALIVE = 0x8
|
TCP_KEEPALIVE = 0x8
|
||||||
TCP_NODELAY = 0x1
|
TCP_NODELAY = 0x1
|
||||||
TCP_INFO = 0xb
|
|
||||||
TCP_USER_TIMEOUT = 0x1
|
|
||||||
TIOCGWINSZ = 0x4008a368
|
TIOCGWINSZ = 0x4008a368
|
||||||
TIOCSWINSZ = 0x8008a367
|
TIOCSWINSZ = 0x8008a367
|
||||||
TIOCSBRK = 0x2000a77b
|
TIOCSBRK = 0x2000a77b
|
||||||
@@ -427,7 +531,10 @@ const (
|
|||||||
VSUSP = 9
|
VSUSP = 9
|
||||||
VTIME = 10
|
VTIME = 10
|
||||||
WCONTINUED = 0x4
|
WCONTINUED = 0x4
|
||||||
|
WEXITED = 0x8
|
||||||
WNOHANG = 0x1
|
WNOHANG = 0x1
|
||||||
|
WNOWAIT = 0x20
|
||||||
|
WSTOPPED = 0x10
|
||||||
WUNTRACED = 0x2
|
WUNTRACED = 0x2
|
||||||
_BPX_SWAP = 1
|
_BPX_SWAP = 1
|
||||||
_BPX_NONSWAP = 2
|
_BPX_NONSWAP = 2
|
||||||
@@ -452,8 +559,30 @@ const (
|
|||||||
MADV_FREE = 15 // for Linux compatibility -- no zos semantics
|
MADV_FREE = 15 // for Linux compatibility -- no zos semantics
|
||||||
MADV_WIPEONFORK = 16 // for Linux compatibility -- no zos semantics
|
MADV_WIPEONFORK = 16 // for Linux compatibility -- no zos semantics
|
||||||
MADV_KEEPONFORK = 17 // for Linux compatibility -- no zos semantics
|
MADV_KEEPONFORK = 17 // for Linux compatibility -- no zos semantics
|
||||||
AT_SYMLINK_NOFOLLOW = 1 // for Unix compatibility -- no zos semantics
|
AT_SYMLINK_FOLLOW = 0x400
|
||||||
AT_FDCWD = 2 // for Unix compatibility -- no zos semantics
|
AT_SYMLINK_NOFOLLOW = 0x100
|
||||||
|
XATTR_CREATE = 0x1
|
||||||
|
XATTR_REPLACE = 0x2
|
||||||
|
P_PID = 0
|
||||||
|
P_PGID = 1
|
||||||
|
P_ALL = 2
|
||||||
|
PR_SET_NAME = 15
|
||||||
|
PR_GET_NAME = 16
|
||||||
|
PR_SET_NO_NEW_PRIVS = 38
|
||||||
|
PR_GET_NO_NEW_PRIVS = 39
|
||||||
|
PR_SET_DUMPABLE = 4
|
||||||
|
PR_GET_DUMPABLE = 3
|
||||||
|
PR_SET_PDEATHSIG = 1
|
||||||
|
PR_GET_PDEATHSIG = 2
|
||||||
|
PR_SET_CHILD_SUBREAPER = 36
|
||||||
|
PR_GET_CHILD_SUBREAPER = 37
|
||||||
|
AT_FDCWD = -100
|
||||||
|
AT_EACCESS = 0x200
|
||||||
|
AT_EMPTY_PATH = 0x1000
|
||||||
|
AT_REMOVEDIR = 0x200
|
||||||
|
RENAME_NOREPLACE = 1 << 0
|
||||||
|
ST_RDONLY = 1
|
||||||
|
ST_NOSUID = 2
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -476,6 +605,7 @@ const (
|
|||||||
EMLINK = Errno(125)
|
EMLINK = Errno(125)
|
||||||
ENAMETOOLONG = Errno(126)
|
ENAMETOOLONG = Errno(126)
|
||||||
ENFILE = Errno(127)
|
ENFILE = Errno(127)
|
||||||
|
ENOATTR = Errno(265)
|
||||||
ENODEV = Errno(128)
|
ENODEV = Errno(128)
|
||||||
ENOENT = Errno(129)
|
ENOENT = Errno(129)
|
||||||
ENOEXEC = Errno(130)
|
ENOEXEC = Errno(130)
|
||||||
@@ -700,7 +830,7 @@ var errorList = [...]struct {
|
|||||||
{145, "EDC5145I", "The parameter list is too long, or the message to receive was too large for the buffer."},
|
{145, "EDC5145I", "The parameter list is too long, or the message to receive was too large for the buffer."},
|
||||||
{146, "EDC5146I", "Too many levels of symbolic links."},
|
{146, "EDC5146I", "Too many levels of symbolic links."},
|
||||||
{147, "EDC5147I", "Illegal byte sequence."},
|
{147, "EDC5147I", "Illegal byte sequence."},
|
||||||
{148, "", ""},
|
{148, "EDC5148I", "The named attribute or data not available."},
|
||||||
{149, "EDC5149I", "Value Overflow Error."},
|
{149, "EDC5149I", "Value Overflow Error."},
|
||||||
{150, "EDC5150I", "UNIX System Services is not active."},
|
{150, "EDC5150I", "UNIX System Services is not active."},
|
||||||
{151, "EDC5151I", "Dynamic allocation error."},
|
{151, "EDC5151I", "Dynamic allocation error."},
|
||||||
@@ -743,6 +873,7 @@ var errorList = [...]struct {
|
|||||||
{259, "EDC5259I", "A CUN_RS_NO_CONVERSION error was issued by Unicode Services."},
|
{259, "EDC5259I", "A CUN_RS_NO_CONVERSION error was issued by Unicode Services."},
|
||||||
{260, "EDC5260I", "A CUN_RS_TABLE_NOT_ALIGNED error was issued by Unicode Services."},
|
{260, "EDC5260I", "A CUN_RS_TABLE_NOT_ALIGNED error was issued by Unicode Services."},
|
||||||
{262, "EDC5262I", "An iconv() function encountered an unexpected error while using Unicode Services."},
|
{262, "EDC5262I", "An iconv() function encountered an unexpected error while using Unicode Services."},
|
||||||
|
{265, "EDC5265I", "The named attribute not available."},
|
||||||
{1000, "EDC8000I", "A bad socket-call constant was found in the IUCV header."},
|
{1000, "EDC8000I", "A bad socket-call constant was found in the IUCV header."},
|
||||||
{1001, "EDC8001I", "An error was found in the IUCV header."},
|
{1001, "EDC8001I", "An error was found in the IUCV header."},
|
||||||
{1002, "EDC8002I", "A socket descriptor is out of range."},
|
{1002, "EDC8002I", "A socket descriptor is out of range."},
|
||||||
|
|||||||
364
vendor/golang.org/x/sys/unix/zsymaddr_zos_s390x.s
generated
vendored
Normal file
364
vendor/golang.org/x/sys/unix/zsymaddr_zos_s390x.s
generated
vendored
Normal file
@@ -0,0 +1,364 @@
|
|||||||
|
// go run mksyscall_zos_s390x.go -o_sysnum zsysnum_zos_s390x.go -o_syscall zsyscall_zos_s390x.go -i_syscall syscall_zos_s390x.go -o_asm zsymaddr_zos_s390x.s
|
||||||
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build zos && s390x
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
// provide the address of function variable to be fixed up.
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_FlistxattrAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Flistxattr(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_FremovexattrAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Fremovexattr(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_FgetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Fgetxattr(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_FsetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Fsetxattr(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_accept4Addr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·accept4(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_RemovexattrAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Removexattr(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_Dup3Addr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Dup3(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_DirfdAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Dirfd(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_EpollCreateAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·EpollCreate(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_EpollCreate1Addr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·EpollCreate1(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_EpollCtlAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·EpollCtl(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_EpollPwaitAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·EpollPwait(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_EpollWaitAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·EpollWait(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_EventfdAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Eventfd(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_FaccessatAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Faccessat(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_FchmodatAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Fchmodat(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_FchownatAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Fchownat(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_FdatasyncAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Fdatasync(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_fstatatAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·fstatat(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_LgetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Lgetxattr(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_LsetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Lsetxattr(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_FstatfsAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Fstatfs(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_FutimesAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Futimes(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_FutimesatAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Futimesat(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_GetrandomAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Getrandom(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_InotifyInitAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·InotifyInit(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_InotifyInit1Addr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·InotifyInit1(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_InotifyAddWatchAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·InotifyAddWatch(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_InotifyRmWatchAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·InotifyRmWatch(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_ListxattrAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Listxattr(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_LlistxattrAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Llistxattr(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_LremovexattrAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Lremovexattr(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_LutimesAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Lutimes(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_StatfsAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Statfs(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_SyncfsAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Syncfs(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_UnshareAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Unshare(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_LinkatAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Linkat(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_MkdiratAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Mkdirat(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_MknodatAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Mknodat(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_PivotRootAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·PivotRoot(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_PrctlAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Prctl(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_PrlimitAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Prlimit(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_RenameatAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Renameat(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_Renameat2Addr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Renameat2(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_SethostnameAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Sethostname(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_SetnsAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Setns(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_SymlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Symlinkat(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_UnlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·Unlinkat(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_openatAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·openat(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_openat2Addr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·openat2(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
TEXT ·get_utimensatAddr(SB), NOSPLIT|NOFRAME, $0-8
|
||||||
|
MOVD $·utimensat(SB), R8
|
||||||
|
MOVD R8, ret+0(FP)
|
||||||
|
RET
|
||||||
101
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
generated
vendored
101
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
generated
vendored
@@ -740,6 +740,54 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func renamexNp(from string, to string, flag uint32) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(from)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(to)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_renamex_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(from)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(to)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_renameatx_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(mib) > 0 {
|
if len(mib) > 0 {
|
||||||
@@ -760,6 +808,59 @@ var libc_sysctl_trampoline_addr uintptr
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func pthread_chdir_np(path string) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(path)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_pthread_chdir_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func pthread_fchdir_np(fd int) (err error) {
|
||||||
|
_, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_pthread_fchdir_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(iov) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&iov[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_connectx_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_connectx connectx "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
||||||
_, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
|
_, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
25
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
generated
vendored
25
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
generated
vendored
@@ -223,11 +223,36 @@ TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
|||||||
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
|
DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_renamex_np(SB)
|
||||||
|
GLOBL ·libc_renamex_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_renameatx_np(SB)
|
||||||
|
GLOBL ·libc_renameatx_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_sysctl(SB)
|
JMP libc_sysctl(SB)
|
||||||
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
|
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pthread_chdir_np(SB)
|
||||||
|
GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pthread_fchdir_np(SB)
|
||||||
|
GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_connectx(SB)
|
||||||
|
GLOBL ·libc_connectx_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_sendfile(SB)
|
JMP libc_sendfile(SB)
|
||||||
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
|
||||||
|
|||||||
101
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
generated
vendored
101
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
generated
vendored
@@ -740,6 +740,54 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func renamexNp(from string, to string, flag uint32) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(from)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(to)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_renamex_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(from)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(to)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_renameatx_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(mib) > 0 {
|
if len(mib) > 0 {
|
||||||
@@ -760,6 +808,59 @@ var libc_sysctl_trampoline_addr uintptr
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func pthread_chdir_np(path string) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(path)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_pthread_chdir_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func pthread_fchdir_np(fd int) (err error) {
|
||||||
|
_, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_pthread_fchdir_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(iov) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&iov[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_connectx_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_connectx connectx "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
||||||
_, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
|
_, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
25
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
generated
vendored
25
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
generated
vendored
@@ -223,11 +223,36 @@ TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
|||||||
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
|
DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_renamex_np(SB)
|
||||||
|
GLOBL ·libc_renamex_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_renameatx_np(SB)
|
||||||
|
GLOBL ·libc_renameatx_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_sysctl(SB)
|
JMP libc_sysctl(SB)
|
||||||
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
|
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pthread_chdir_np(SB)
|
||||||
|
GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pthread_fchdir_np(SB)
|
||||||
|
GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_connectx(SB)
|
||||||
|
GLOBL ·libc_connectx_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_sendfile(SB)
|
JMP libc_sendfile(SB)
|
||||||
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
|
||||||
|
|||||||
16
vendor/golang.org/x/sys/unix/zsyscall_linux.go
generated
vendored
16
vendor/golang.org/x/sys/unix/zsyscall_linux.go
generated
vendored
@@ -2229,3 +2229,19 @@ func Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint)
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mseal(b []byte, flags uint) (err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(b) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&b[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
_, _, e1 := Syscall(SYS_MSEAL, uintptr(_p0), uintptr(len(b)), uintptr(flags))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|||||||
24
vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
generated
vendored
24
vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
generated
vendored
@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(fsType)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(dir)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_mount_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_mount mount "libc.so"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||||
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
5
vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
generated
vendored
5
vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
generated
vendored
@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
|||||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4
|
||||||
DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)
|
DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mount(SB)
|
||||||
|
GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $4
|
||||||
|
DATA ·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_nanosleep(SB)
|
JMP libc_nanosleep(SB)
|
||||||
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4
|
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4
|
||||||
|
|||||||
24
vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
generated
vendored
24
vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
generated
vendored
@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(fsType)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(dir)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_mount_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_mount mount "libc.so"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||||
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
5
vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
generated
vendored
5
vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
generated
vendored
@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
|||||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mount(SB)
|
||||||
|
GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_nanosleep(SB)
|
JMP libc_nanosleep(SB)
|
||||||
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
||||||
|
|||||||
24
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
generated
vendored
24
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
generated
vendored
@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(fsType)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(dir)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_mount_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_mount mount "libc.so"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||||
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
5
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
generated
vendored
5
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
generated
vendored
@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
|||||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4
|
||||||
DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)
|
DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mount(SB)
|
||||||
|
GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $4
|
||||||
|
DATA ·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_nanosleep(SB)
|
JMP libc_nanosleep(SB)
|
||||||
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4
|
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4
|
||||||
|
|||||||
24
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
generated
vendored
24
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
generated
vendored
@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(fsType)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(dir)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_mount_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_mount mount "libc.so"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||||
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
5
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
generated
vendored
5
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
generated
vendored
@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
|||||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mount(SB)
|
||||||
|
GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_nanosleep(SB)
|
JMP libc_nanosleep(SB)
|
||||||
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
||||||
|
|||||||
24
vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
generated
vendored
24
vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
generated
vendored
@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(fsType)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(dir)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_mount_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_mount mount "libc.so"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||||
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
5
vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
generated
vendored
5
vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
generated
vendored
@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
|||||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mount(SB)
|
||||||
|
GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_nanosleep(SB)
|
JMP libc_nanosleep(SB)
|
||||||
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
||||||
|
|||||||
24
vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
generated
vendored
24
vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
generated
vendored
@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(fsType)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(dir)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_mount_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_mount mount "libc.so"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||||
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
6
vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
generated
vendored
6
vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
generated
vendored
@@ -555,6 +555,12 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
|||||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_mount(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
CALL libc_nanosleep(SB)
|
CALL libc_nanosleep(SB)
|
||||||
RET
|
RET
|
||||||
|
|||||||
24
vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
generated
vendored
24
vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
generated
vendored
@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(fsType)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(dir)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_mount_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_mount mount "libc.so"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||||
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
5
vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
generated
vendored
5
vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
generated
vendored
@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
|||||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mount(SB)
|
||||||
|
GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_nanosleep(SB)
|
JMP libc_nanosleep(SB)
|
||||||
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
||||||
|
|||||||
2837
vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
generated
vendored
2837
vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
generated
vendored
File diff suppressed because it is too large
Load Diff
6
vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
generated
vendored
@@ -452,4 +452,10 @@ const (
|
|||||||
SYS_FUTEX_WAKE = 454
|
SYS_FUTEX_WAKE = 454
|
||||||
SYS_FUTEX_WAIT = 455
|
SYS_FUTEX_WAIT = 455
|
||||||
SYS_FUTEX_REQUEUE = 456
|
SYS_FUTEX_REQUEUE = 456
|
||||||
|
SYS_STATMOUNT = 457
|
||||||
|
SYS_LISTMOUNT = 458
|
||||||
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|||||||
6
vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
generated
vendored
@@ -374,4 +374,10 @@ const (
|
|||||||
SYS_FUTEX_WAKE = 454
|
SYS_FUTEX_WAKE = 454
|
||||||
SYS_FUTEX_WAIT = 455
|
SYS_FUTEX_WAIT = 455
|
||||||
SYS_FUTEX_REQUEUE = 456
|
SYS_FUTEX_REQUEUE = 456
|
||||||
|
SYS_STATMOUNT = 457
|
||||||
|
SYS_LISTMOUNT = 458
|
||||||
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|||||||
6
vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
generated
vendored
@@ -416,4 +416,10 @@ const (
|
|||||||
SYS_FUTEX_WAKE = 454
|
SYS_FUTEX_WAKE = 454
|
||||||
SYS_FUTEX_WAIT = 455
|
SYS_FUTEX_WAIT = 455
|
||||||
SYS_FUTEX_REQUEUE = 456
|
SYS_FUTEX_REQUEUE = 456
|
||||||
|
SYS_STATMOUNT = 457
|
||||||
|
SYS_LISTMOUNT = 458
|
||||||
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|||||||
6
vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
generated
vendored
@@ -319,4 +319,10 @@ const (
|
|||||||
SYS_FUTEX_WAKE = 454
|
SYS_FUTEX_WAKE = 454
|
||||||
SYS_FUTEX_WAIT = 455
|
SYS_FUTEX_WAIT = 455
|
||||||
SYS_FUTEX_REQUEUE = 456
|
SYS_FUTEX_REQUEUE = 456
|
||||||
|
SYS_STATMOUNT = 457
|
||||||
|
SYS_LISTMOUNT = 458
|
||||||
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|||||||
6
vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
generated
vendored
@@ -313,4 +313,10 @@ const (
|
|||||||
SYS_FUTEX_WAKE = 454
|
SYS_FUTEX_WAKE = 454
|
||||||
SYS_FUTEX_WAIT = 455
|
SYS_FUTEX_WAIT = 455
|
||||||
SYS_FUTEX_REQUEUE = 456
|
SYS_FUTEX_REQUEUE = 456
|
||||||
|
SYS_STATMOUNT = 457
|
||||||
|
SYS_LISTMOUNT = 458
|
||||||
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|||||||
6
vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
generated
vendored
@@ -436,4 +436,10 @@ const (
|
|||||||
SYS_FUTEX_WAKE = 4454
|
SYS_FUTEX_WAKE = 4454
|
||||||
SYS_FUTEX_WAIT = 4455
|
SYS_FUTEX_WAIT = 4455
|
||||||
SYS_FUTEX_REQUEUE = 4456
|
SYS_FUTEX_REQUEUE = 4456
|
||||||
|
SYS_STATMOUNT = 4457
|
||||||
|
SYS_LISTMOUNT = 4458
|
||||||
|
SYS_LSM_GET_SELF_ATTR = 4459
|
||||||
|
SYS_LSM_SET_SELF_ATTR = 4460
|
||||||
|
SYS_LSM_LIST_MODULES = 4461
|
||||||
|
SYS_MSEAL = 4462
|
||||||
)
|
)
|
||||||
|
|||||||
6
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
generated
vendored
@@ -366,4 +366,10 @@ const (
|
|||||||
SYS_FUTEX_WAKE = 5454
|
SYS_FUTEX_WAKE = 5454
|
||||||
SYS_FUTEX_WAIT = 5455
|
SYS_FUTEX_WAIT = 5455
|
||||||
SYS_FUTEX_REQUEUE = 5456
|
SYS_FUTEX_REQUEUE = 5456
|
||||||
|
SYS_STATMOUNT = 5457
|
||||||
|
SYS_LISTMOUNT = 5458
|
||||||
|
SYS_LSM_GET_SELF_ATTR = 5459
|
||||||
|
SYS_LSM_SET_SELF_ATTR = 5460
|
||||||
|
SYS_LSM_LIST_MODULES = 5461
|
||||||
|
SYS_MSEAL = 5462
|
||||||
)
|
)
|
||||||
|
|||||||
6
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
generated
vendored
@@ -366,4 +366,10 @@ const (
|
|||||||
SYS_FUTEX_WAKE = 5454
|
SYS_FUTEX_WAKE = 5454
|
||||||
SYS_FUTEX_WAIT = 5455
|
SYS_FUTEX_WAIT = 5455
|
||||||
SYS_FUTEX_REQUEUE = 5456
|
SYS_FUTEX_REQUEUE = 5456
|
||||||
|
SYS_STATMOUNT = 5457
|
||||||
|
SYS_LISTMOUNT = 5458
|
||||||
|
SYS_LSM_GET_SELF_ATTR = 5459
|
||||||
|
SYS_LSM_SET_SELF_ATTR = 5460
|
||||||
|
SYS_LSM_LIST_MODULES = 5461
|
||||||
|
SYS_MSEAL = 5462
|
||||||
)
|
)
|
||||||
|
|||||||
6
vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
generated
vendored
@@ -436,4 +436,10 @@ const (
|
|||||||
SYS_FUTEX_WAKE = 4454
|
SYS_FUTEX_WAKE = 4454
|
||||||
SYS_FUTEX_WAIT = 4455
|
SYS_FUTEX_WAIT = 4455
|
||||||
SYS_FUTEX_REQUEUE = 4456
|
SYS_FUTEX_REQUEUE = 4456
|
||||||
|
SYS_STATMOUNT = 4457
|
||||||
|
SYS_LISTMOUNT = 4458
|
||||||
|
SYS_LSM_GET_SELF_ATTR = 4459
|
||||||
|
SYS_LSM_SET_SELF_ATTR = 4460
|
||||||
|
SYS_LSM_LIST_MODULES = 4461
|
||||||
|
SYS_MSEAL = 4462
|
||||||
)
|
)
|
||||||
|
|||||||
6
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
generated
vendored
@@ -443,4 +443,10 @@ const (
|
|||||||
SYS_FUTEX_WAKE = 454
|
SYS_FUTEX_WAKE = 454
|
||||||
SYS_FUTEX_WAIT = 455
|
SYS_FUTEX_WAIT = 455
|
||||||
SYS_FUTEX_REQUEUE = 456
|
SYS_FUTEX_REQUEUE = 456
|
||||||
|
SYS_STATMOUNT = 457
|
||||||
|
SYS_LISTMOUNT = 458
|
||||||
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|||||||
6
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
generated
vendored
@@ -415,4 +415,10 @@ const (
|
|||||||
SYS_FUTEX_WAKE = 454
|
SYS_FUTEX_WAKE = 454
|
||||||
SYS_FUTEX_WAIT = 455
|
SYS_FUTEX_WAIT = 455
|
||||||
SYS_FUTEX_REQUEUE = 456
|
SYS_FUTEX_REQUEUE = 456
|
||||||
|
SYS_STATMOUNT = 457
|
||||||
|
SYS_LISTMOUNT = 458
|
||||||
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|||||||
6
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
generated
vendored
@@ -415,4 +415,10 @@ const (
|
|||||||
SYS_FUTEX_WAKE = 454
|
SYS_FUTEX_WAKE = 454
|
||||||
SYS_FUTEX_WAIT = 455
|
SYS_FUTEX_WAIT = 455
|
||||||
SYS_FUTEX_REQUEUE = 456
|
SYS_FUTEX_REQUEUE = 456
|
||||||
|
SYS_STATMOUNT = 457
|
||||||
|
SYS_LISTMOUNT = 458
|
||||||
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|||||||
6
vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
generated
vendored
@@ -320,4 +320,10 @@ const (
|
|||||||
SYS_FUTEX_WAKE = 454
|
SYS_FUTEX_WAKE = 454
|
||||||
SYS_FUTEX_WAIT = 455
|
SYS_FUTEX_WAIT = 455
|
||||||
SYS_FUTEX_REQUEUE = 456
|
SYS_FUTEX_REQUEUE = 456
|
||||||
|
SYS_STATMOUNT = 457
|
||||||
|
SYS_LISTMOUNT = 458
|
||||||
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|||||||
6
vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
generated
vendored
6
vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
generated
vendored
@@ -381,4 +381,10 @@ const (
|
|||||||
SYS_FUTEX_WAKE = 454
|
SYS_FUTEX_WAKE = 454
|
||||||
SYS_FUTEX_WAIT = 455
|
SYS_FUTEX_WAIT = 455
|
||||||
SYS_FUTEX_REQUEUE = 456
|
SYS_FUTEX_REQUEUE = 456
|
||||||
|
SYS_STATMOUNT = 457
|
||||||
|
SYS_LISTMOUNT = 458
|
||||||
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user