diff --git a/trunk/3rdparty/srs-bench/Makefile b/trunk/3rdparty/srs-bench/Makefile
index 80d284998d..79d89b1d70 100644
--- a/trunk/3rdparty/srs-bench/Makefile
+++ b/trunk/3rdparty/srs-bench/Makefile
@@ -1,20 +1,32 @@
-.PHONY: help default clean bench test
+.PHONY: help default clean bench pcap test all
default: bench test
clean:
rm -rf ./objs
+all: bench test pcap test
+
#########################################################################################################
# SRS benchmark tool for SRS, janus, GB28181.
./objs/.format.bench.txt: *.go janus/*.go ./objs/.format.srs.txt ./objs/.format.gb28181.txt
gofmt -w *.go janus
mkdir -p objs && echo "done" > ./objs/.format.bench.txt
-bench: ./objs/srs_bench ./objs/pcap_simulator
+bench: ./objs/srs_bench
+
+UNAME_S := $(shell uname -s)
+ifeq ($(UNAME_S),Darwin)
+ SRT_PREFIX := $(shell brew --prefix srt)
+ CGO_CFLAGS := -I$(SRT_PREFIX)/include
+ CGO_LDFLAGS := -L$(SRT_PREFIX)/lib -lsrt
+else ifeq ($(UNAME_S),Linux)
+ CGO_CFLAGS := -I/usr/local/include
+ CGO_LDFLAGS := -L/usr/local/lib -lsrt -L/usr/local/ssl/lib -lcrypto -lstdc++ -lm -ldl
+endif
-./objs/srs_bench: ./objs/.format.bench.txt *.go janus/*.go srs/*.go vnet/*.go gb28181/*.go Makefile
- go build -mod=vendor -o objs/srs_bench .
+./objs/srs_bench: ./objs/.format.bench.txt *.go janus/*.go srs/*.go vnet/*.go gb28181/*.go live/*.go Makefile
+ CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go build -mod=vendor -o objs/srs_bench .
#########################################################################################################
# For all regression tests.
@@ -35,6 +47,8 @@ test: ./objs/srs_test ./objs/srs_gb28181_test ./objs/srs_blackbox_test
gofmt -w pcap
mkdir -p objs && echo "done" > ./objs/.format.pcap.txt
+pcap: ./objs/pcap_simulator
+
./objs/pcap_simulator: ./objs/.format.pcap.txt pcap/*.go Makefile
go build -mod=vendor -o ./objs/pcap_simulator ./pcap
@@ -59,9 +73,10 @@ test: ./objs/srs_test ./objs/srs_gb28181_test ./objs/srs_blackbox_test
#########################################################################################################
# Help menu.
help:
- @echo "Usage: make [default|bench|test|clean]"
+ @echo "Usage: make [default|bench|pcap|test|clean]"
@echo " default The default entry for make is bench+test"
@echo " bench Make the bench to ./objs/srs_bench"
+ @echo " pcap Make the pcap simulator to ./objs/pcap_simulator"
@echo " test Make the test tool to ./objs/srs_test and ./objs/srs_gb28181_test ./objs/srs_blackbox_test"
@echo " clean Remove all tools at ./objs"
diff --git a/trunk/3rdparty/srs-bench/README.md b/trunk/3rdparty/srs-bench/README.md
index 7c795a3311..8bda975415 100644
--- a/trunk/3rdparty/srs-bench/README.md
+++ b/trunk/3rdparty/srs-bench/README.md
@@ -14,6 +14,8 @@ git clone -b feature/rtc https://github.com/ossrs/srs-bench.git &&
cd srs-bench && make
```
+> Note: 依赖Go编译工具,建议使用 Go 1.17 及以上的版本。
+
编译会生成下面的工具:
* `./objs/srs_bench` 压测,模拟大量客户端的负载测试,支持SRS、GB28181和Janus三种场景。
@@ -33,7 +35,7 @@ cd srs/trunk && ./configure --h265=on --gb28181=on && make &&
具体场景,请按下面的操作启动测试。
-## Player for Live
+## Player for WHEP
直播播放压测,一个流,很多个播放。
@@ -49,7 +51,7 @@ ffmpeg -re -i doc/source.200kbps.768x320.flv -c copy -f flv -y rtmp://localhost/
./objs/srs_bench -sr webrtc://localhost/live/livestream -nn 100
```
-## Publisher for Live or RTC
+## Publisher for WHIP
直播或会议场景推流压测,一般会推多个流。
@@ -63,7 +65,7 @@ ffmpeg -re -i doc/source.200kbps.768x320.flv -c copy -f flv -y rtmp://localhost/
> 注意:帧率是原始视频的帧率,由于264中没有这个信息所以需要传递。
-## Multipel Player or Publisher for RTC
+## Multiple WHIP or WHEP for RTC
会议场景的播放压测,会多个客户端播放多个流,比如3人会议,那么就有3个推流,每个流有2个播放。
@@ -84,7 +86,7 @@ ffmpeg -re -i doc/source.200kbps.768x320.flv -c copy -f flv -y rtmp://localhost/
> 备注:URL的变量格式参考Go的`fmt.Sprintf`,比如可以用`webrtc://localhost/live/livestream_%03d`。
-## DVR for Benchmark
+## DVR for RTC Benchmark
录制场景,主要是把内容录制下来后,可分析,也可以用于推流。
@@ -120,6 +122,37 @@ ffmpeg -re -i doc/source.200kbps.768x320.flv -c copy -f flv -y rtmp://localhost/
> Note: 可以传递更多参数,详细参考SRS支持的参数。
+## Reconnecting Load Test
+
+建立连接和断开重连的压测,可以测试SRS在多个Source时是否有内存泄露问题,参考 [#3667](https://github.com/ossrs/srs/discussions/3667#discussioncomment-8969107)
+
+RTMP重连测试:
+
+```bash
+for ((i=0;;i++)); do
+ ./objs/srs_bench -sfu=live -pr=rtmp://localhost/live${i}/stream -sn=1000 -cap=true;
+ sleep 10;
+done
+```
+
+SRT重连测试:
+
+```bash
+for ((i=0;;i++)); do
+ ./objs/srs_bench -sfu=live -pr='srt://127.0.0.1:10080?streamid=#!::'m=publish,r=live${i}/stream -sn=1000 -cap=true;
+ sleep 10;
+done
+```
+
+WebRTC重连测试:
+
+```bash
+for ((i=0;;i++)); do
+ ./objs/srs_bench -sfu=rtc -pr=webrtc://localhost/live${i}/livestream -sn=1000 -cap=true;
+ sleep 10;
+done
+```
+
## Regression Test
回归测试需要先启动[SRS](https://github.com/ossrs/srs/issues/307),支持WebRTC推拉流:
@@ -329,4 +362,50 @@ make -j10 && ./objs/srs_bench -sfu janus \
-nn 5
```
+## Install LIBSRT
+
+我们使用 [srtgo](https://github.com/Haivision/srtgo) 库测试SRT协议,需要安装libsrt库,
+参考[macOS](https://github.com/Haivision/srt/blob/master/docs/build/build-macOS.md):
+
+```bash
+brew install srt
+```
+
+如果是Ubuntu,可以参考[Ubuntu](https://github.com/Haivision/srt/blob/master/docs/build/package-managers.md):
+
+```bash
+apt-get install -y libsrt
+```
+
+安装完libsrt后,直接编译srs-bench即可:
+
+```bash
+make
+```
+
+## Ubuntu Docker
+
+如果使用Ubuntu编译,推荐使用 `ossrs/srs:ubuntu20` 作为镜像编译,已经编译了openssl和libsrt,启动容器:
+
+```bash
+docker run --rm -it -v $(pwd):/g -w /g ossrs/srs:ubuntu20 make
+```
+
+## GoLand
+
+使用GoLand编译和调试时,需要设置libsrt的环境变量,首先可以使用brew获取路径:
+
+```bash
+brew --prefix srt
+#/opt/homebrew/opt/srt
+```
+
+然后在GoLand中,编辑配置 `Edit Configurations`,添加环境变量:
+
+```bash
+CGO_CFLAGS=-I/opt/homebrew/opt/srt/include;CGO_LDFLAGS=-L/opt/homebrew/opt/srt/lib -lsrt
+```
+
+> Note: 特别注意的是,CGO_LDFLAGS是可以有空格的,不能使用字符串,否则找不到库。
+
2021.01, Winlin
diff --git a/trunk/3rdparty/srs-bench/blackbox/hevc_test.go b/trunk/3rdparty/srs-bench/blackbox/hevc_test.go
index 3b62e8a8cb..b6b85cec1a 100644
--- a/trunk/3rdparty/srs-bench/blackbox/hevc_test.go
+++ b/trunk/3rdparty/srs-bench/blackbox/hevc_test.go
@@ -935,8 +935,8 @@ func TestSlow_SrtPublish_HttpTsPlay_HEVC_Basic(t *testing.T) {
}
// Note that HLS score is low, so we only check duration.
- if dv := m.Duration(); dv < duration / 2 {
- r5 = errors.Errorf("short duration=%v < %v, %v, %v", dv, duration / 2, m.String(), str)
+ if dv := m.Duration(); dv < duration/2 {
+ r5 = errors.Errorf("short duration=%v < %v, %v, %v", dv, duration/2, m.String(), str)
}
if v := m.Video(); v == nil {
diff --git a/trunk/3rdparty/srs-bench/gb28181/gb28181.go b/trunk/3rdparty/srs-bench/gb28181/gb28181.go
index 38122e786f..f2cf9bb555 100644
--- a/trunk/3rdparty/srs-bench/gb28181/gb28181.go
+++ b/trunk/3rdparty/srs-bench/gb28181/gb28181.go
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
-// Copyright (c) 2022 Winlin
+// # Copyright (c) 2022-2024 Winlin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
@@ -57,7 +57,11 @@ func Parse(ctx context.Context) interface{} {
fl.Usage = func() {
fmt.Println(fmt.Sprintf("Usage: %v [Options]", os.Args[0]))
fmt.Println(fmt.Sprintf("Options:"))
- fmt.Println(fmt.Sprintf(" -sfu The target SFU, srs or gb28181 or janus. Default: srs"))
+ fmt.Println(fmt.Sprintf(" -sfu The target server that can be rtc, live, janus, or gb28181. Default: rtc"))
+ fmt.Println(fmt.Sprintf(" rtc/srs: SRS WebRTC SFU server, for WebRTC/WHIP/WHEP."))
+ fmt.Println(fmt.Sprintf(" live: SRS live streaming server, for RTMP/HTTP-FLV/HLS."))
+ fmt.Println(fmt.Sprintf(" janus: Janus WebRTC SFU server, for janus private protocol."))
+ fmt.Println(fmt.Sprintf(" gb28181: GB media server, for GB protocol."))
fmt.Println(fmt.Sprintf("SIP:"))
fmt.Println(fmt.Sprintf(" -user The SIP username, ID of device."))
fmt.Println(fmt.Sprintf(" -random Append N number to user as random device ID, like 1320000001."))
diff --git a/trunk/3rdparty/srs-bench/gb28181/gb28181_test.go b/trunk/3rdparty/srs-bench/gb28181/gb28181_test.go
index 43139aa5b7..19a82764c0 100644
--- a/trunk/3rdparty/srs-bench/gb28181/gb28181_test.go
+++ b/trunk/3rdparty/srs-bench/gb28181/gb28181_test.go
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
-// Copyright (c) 2022 Winlin
+// # Copyright (c) 2022-2024 Winlin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
diff --git a/trunk/3rdparty/srs-bench/gb28181/gb_test.go b/trunk/3rdparty/srs-bench/gb28181/gb_test.go
index 10f06a7c73..f1bfccfa18 100644
--- a/trunk/3rdparty/srs-bench/gb28181/gb_test.go
+++ b/trunk/3rdparty/srs-bench/gb28181/gb_test.go
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
-// Copyright (c) 2022 Winlin
+// # Copyright (c) 2022-2024 Winlin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
diff --git a/trunk/3rdparty/srs-bench/gb28181/ingester.go b/trunk/3rdparty/srs-bench/gb28181/ingester.go
index 2cf6cacf3b..9bcb3270aa 100644
--- a/trunk/3rdparty/srs-bench/gb28181/ingester.go
+++ b/trunk/3rdparty/srs-bench/gb28181/ingester.go
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
-// Copyright (c) 2022 Winlin
+// # Copyright (c) 2022-2024 Winlin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
diff --git a/trunk/3rdparty/srs-bench/gb28181/ps.go b/trunk/3rdparty/srs-bench/gb28181/ps.go
index 7acaf83427..b4871961ae 100644
--- a/trunk/3rdparty/srs-bench/gb28181/ps.go
+++ b/trunk/3rdparty/srs-bench/gb28181/ps.go
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
-// Copyright (c) 2022 Winlin
+// # Copyright (c) 2022-2024 Winlin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
diff --git a/trunk/3rdparty/srs-bench/gb28181/sip.go b/trunk/3rdparty/srs-bench/gb28181/sip.go
index 8043ffd8b3..1bc8cd0d30 100644
--- a/trunk/3rdparty/srs-bench/gb28181/sip.go
+++ b/trunk/3rdparty/srs-bench/gb28181/sip.go
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
-// Copyright (c) 2022 Winlin
+// # Copyright (c) 2022-2024 Winlin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
diff --git a/trunk/3rdparty/srs-bench/gb28181/util.go b/trunk/3rdparty/srs-bench/gb28181/util.go
index e162710d39..ca4adff1b8 100644
--- a/trunk/3rdparty/srs-bench/gb28181/util.go
+++ b/trunk/3rdparty/srs-bench/gb28181/util.go
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
-// Copyright (c) 2022 Winlin
+// # Copyright (c) 2022-2024 Winlin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
diff --git a/trunk/3rdparty/srs-bench/go.mod b/trunk/3rdparty/srs-bench/go.mod
index 1aa2421afb..d4667a1a5a 100644
--- a/trunk/3rdparty/srs-bench/go.mod
+++ b/trunk/3rdparty/srs-bench/go.mod
@@ -5,6 +5,7 @@ go 1.17
require (
github.com/ghettovoice/gosip v0.0.0-20220929080231-de8ba881be83
github.com/google/gopacket v1.1.19
+ github.com/haivision/srtgo v0.0.0-20230627061225-a70d53fcd618
github.com/ossrs/go-oryx-lib v0.0.9
github.com/pion/ice/v2 v2.3.6
github.com/pion/interceptor v0.1.17
@@ -28,6 +29,7 @@ require (
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.8 // indirect
+ github.com/mattn/go-pointer v0.0.1 // indirect
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
github.com/pion/datachannel v1.5.5 // indirect
github.com/pion/dtls/v2 v2.2.7 // indirect
@@ -40,12 +42,12 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
github.com/sirupsen/logrus v1.4.2 // indirect
- github.com/stretchr/testify v1.8.4 // indirect
+ github.com/stretchr/testify v1.9.0 // indirect
github.com/tevino/abool v0.0.0-20170917061928-9b9efcf221b5 // indirect
github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect
- golang.org/x/crypto v0.9.0 // indirect
- golang.org/x/net v0.10.0 // indirect
- golang.org/x/sys v0.8.0 // indirect
- golang.org/x/term v0.8.0 // indirect
+ golang.org/x/crypto v0.21.0 // indirect
+ golang.org/x/net v0.21.0 // indirect
+ golang.org/x/sys v0.18.0 // indirect
+ golang.org/x/term v0.18.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
diff --git a/trunk/3rdparty/srs-bench/go.sum b/trunk/3rdparty/srs-bench/go.sum
index 27e06b91a3..9c5733d4ad 100644
--- a/trunk/3rdparty/srs-bench/go.sum
+++ b/trunk/3rdparty/srs-bench/go.sum
@@ -31,6 +31,8 @@ github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF
github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/haivision/srtgo v0.0.0-20230627061225-a70d53fcd618 h1:oGPTZa7I5wqmQs/UhWHj3ln6/CjQX2yQt784xx6H0wI=
+github.com/haivision/srtgo v0.0.0-20230627061225-a70d53fcd618/go.mod h1:aTd4vOr9wtzkCbbocUFh6atlJy7H/iV5jhqEWlTdCdA=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=
@@ -44,6 +46,8 @@ github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaa
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
+github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0=
+github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
@@ -115,6 +119,7 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
+github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
@@ -122,8 +127,9 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
-github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+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/tevino/abool v0.0.0-20170917061928-9b9efcf221b5 h1:hNna6Fi0eP1f2sMBe/rJicDmaHmoXGe1Ta84FPYHLuE=
github.com/tevino/abool v0.0.0-20170917061928-9b9efcf221b5/go.mod h1:f1SCnEOt6sc3fOJfPQDRDzHOtSXuTtnz0ImG9kPRDV0=
github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg=
@@ -140,8 +146,10 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
-golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g=
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
+golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
+golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
+golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
@@ -161,8 +169,9 @@ golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
-golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
+golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
+golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -178,6 +187,7 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200926100807-9d91bd62050c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -193,8 +203,10 @@ golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
+golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@@ -202,8 +214,10 @@ golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
-golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
+golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
+golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
+golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
@@ -213,8 +227,9 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
-golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
+golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
+golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
diff --git a/trunk/3rdparty/srs-bench/janus/janus.go b/trunk/3rdparty/srs-bench/janus/janus.go
index c7762d9c15..f62750af8d 100644
--- a/trunk/3rdparty/srs-bench/janus/janus.go
+++ b/trunk/3rdparty/srs-bench/janus/janus.go
@@ -66,7 +66,11 @@ func Parse(ctx context.Context) {
fl.Usage = func() {
fmt.Println(fmt.Sprintf("Usage: %v [Options]", os.Args[0]))
fmt.Println(fmt.Sprintf("Options:"))
- fmt.Println(fmt.Sprintf(" -sfu The target SFU, srs or gb28181 or janus. Default: srs"))
+ fmt.Println(fmt.Sprintf(" -sfu The target server that can be rtc, live, janus, or gb28181. Default: rtc"))
+ fmt.Println(fmt.Sprintf(" rtc/srs: SRS WebRTC SFU server, for WebRTC/WHIP/WHEP."))
+ fmt.Println(fmt.Sprintf(" live: SRS live streaming server, for RTMP/HTTP-FLV/HLS."))
+ fmt.Println(fmt.Sprintf(" janus: Janus WebRTC SFU server, for janus private protocol."))
+ fmt.Println(fmt.Sprintf(" gb28181: GB media server, for GB protocol."))
fmt.Println(fmt.Sprintf(" -nn The number of clients to simulate. Default: 1"))
fmt.Println(fmt.Sprintf(" -sn The number of streams to simulate. Variable: %%d. Default: 1"))
fmt.Println(fmt.Sprintf(" -delay The start delay in ms for each client or stream to simulate. Default: 50"))
diff --git a/trunk/3rdparty/srs-bench/live/live.go b/trunk/3rdparty/srs-bench/live/live.go
new file mode 100644
index 0000000000..f264e2adfc
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/live/live.go
@@ -0,0 +1,195 @@
+// The MIT License (MIT)
+//
+// # Copyright (c) 2021 Winlin
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of
+// this software and associated documentation files (the "Software"), to deal in
+// the Software without restriction, including without limitation the rights to
+// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+// the Software, and to permit persons to whom the Software is furnished to do so,
+// subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+package live
+
+import (
+ "context"
+ "flag"
+ "fmt"
+ "net"
+ "net/http"
+ "os"
+ "strings"
+ "sync"
+ "time"
+
+ "github.com/ossrs/go-oryx-lib/errors"
+ "github.com/ossrs/go-oryx-lib/logger"
+)
+
+var closeAfterPublished bool
+
+var pr string
+
+var streams, delay int
+
+var statListen string
+
+func Parse(ctx context.Context) {
+ fl := flag.NewFlagSet(os.Args[0], flag.ContinueOnError)
+
+ var sfu string
+ fl.StringVar(&sfu, "sfu", "srs", "The SFU server, srs or gb28181 or janus")
+
+ fl.BoolVar(&closeAfterPublished, "cap", false, "")
+
+ fl.StringVar(&pr, "pr", "", "")
+
+ fl.IntVar(&streams, "sn", 1, "")
+ fl.IntVar(&delay, "delay", 10, "")
+
+ fl.StringVar(&statListen, "stat", "", "")
+
+ fl.Usage = func() {
+ fmt.Println(fmt.Sprintf("Usage: %v [Options]", os.Args[0]))
+ fmt.Println(fmt.Sprintf("Options:"))
+ fmt.Println(fmt.Sprintf(" -sfu The target server that can be rtc, live, janus, or gb28181. Default: rtc"))
+ fmt.Println(fmt.Sprintf(" rtc/srs: SRS WebRTC SFU server, for WebRTC/WHIP/WHEP."))
+ fmt.Println(fmt.Sprintf(" live: SRS live streaming server, for RTMP/HTTP-FLV/HLS."))
+ fmt.Println(fmt.Sprintf(" janus: Janus WebRTC SFU server, for janus private protocol."))
+ fmt.Println(fmt.Sprintf(" -sn The number of streams to simulate. Variable: %%d. Default: 1"))
+ fmt.Println(fmt.Sprintf(" -delay The start delay in ms for each client or stream to simulate. Default: 50"))
+ fmt.Println(fmt.Sprintf(" -stat [Optional] The stat server API listen port."))
+ fmt.Println(fmt.Sprintf("Publisher:"))
+ fmt.Println(fmt.Sprintf(" -pr The url to publish. If sn exceed 1, auto append variable %%d."))
+ fmt.Println(fmt.Sprintf(" -cap Whether to close connection after publish. Default: false"))
+ fmt.Println(fmt.Sprintf("\n例如,1个推流,无媒体传输:"))
+ fmt.Println(fmt.Sprintf(" %v -pr=rtmp://localhost/live/livestream -cap=true", os.Args[0]))
+ fmt.Println(fmt.Sprintf("\n例如,2个推流,无媒体传输:"))
+ fmt.Println(fmt.Sprintf(" %v -pr=rtmp://localhost/live/livestream_%%d -sn=2 -cap=true", os.Args[0]))
+ fmt.Println()
+ }
+ _ = fl.Parse(os.Args[1:])
+
+ showHelp := streams <= 0
+ if pr == "" {
+ showHelp = true
+ }
+ if showHelp {
+ fl.Usage()
+ os.Exit(-1)
+ }
+
+ if statListen != "" && !strings.Contains(statListen, ":") {
+ statListen = ":" + statListen
+ }
+
+ summaryDesc := fmt.Sprintf("streams=%v", streams)
+ if pr != "" {
+ summaryDesc = fmt.Sprintf("%v, publish=(url=%v,cap=%v)",
+ summaryDesc, pr, closeAfterPublished)
+ }
+ logger.Tf(ctx, "Run benchmark with %v", summaryDesc)
+}
+
+func Run(ctx context.Context) error {
+ ctx, cancel := context.WithCancel(ctx)
+ defer cancel()
+
+ // Run tasks.
+ var wg sync.WaitGroup
+ defer wg.Wait()
+
+ // Run STAT API server.
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+
+ if statListen == "" {
+ return
+ }
+
+ var lc net.ListenConfig
+ ln, err := lc.Listen(ctx, "tcp", statListen)
+ if err != nil {
+ logger.Ef(ctx, "stat listen err+%v", err)
+ cancel()
+ return
+ }
+
+ mux := http.NewServeMux()
+ handleStat(ctx, mux, statListen)
+
+ srv := &http.Server{
+ Handler: mux,
+ BaseContext: func(listener net.Listener) context.Context {
+ return ctx
+ },
+ }
+
+ go func() {
+ <-ctx.Done()
+ srv.Shutdown(ctx)
+ }()
+
+ logger.Tf(ctx, "Stat listen at %v", statListen)
+ if err := srv.Serve(ln); err != nil {
+ if ctx.Err() == nil {
+ logger.Ef(ctx, "stat serve err+%v", err)
+ cancel()
+ }
+ return
+ }
+ }()
+
+ // Run all publishers.
+ publisherStartedCtx, publisherStartedCancel := context.WithCancel(ctx)
+ defer publisherStartedCancel()
+ for i := 0; pr != "" && i < streams && ctx.Err() == nil; i++ {
+ r_auto := pr
+ if streams > 1 && !strings.Contains(r_auto, "%") {
+ r_auto += "%d"
+ }
+
+ r2 := r_auto
+ if strings.Contains(r2, "%") {
+ r2 = fmt.Sprintf(r2, i)
+ }
+
+ gStatLive.Publishers.Expect++
+ gStatLive.Publishers.Alive++
+
+ wg.Add(1)
+ go func(pr string) {
+ defer wg.Done()
+ defer func() {
+ gStatLive.Publishers.Alive--
+ logger.Tf(ctx, "Publisher %v done, alive=%v", pr, gStatLive.Publishers.Alive)
+
+ <- publisherStartedCtx.Done()
+ if gStatLive.Publishers.Alive == 0 {
+ cancel()
+ }
+ }()
+
+ if err := startPublish(ctx, pr, closeAfterPublished); err != nil {
+ if errors.Cause(err) != context.Canceled {
+ logger.Wf(ctx, "Run err %+v", err)
+ }
+ }
+ }(r2)
+
+ if delay > 0 {
+ time.Sleep(time.Duration(delay) * time.Millisecond)
+ }
+ }
+ return nil
+}
diff --git a/trunk/3rdparty/srs-bench/live/publisher.go b/trunk/3rdparty/srs-bench/live/publisher.go
new file mode 100644
index 0000000000..2db5466728
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/live/publisher.go
@@ -0,0 +1,210 @@
+// The MIT License (MIT)
+//
+// # Copyright (c) 2021 Winlin
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of
+// this software and associated documentation files (the "Software"), to deal in
+// the Software without restriction, including without limitation the rights to
+// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+// the Software, and to permit persons to whom the Software is furnished to do so,
+// subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+package live
+
+import (
+ "context"
+ "fmt"
+ "math/rand"
+ "net"
+ "net/url"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/haivision/srtgo"
+ "github.com/ossrs/go-oryx-lib/amf0"
+ "github.com/ossrs/go-oryx-lib/errors"
+ "github.com/ossrs/go-oryx-lib/logger"
+ "github.com/ossrs/go-oryx-lib/rtmp"
+)
+
+func startPublish(ctx context.Context, r string, closeAfterPublished bool) error {
+ ctx = logger.WithContext(ctx)
+ logger.Tf(ctx, "Run publish url=%v, cap=%v", r, closeAfterPublished)
+
+ u, err := url.Parse(r)
+ if err != nil {
+ return errors.Wrapf(err, "parse %v", r)
+ }
+
+ if u.Scheme == "rtmp" {
+ return startPublishRTMP(ctx, u, closeAfterPublished)
+ } else if u.Scheme == "srt" {
+ return startPublishSRT(ctx, u, closeAfterPublished)
+ }
+
+ return fmt.Errorf("invalid schema %v of %v", u.Scheme, r)
+}
+
+func startPublishSRT(ctx context.Context, u *url.URL, closeAfterPublished bool) (err error) {
+ // Parse host and port.
+ port := 1935
+ if u.Port() != "" {
+ if port, err = strconv.Atoi(u.Port()); err != nil {
+ return errors.Wrapf(err, "parse port %v", u.Port())
+ }
+ }
+
+ ips, err := net.LookupIP(u.Hostname())
+ if err != nil {
+ return errors.Wrapf(err, "lookup %v", u.Hostname())
+ }
+ if len(ips) == 0 {
+ return errors.Errorf("no ips for %v", u.Hostname())
+ }
+ logger.Tf(ctx, "Parse url %v to host=%v, ip=%v, port=%v",
+ u.String(), u.Hostname(), ips[0], port)
+
+ // Setup libsrt.
+ client := srtgo.NewSrtSocket(ips[0].To4().String(), uint16(port),
+ map[string]string{
+ "transtype": "live",
+ "tsbpdmode": "false",
+ "tlpktdrop": "false",
+ "latency": "0",
+ "streamid": fmt.Sprintf("#%v", u.Fragment),
+ },
+ )
+ defer client.Close()
+
+ if err := client.Connect(); err != nil {
+ return errors.Wrapf(err, "SRT connect to %v:%v", u.Hostname(), port)
+ }
+ logger.Tf(ctx, "Connect to SRT server %v:%v success", u.Hostname(), port)
+
+ // We should wait for a while after connected to SRT server before quit. Because SRT server use timeout
+ // to detect UDP connection status, so we should never reconnect very fast.
+ select {
+ case <-ctx.Done():
+ case <-time.After(3 * time.Second):
+ logger.Tf(ctx, "SRT publish stream success, stream=%v", u.Fragment)
+ }
+
+ if closeAfterPublished {
+ logger.Tf(ctx, "Close connection after published")
+ return nil
+ }
+
+ return nil
+}
+
+func startPublishRTMP(ctx context.Context, u *url.URL, closeAfterPublished bool) (err error) {
+ parts := strings.Split(u.Path, "/")
+ if len(parts) == 0 {
+ return errors.Errorf("invalid path %v", u.Path)
+ }
+ app, stream := strings.Join(parts[:len(parts)-1], "/"), parts[len(parts)-1]
+
+ // Parse host and port.
+ port := 1935
+ if u.Port() != "" {
+ if port, err = strconv.Atoi(u.Port()); err != nil {
+ return errors.Wrapf(err, "parse port %v", u.Port())
+ }
+ }
+
+ ips, err := net.LookupIP(u.Hostname())
+ if err != nil {
+ return errors.Wrapf(err, "lookup %v", u.Hostname())
+ }
+ if len(ips) == 0 {
+ return errors.Errorf("no ips for %v", u.Hostname())
+ }
+ logger.Tf(ctx, "Parse url %v to host=%v, ip=%v, port=%v, app=%v, stream=%v",
+ u.String(), u.Hostname(), ips[0], port, app, stream)
+
+ // Connect via TCP client.
+ c, err := net.DialTCP("tcp", nil, &net.TCPAddr{IP: ips[0], Port: port})
+ if err != nil {
+ return errors.Wrapf(err, "dial %v %v", u.Hostname(), u.Port())
+ }
+ defer c.Close()
+ logger.Tf(ctx, "Connect to RTMP server %v:%v success", u.Hostname(), port)
+
+ // RTMP Handshake.
+ rd := rand.New(rand.NewSource(time.Now().UnixNano()))
+ hs := rtmp.NewHandshake(rd)
+
+ if err := hs.WriteC0S0(c); err != nil {
+ return errors.Wrap(err, "write c0")
+ }
+ if err := hs.WriteC1S1(c); err != nil {
+ return errors.Wrap(err, "write c1")
+ }
+
+ if _, err = hs.ReadC0S0(c); err != nil {
+ return errors.Wrap(err, "read s1")
+ }
+ s1, err := hs.ReadC1S1(c)
+ if err != nil {
+ return errors.Wrap(err, "read s1")
+ }
+ if _, err = hs.ReadC2S2(c); err != nil {
+ return errors.Wrap(err, "read s2")
+ }
+
+ if err := hs.WriteC2S2(c, s1); err != nil {
+ return errors.Wrap(err, "write c2")
+ }
+ logger.Tf(ctx, "RTMP handshake with %v:%v success", ips[0], port)
+
+ // Do connect and publish.
+ client := rtmp.NewProtocol(c)
+
+ connectApp := rtmp.NewConnectAppPacket()
+ tcURL := fmt.Sprintf("rtmp://%v%v", u.Hostname(), app)
+ connectApp.CommandObject.Set("tcUrl", amf0.NewString(tcURL))
+ if err = client.WritePacket(connectApp, 1); err != nil {
+ return errors.Wrap(err, "write connect app")
+ }
+
+ var connectAppRes *rtmp.ConnectAppResPacket
+ if _, err = client.ExpectPacket(&connectAppRes); err != nil {
+ return errors.Wrap(err, "expect connect app res")
+ }
+ logger.Tf(ctx, "RTMP connect app success, tcUrl=%v", tcURL)
+
+ createStream := rtmp.NewCreateStreamPacket()
+ if err = client.WritePacket(createStream, 1); err != nil {
+ return errors.Wrap(err, "write create stream")
+ }
+
+ var createStreamRes *rtmp.CreateStreamResPacket
+ if _, err = client.ExpectPacket(&createStreamRes); err != nil {
+ return errors.Wrap(err, "expect create stream res")
+ }
+ logger.Tf(ctx, "RTMP create stream success")
+
+ publish := rtmp.NewPublishPacket()
+ publish.StreamName = *amf0.NewString(stream)
+ if err = client.WritePacket(publish, 1); err != nil {
+ return errors.Wrap(err, "write publish")
+ }
+ logger.Tf(ctx, "RTMP publish stream success, stream=%v", stream)
+
+ if closeAfterPublished {
+ logger.Tf(ctx, "Close connection after published")
+ return nil
+ }
+
+ return nil
+}
diff --git a/trunk/3rdparty/srs-bench/live/stat.go b/trunk/3rdparty/srs-bench/live/stat.go
new file mode 100644
index 0000000000..f368dfd07f
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/live/stat.go
@@ -0,0 +1,68 @@
+// The MIT License (MIT)
+//
+// # Copyright (c) 2021 Winlin
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of
+// this software and associated documentation files (the "Software"), to deal in
+// the Software without restriction, including without limitation the rights to
+// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+// the Software, and to permit persons to whom the Software is furnished to do so,
+// subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+package live
+
+import (
+ "context"
+ "encoding/json"
+ "net/http"
+ "strings"
+
+ "github.com/ossrs/go-oryx-lib/logger"
+)
+
+type statLive struct {
+ Publishers struct {
+ Expect int `json:"expect"`
+ Alive int `json:"alive"`
+ } `json:"publishers"`
+ Subscribers struct {
+ Expect int `json:"expect"`
+ Alive int `json:"alive"`
+ } `json:"subscribers"`
+ PeerConnection interface{} `json:"random-pc"`
+}
+
+var gStatLive statLive
+
+func handleStat(ctx context.Context, mux *http.ServeMux, l string) {
+ if strings.HasPrefix(l, ":") {
+ l = "127.0.0.1" + l
+ }
+
+ logger.Tf(ctx, "Handle http://%v/api/v1/sb/live", l)
+ mux.HandleFunc("/api/v1/sb/live", func(w http.ResponseWriter, r *http.Request) {
+ res := &struct {
+ Code int `json:"code"`
+ Data interface{} `json:"data"`
+ }{
+ 0, &gStatLive,
+ }
+
+ b, err := json.Marshal(res)
+ if err != nil {
+ logger.Wf(ctx, "marshal %v err %+v", res, err)
+ return
+ }
+
+ w.Write(b)
+ })
+}
diff --git a/trunk/3rdparty/srs-bench/main.go b/trunk/3rdparty/srs-bench/main.go
index e8f9786b4b..5052af2272 100644
--- a/trunk/3rdparty/srs-bench/main.go
+++ b/trunk/3rdparty/srs-bench/main.go
@@ -24,27 +24,31 @@ import (
"context"
"flag"
"fmt"
- "github.com/ossrs/go-oryx-lib/logger"
- "github.com/ossrs/srs-bench/gb28181"
- "github.com/ossrs/srs-bench/janus"
- "github.com/ossrs/srs-bench/srs"
"io/ioutil"
"os"
"os/signal"
"syscall"
+
+ "github.com/ossrs/go-oryx-lib/logger"
+ "github.com/ossrs/srs-bench/gb28181"
+ "github.com/ossrs/srs-bench/janus"
+ "github.com/ossrs/srs-bench/live"
+ "github.com/ossrs/srs-bench/srs"
)
func main() {
var sfu string
fl := flag.NewFlagSet(os.Args[0], flag.ContinueOnError)
fl.SetOutput(ioutil.Discard)
- fl.StringVar(&sfu, "sfu", "srs", "The SFU server, srs or gb28181 or janus")
+ fl.StringVar(&sfu, "sfu", "rtc", "")
_ = fl.Parse(os.Args[1:])
ctx := context.Background()
var conf interface{}
- if sfu == "srs" {
+ if sfu == "rtc" || sfu == "srs" {
srs.Parse(ctx)
+ } else if sfu == "live" {
+ live.Parse(ctx)
} else if sfu == "gb28181" {
conf = gb28181.Parse(ctx)
} else if sfu == "janus" {
@@ -52,7 +56,11 @@ func main() {
} else {
fmt.Println(fmt.Sprintf("Usage: %v [Options]", os.Args[0]))
fmt.Println(fmt.Sprintf("Options:"))
- fmt.Println(fmt.Sprintf(" -sfu The target SFU, srs or gb28181 or janus. Default: srs"))
+ fmt.Println(fmt.Sprintf(" -sfu The target server that can be rtc, live, janus, or gb28181. Default: rtc"))
+ fmt.Println(fmt.Sprintf(" rtc/srs: SRS WebRTC SFU server, for WebRTC/WHIP/WHEP."))
+ fmt.Println(fmt.Sprintf(" live: SRS live streaming server, for RTMP/HTTP-FLV/HLS."))
+ fmt.Println(fmt.Sprintf(" janus: Janus WebRTC SFU server, for janus private protocol."))
+ fmt.Println(fmt.Sprintf(" gb28181: GB media server, for GB protocol."))
os.Exit(-1)
}
@@ -67,8 +75,10 @@ func main() {
}()
var err error
- if sfu == "srs" {
+ if sfu == "rtc" || sfu == "srs" {
err = srs.Run(ctx)
+ } else if sfu == "live" {
+ err = live.Run(ctx)
} else if sfu == "gb28181" {
err = gb28181.Run(ctx, conf)
} else if sfu == "janus" {
diff --git a/trunk/3rdparty/srs-bench/srs/publisher.go b/trunk/3rdparty/srs-bench/srs/publisher.go
index 8cf7f450ae..6ef381c7ee 100644
--- a/trunk/3rdparty/srs-bench/srs/publisher.go
+++ b/trunk/3rdparty/srs-bench/srs/publisher.go
@@ -34,7 +34,7 @@ import (
)
// @see https://github.com/pion/webrtc/blob/master/examples/play-from-disk/main.go
-func startPublish(ctx context.Context, r, sourceAudio, sourceVideo string, fps int, enableAudioLevel, enableTWCC bool) error {
+func startPublish(ctx context.Context, r, sourceAudio, sourceVideo string, fps int, enableAudioLevel, enableTWCC, closeAfterPublished bool) error {
ctx = logger.WithContext(ctx)
logger.Tf(ctx, "Run publish url=%v, audio=%v, video=%v, fps=%v, audio-level=%v, twcc=%v",
@@ -77,10 +77,13 @@ func startPublish(ctx context.Context, r, sourceAudio, sourceVideo string, fps i
return nil, err
}
- if sourceAudio != "" {
+ // For CAP, we always add audio track, because both audio and video are disabled for CAP, which will
+ // cause failed when exchange SDP.
+ if sourceAudio != "" || closeAfterPublished {
aIngester = newAudioIngester(sourceAudio)
registry.Add(&rtpInteceptorFactory{aIngester.audioLevelInterceptor})
}
+
if sourceVideo != "" {
vIngester = newVideoIngester(sourceVideo)
registry.Add(&rtpInteceptorFactory{vIngester.markerInterceptor})
@@ -178,6 +181,7 @@ func startPublish(ctx context.Context, r, sourceAudio, sourceVideo string, fps i
// Wait for event from context or tracks.
var wg sync.WaitGroup
+ defer wg.Wait()
wg.Add(1)
go func() {
@@ -186,6 +190,18 @@ func startPublish(ctx context.Context, r, sourceAudio, sourceVideo string, fps i
doClose() // Interrupt the RTCP read.
}()
+ // If CAP, directly close the connection after published.
+ if closeAfterPublished {
+ select {
+ case <-ctx.Done():
+ case <-pcDoneCtx.Done():
+ }
+
+ logger.Tf(ctx, "Close connection after published")
+ cancel()
+ return nil
+ }
+
wg.Add(1)
go func() {
defer wg.Done()
@@ -295,6 +311,5 @@ func startPublish(ctx context.Context, r, sourceAudio, sourceVideo string, fps i
}
}()
- wg.Wait()
return nil
}
diff --git a/trunk/3rdparty/srs-bench/srs/rtc_test.go b/trunk/3rdparty/srs-bench/srs/rtc_test.go
index a5bf90a36c..4754720896 100644
--- a/trunk/3rdparty/srs-bench/srs/rtc_test.go
+++ b/trunk/3rdparty/srs-bench/srs/rtc_test.go
@@ -2153,8 +2153,8 @@ func TestRtcDTLS_ClientPassive_ARQ_Certificate_After_ClientHello(t *testing.T) {
// case, we corrupt the ClientHello packet sent by srs-bench.
// Note that the passive mode is not being tested as the focus is solely on testing srs-server.
//
-// [Corrupt] No.1 srs-bench: ClientHello(Epoch=0, Sequence=0), change length from 129 to 0xf.
-// No.2 srs-server: Alert (Level: Fatal, Description: Illegal Parameter)
+// [Corrupt] No.1 srs-bench: ClientHello(Epoch=0, Sequence=0), change length from 129 to 0xf.
+// No.2 srs-server: Alert (Level: Fatal, Description: Illegal Parameter)
func TestRtcDTLS_ClientActive_Corrupt_ClientHello(t *testing.T) {
ctx := logger.WithContext(context.Background())
ctx, cancel := context.WithTimeout(ctx, time.Duration(*srsTimeout)*time.Millisecond)
@@ -2209,10 +2209,11 @@ func TestRtcDTLS_ClientActive_Corrupt_ClientHello(t *testing.T) {
// case, we corrupt the ClientHello packet sent by srs-bench.
// Note that the passive mode is not being tested as the focus is solely on testing srs-server.
//
-// No.1 srs-bench: ClientHello
-// No.2 srs-server: ServerHello, Certificate, ServerKeyExchange, CertificateRequest, ServerHelloDone
-// [Corrupt] No.3 srs-bench: Certificate, ClientKeyExchange, CertificateVerify, ChangeCipherSpec, Finished
-// No.4 srs-server: Alert (Level: Fatal, Description: Illegal Parameter)
+// No.1 srs-bench: ClientHello
+// No.2 srs-server: ServerHello, Certificate, ServerKeyExchange, CertificateRequest, ServerHelloDone
+// [Corrupt] No.3 srs-bench: Certificate, ClientKeyExchange, CertificateVerify, ChangeCipherSpec, Finished
+// No.4 srs-server: Alert (Level: Fatal, Description: Illegal Parameter)
+//
// [Corrupt] No.1 srs-bench: ClientHello(Epoch=0, Sequence=0), change length from 129 to 0xf.
// No.2 srs-server: Alert (Level: Fatal, Description: Illegal Parameter)
func TestRtcDTLS_ClientActive_Corrupt_Certificate(t *testing.T) {
diff --git a/trunk/3rdparty/srs-bench/srs/srs.go b/trunk/3rdparty/srs-bench/srs/srs.go
index 648ff39e17..62f6f998b8 100644
--- a/trunk/3rdparty/srs-bench/srs/srs.go
+++ b/trunk/3rdparty/srs-bench/srs/srs.go
@@ -46,6 +46,8 @@ var clients, streams, delay int
var statListen string
+var closeAfterPublished bool
+
func Parse(ctx context.Context) {
fl := flag.NewFlagSet(os.Args[0], flag.ContinueOnError)
@@ -71,10 +73,16 @@ func Parse(ctx context.Context) {
fl.StringVar(&statListen, "stat", "", "")
+ fl.BoolVar(&closeAfterPublished, "cap", false, "")
+
fl.Usage = func() {
fmt.Println(fmt.Sprintf("Usage: %v [Options]", os.Args[0]))
fmt.Println(fmt.Sprintf("Options:"))
- fmt.Println(fmt.Sprintf(" -sfu The target SFU, srs or gb28181 or janus. Default: srs"))
+ fmt.Println(fmt.Sprintf(" -sfu The target server that can be rtc, live, janus, or gb28181. Default: rtc"))
+ fmt.Println(fmt.Sprintf(" rtc/srs: SRS WebRTC SFU server, for WebRTC/WHIP/WHEP."))
+ fmt.Println(fmt.Sprintf(" live: SRS live streaming server, for RTMP/HTTP-FLV/HLS."))
+ fmt.Println(fmt.Sprintf(" janus: Janus WebRTC SFU server, for janus private protocol."))
+ fmt.Println(fmt.Sprintf(" gb28181: GB media server, for GB protocol."))
fmt.Println(fmt.Sprintf(" -nn The number of clients to simulate. Default: 1"))
fmt.Println(fmt.Sprintf(" -sn The number of streams to simulate. Variable: %%d. Default: 1"))
fmt.Println(fmt.Sprintf(" -delay The start delay in ms for each client or stream to simulate. Default: 50"))
@@ -91,6 +99,7 @@ func Parse(ctx context.Context) {
fmt.Println(fmt.Sprintf(" -fps [Optional] The fps of .h264 source file."))
fmt.Println(fmt.Sprintf(" -sa [Optional] The file path to read audio, ignore if empty."))
fmt.Println(fmt.Sprintf(" -sv [Optional] The file path to read video, ignore if empty."))
+ fmt.Println(fmt.Sprintf(" -cap Whether to close connection after publish. Default: false"))
fmt.Println(fmt.Sprintf("\n例如,1个播放,1个推流:"))
fmt.Println(fmt.Sprintf(" %v -sr webrtc://localhost/live/livestream", os.Args[0]))
fmt.Println(fmt.Sprintf(" %v -pr webrtc://localhost/live/livestream -sa avatar.ogg -sv avatar.h264 -fps 25", os.Args[0]))
@@ -114,7 +123,7 @@ func Parse(ctx context.Context) {
if sr == "" && pr == "" {
showHelp = true
}
- if pr != "" && (sourceAudio == "" && sourceVideo == "") {
+ if pr != "" && !closeAfterPublished && (sourceAudio == "" && sourceVideo == "") {
showHelp = true
}
if showHelp {
@@ -131,8 +140,8 @@ func Parse(ctx context.Context) {
summaryDesc = fmt.Sprintf("%v, play(url=%v, da=%v, dv=%v, pli=%v)", summaryDesc, sr, dumpAudio, dumpVideo, pli)
}
if pr != "" {
- summaryDesc = fmt.Sprintf("%v, publish(url=%v, sa=%v, sv=%v, fps=%v)",
- summaryDesc, pr, sourceAudio, sourceVideo, fps)
+ summaryDesc = fmt.Sprintf("%v, publish(url=%v, sa=%v, sv=%v, fps=%v, cap=%v)",
+ summaryDesc, pr, sourceAudio, sourceVideo, fps, closeAfterPublished)
}
logger.Tf(ctx, "Run benchmark with %v", summaryDesc)
@@ -161,6 +170,7 @@ func Run(ctx context.Context) error {
// Run tasks.
var wg sync.WaitGroup
+ defer wg.Wait()
// Run STAT API server.
wg.Add(1)
@@ -266,7 +276,7 @@ func Run(ctx context.Context) error {
gStatRTC.Publishers.Alive--
}()
- if err := startPublish(ctx, pr, sourceAudio, sourceVideo, fps, audioLevel, videoTWCC); err != nil {
+ if err := startPublish(ctx, pr, sourceAudio, sourceVideo, fps, audioLevel, videoTWCC, closeAfterPublished); err != nil {
if errors.Cause(err) != context.Canceled {
logger.Wf(ctx, "Run err %+v", err)
}
@@ -276,7 +286,5 @@ func Run(ctx context.Context) error {
time.Sleep(time.Duration(delay) * time.Millisecond)
}
- wg.Wait()
-
return nil
}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/LICENSE b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/LICENSE
new file mode 100644
index 0000000000..fa0086a952
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/LICENSE
@@ -0,0 +1,373 @@
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
\ No newline at end of file
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/README.md b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/README.md
new file mode 100644
index 0000000000..27b6b547e1
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/README.md
@@ -0,0 +1,63 @@
+[![PkgGoDev](https://pkg.go.dev/badge/github.com/haivision/srtgo)](https://pkg.go.dev/github.com/haivision/srtgo)
+
+# srtgo
+
+Go bindings for [SRT](https://github.com/Haivision/srt) (Secure Reliable Transport), the open source transport technology that optimizes streaming performance across unpredictable networks.
+
+## Why srtgo?
+The purpose of srtgo is easing the adoption of SRT transport technology. Using Go, with just a few lines of code you can implement an application that sends/receives data with all the benefits of SRT technology: security and reliability, while keeping latency low.
+
+## Is this a new implementation of SRT?
+No! We are just exposing the great work done by the community in the [SRT project](https://github.com/Haivision/srt) as a golang library. All the functionality and implementation still resides in the official SRT project.
+
+
+# Features supported
+* Basic API exposed to easy develop SRT sender/receiver apps
+* Caller and Listener mode
+* Live transport type
+* File transport type
+* Message/Buffer API
+* SRT transport options up to SRT 1.4.1
+* SRT Stats retrieval
+
+# Usage
+Example of a SRT receiver application:
+``` go
+package main
+
+import (
+ "github.com/haivision/srtgo"
+ "fmt"
+)
+
+func main() {
+ options := make(map[string]string)
+ options["transtype"] = "file"
+
+ sck := srtgo.NewSrtSocket("0.0.0.0", 8090, options)
+ defer sck.Close()
+ sck.Listen(1)
+ s, _ := sck.Accept()
+ defer s.Close()
+
+ buf := make([]byte, 2048)
+ for {
+ n, _ := s.Read(buf)
+ if n == 0 {
+ break
+ }
+ fmt.Println("Received %d bytes", n)
+ }
+ //....
+}
+
+```
+
+
+# Dependencies
+
+* srtlib
+
+You can find detailed instructions about how to install srtlib in its [README file](https://github.com/Haivision/srt#requirements)
+
+gosrt has been developed with srt 1.4.1 as its main target and has been successfully tested in srt 1.3.4 and above.
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/accept.go b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/accept.go
new file mode 100644
index 0000000000..a5ca5ed5d8
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/accept.go
@@ -0,0 +1,69 @@
+package srtgo
+
+/*
+#cgo LDFLAGS: -lsrt
+#include
+
+SRTSOCKET srt_accept_wrapped(SRTSOCKET lsn, struct sockaddr* addr, int* addrlen, int *srterror, int *syserror)
+{
+ int ret = srt_accept(lsn, addr, addrlen);
+ if (ret < 0) {
+ *srterror = srt_getlasterror(syserror);
+ }
+ return ret;
+}
+
+*/
+import "C"
+import (
+ "fmt"
+ "net"
+ "syscall"
+ "unsafe"
+)
+
+func srtAcceptImpl(lsn C.SRTSOCKET, addr *C.struct_sockaddr, addrlen *C.int) (C.SRTSOCKET, error) {
+ srterr := C.int(0)
+ syserr := C.int(0)
+ socket := C.srt_accept_wrapped(lsn, addr, addrlen, &srterr, &syserr)
+ if srterr != 0 {
+ srterror := SRTErrno(srterr)
+ if syserr < 0 {
+ srterror.wrapSysErr(syscall.Errno(syserr))
+ }
+ return socket, srterror
+ }
+ return socket, nil
+}
+
+// Accept an incoming connection
+func (s SrtSocket) Accept() (*SrtSocket, *net.UDPAddr, error) {
+ var err error
+ if !s.blocking {
+ err = s.pd.wait(ModeRead)
+ if err != nil {
+ return nil, nil, err
+ }
+ }
+ var addr syscall.RawSockaddrAny
+ sclen := C.int(syscall.SizeofSockaddrAny)
+ socket, err := srtAcceptImpl(s.socket, (*C.struct_sockaddr)(unsafe.Pointer(&addr)), &sclen)
+ if err != nil {
+ return nil, nil, err
+ }
+ if socket == SRT_INVALID_SOCK {
+ return nil, nil, fmt.Errorf("srt accept, error accepting the connection: %w", srtGetAndClearError())
+ }
+
+ newSocket, err := newFromSocket(&s, socket)
+ if err != nil {
+ return nil, nil, fmt.Errorf("new socket could not be created: %w", err)
+ }
+
+ udpAddr, err := udpAddrFromSockaddr(&addr)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ return newSocket, udpAddr, nil
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/callback.h b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/callback.h
new file mode 100644
index 0000000000..0fbbfa9b65
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/callback.h
@@ -0,0 +1,7 @@
+#include
+
+int srtListenCBWrapper(void* opaque, SRTSOCKET ns, int hs_version, struct sockaddr* peeraddr, char* streamid);
+void srtConnectCBWrapper(void* opaque, SRTSOCKET ns, int errorcode, struct sockaddr* peeraddr, int token);
+
+int srtListenCB(void* opaque, SRTSOCKET ns, int hs_version, const struct sockaddr* peeraddr, const char* streamid);
+void srtConnectCB(void* opaque, SRTSOCKET ns, int errorcode, const struct sockaddr* peeraddr, int token);
\ No newline at end of file
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/callback_c.go b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/callback_c.go
new file mode 100644
index 0000000000..6932bee7ed
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/callback_c.go
@@ -0,0 +1,17 @@
+package srtgo
+
+/*
+#cgo LDFLAGS: -lsrt
+#include "callback.h"
+
+int srtListenCB(void* opaque, SRTSOCKET ns, int hs_version, const struct sockaddr* peeraddr, const char* streamid)
+{
+ return srtListenCBWrapper(opaque, ns, hs_version, (struct sockaddr*)peeraddr, (char*)streamid);
+}
+
+void srtConnectCB(void* opaque, SRTSOCKET ns, int errorcode, const struct sockaddr* peeraddr, int token)
+{
+ srtConnectCBWrapper(opaque, ns, errorcode, (struct sockaddr*)peeraddr, token);
+}
+*/
+import "C"
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/errors.go b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/errors.go
new file mode 100644
index 0000000000..069889e6e8
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/errors.go
@@ -0,0 +1,242 @@
+package srtgo
+
+/*
+#cgo LDFLAGS: -lsrt
+#include
+*/
+import "C"
+import (
+ "strconv"
+ "syscall"
+)
+
+type SrtInvalidSock struct{}
+type SrtRendezvousUnbound struct{}
+type SrtSockConnected struct{}
+type SrtConnectionRejected struct{}
+type SrtConnectTimeout struct{}
+type SrtSocketClosed struct{}
+type SrtEpollTimeout struct{}
+
+func (m *SrtInvalidSock) Error() string {
+ return "Socket u indicates no valid socket ID"
+}
+
+func (m *SrtRendezvousUnbound) Error() string {
+ return "Socket u is in rendezvous mode, but it wasn't bound"
+}
+
+func (m *SrtSockConnected) Error() string {
+ return "Socket u is already connected"
+}
+
+func (m *SrtConnectionRejected) Error() string {
+ return "Connection has been rejected"
+}
+
+func (m *SrtConnectTimeout) Error() string {
+ return "Connection has been timed out"
+}
+
+func (m *SrtSocketClosed) Error() string {
+ return "The socket has been closed"
+}
+
+func (m *SrtEpollTimeout) Error() string {
+ return "Operation has timed out"
+}
+
+func (m *SrtEpollTimeout) Timeout() bool {
+ return true
+}
+
+func (m *SrtEpollTimeout) Temporary() bool {
+ return true
+}
+
+//MUST be called from same OS thread that generated the error (i.e.: use runtime.LockOSThread())
+func srtGetAndClearError() error {
+ defer C.srt_clearlasterror()
+ eSysErrno := C.int(0)
+ errno := C.srt_getlasterror(&eSysErrno)
+ srterr := SRTErrno(errno)
+ if eSysErrno != 0 {
+ return srterr.wrapSysErr(syscall.Errno(eSysErrno))
+ }
+ return srterr
+}
+
+//Based of off golang errno handling: https://cs.opensource.google/go/go/+/refs/tags/go1.16.6:src/syscall/syscall_unix.go;l=114
+type SRTErrno int
+
+func (e SRTErrno) Error() string {
+ //Workaround for unknown being -1
+ if e == Unknown {
+ return "Internal error when setting the right error code"
+ }
+ if 0 <= int(e) && int(e) < len(srterrors) {
+ s := srterrors[e]
+ if s != "" {
+ return s
+ }
+ }
+ return "srterrno: " + strconv.Itoa(int(e))
+}
+
+func (e SRTErrno) Is(target error) bool {
+ //for backwards compat
+ switch target.(type) {
+ case *SrtInvalidSock:
+ return e == EInvSock
+ case *SrtRendezvousUnbound:
+ return e == ERdvUnbound
+ case *SrtSockConnected:
+ return e == EConnSock
+ case *SrtConnectionRejected:
+ return e == EConnRej
+ case *SrtConnectTimeout:
+ return e == ETimeout
+ case *SrtSocketClosed:
+ return e == ESClosed
+ }
+ return false
+}
+
+func (e SRTErrno) Temporary() bool {
+ return e == EAsyncFAIL || e == EAsyncRCV || e == EAsyncSND || e == ECongest || e == ETimeout
+}
+
+func (e SRTErrno) Timeout() bool {
+ return e == ETimeout
+}
+
+func (e SRTErrno) wrapSysErr(errno syscall.Errno) error {
+ return &srtErrnoSysErrnoWrapped{
+ e: e,
+ eSys: errno,
+ }
+}
+
+type srtErrnoSysErrnoWrapped struct {
+ e SRTErrno
+ eSys syscall.Errno
+}
+
+func (e *srtErrnoSysErrnoWrapped) Error() string {
+ return e.e.Error()
+}
+
+func (e *srtErrnoSysErrnoWrapped) Is(target error) bool {
+ return e.e.Is(target)
+}
+
+func (e *srtErrnoSysErrnoWrapped) Temporary() bool {
+ return e.e.Temporary()
+}
+
+func (e *srtErrnoSysErrnoWrapped) Timeout() bool {
+ return e.e.Timeout()
+}
+
+func (e *srtErrnoSysErrnoWrapped) Unwrap() error {
+ return error(e.eSys)
+}
+
+//Shadows SRT_ERRNO srtcore/srt.h line 490+
+const (
+ Unknown = SRTErrno(C.SRT_EUNKNOWN)
+ Success = SRTErrno(C.SRT_SUCCESS)
+ //Major: SETUP
+ EConnSetup = SRTErrno(C.SRT_ECONNSETUP)
+ ENoServer = SRTErrno(C.SRT_ENOSERVER)
+ EConnRej = SRTErrno(C.SRT_ECONNREJ)
+ ESockFail = SRTErrno(C.SRT_ESOCKFAIL)
+ ESecFail = SRTErrno(C.SRT_ESECFAIL)
+ ESClosed = SRTErrno(C.SRT_ESCLOSED)
+ //Major: CONNECTION
+ EConnFail = SRTErrno(C.SRT_ECONNFAIL)
+ EConnLost = SRTErrno(C.SRT_ECONNLOST)
+ ENoConn = SRTErrno(C.SRT_ENOCONN)
+ //Major: SYSTEMRES
+ EResource = SRTErrno(C.SRT_ERESOURCE)
+ EThread = SRTErrno(C.SRT_ETHREAD)
+ EnoBuf = SRTErrno(C.SRT_ENOBUF)
+ ESysObj = SRTErrno(C.SRT_ESYSOBJ)
+ //Major: FILESYSTEM
+ EFile = SRTErrno(C.SRT_EFILE)
+ EInvRdOff = SRTErrno(C.SRT_EINVRDOFF)
+ ERdPerm = SRTErrno(C.SRT_ERDPERM)
+ EInvWrOff = SRTErrno(C.SRT_EINVWROFF)
+ EWrPerm = SRTErrno(C.SRT_EWRPERM)
+ //Major: NOTSUP
+ EInvOp = SRTErrno(C.SRT_EINVOP)
+ EBoundSock = SRTErrno(C.SRT_EBOUNDSOCK)
+ EConnSock = SRTErrno(C.SRT_ECONNSOCK)
+ EInvParam = SRTErrno(C.SRT_EINVPARAM)
+ EInvSock = SRTErrno(C.SRT_EINVSOCK)
+ EUnboundSock = SRTErrno(C.SRT_EUNBOUNDSOCK)
+ ENoListen = SRTErrno(C.SRT_ENOLISTEN)
+ ERdvNoServ = SRTErrno(C.SRT_ERDVNOSERV)
+ ERdvUnbound = SRTErrno(C.SRT_ERDVUNBOUND)
+ EInvalMsgAPI = SRTErrno(C.SRT_EINVALMSGAPI)
+ EInvalBufferAPI = SRTErrno(C.SRT_EINVALBUFFERAPI)
+ EDupListen = SRTErrno(C.SRT_EDUPLISTEN)
+ ELargeMsg = SRTErrno(C.SRT_ELARGEMSG)
+ EInvPollID = SRTErrno(C.SRT_EINVPOLLID)
+ EPollEmpty = SRTErrno(C.SRT_EPOLLEMPTY)
+ //EBindConflict = SRTErrno(C.SRT_EBINDCONFLICT)
+ //Major: AGAIN
+ EAsyncFAIL = SRTErrno(C.SRT_EASYNCFAIL)
+ EAsyncSND = SRTErrno(C.SRT_EASYNCSND)
+ EAsyncRCV = SRTErrno(C.SRT_EASYNCRCV)
+ ETimeout = SRTErrno(C.SRT_ETIMEOUT)
+ ECongest = SRTErrno(C.SRT_ECONGEST)
+ //Major: PEERERROR
+ EPeer = SRTErrno(C.SRT_EPEERERR)
+)
+
+//Unknown cannot be here since it would have a negative index!
+//Error strings taken from: https://github.com/Haivision/srt/blob/master/docs/API/API-functions.md
+var srterrors = [...]string{
+ Success: "The value set when the last error was cleared and no error has occurred since then",
+ EConnSetup: "General setup error resulting from internal system state",
+ ENoServer: "Connection timed out while attempting to connect to the remote address",
+ EConnRej: "Connection has been rejected",
+ ESockFail: "An error occurred when trying to call a system function on an internally used UDP socket",
+ ESecFail: "A possible tampering with the handshake packets was detected, or encryption request wasn't properly fulfilled.",
+ ESClosed: "A socket that was vital for an operation called in blocking mode has been closed during the operation",
+ EConnFail: "General connection failure of unknown details",
+ EConnLost: "The socket was properly connected, but the connection has been broken",
+ ENoConn: "The socket is not connected",
+ EResource: "System or standard library error reported unexpectedly for unknown purpose",
+ EThread: "System was unable to spawn a new thread when requried",
+ EnoBuf: "System was unable to allocate memory for buffers",
+ ESysObj: "System was unable to allocate system specific objects",
+ EFile: "General filesystem error (for functions operating with file transmission)",
+ EInvRdOff: "Failure when trying to read from a given position in the file",
+ ERdPerm: "Read permission was denied when trying to read from file",
+ EInvWrOff: "Failed to set position in the written file",
+ EWrPerm: "Write permission was denied when trying to write to a file",
+ EInvOp: "Invalid operation performed for the current state of a socket",
+ EBoundSock: "The socket is currently bound and the required operation cannot be performed in this state",
+ EConnSock: "The socket is currently connected and therefore performing the required operation is not possible",
+ EInvParam: "Call parameters for API functions have some requirements that were not satisfied",
+ EInvSock: "The API function required an ID of an entity (socket or group) and it was invalid",
+ EUnboundSock: "The operation to be performed on a socket requires that it first be explicitly bound",
+ ENoListen: "The socket passed for the operation is required to be in the listen state",
+ ERdvNoServ: "The required operation cannot be performed when the socket is set to rendezvous mode",
+ ERdvUnbound: "An attempt was made to connect to a socket set to rendezvous mode that was not first bound",
+ EInvalMsgAPI: "The function was used incorrectly in the message API",
+ EInvalBufferAPI: "The function was used incorrectly in the stream (buffer) API",
+ EDupListen: "The port tried to be bound for listening is already busy",
+ ELargeMsg: "Size exceeded",
+ EInvPollID: "The epoll ID passed to an epoll function is invalid",
+ EPollEmpty: "The epoll container currently has no subscribed sockets",
+ //EBindConflict: "SRT_EBINDCONFLICT",
+ EAsyncFAIL: "General asynchronous failure (not in use currently)",
+ EAsyncSND: "Sending operation is not ready to perform",
+ EAsyncRCV: "Receiving operation is not ready to perform",
+ ETimeout: "The operation timed out",
+ ECongest: "With SRTO_TSBPDMODE and SRTO_TLPKTDROP set to true, some packets were dropped by sender",
+ EPeer: "Receiver peer is writing to a file that the agent is sending",
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/logging.go b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/logging.go
new file mode 100644
index 0000000000..948863b63f
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/logging.go
@@ -0,0 +1,66 @@
+package srtgo
+
+/*
+#cgo LDFLAGS: -lsrt
+#include
+extern void srtLogCB(void* opaque, int level, const char* file, int line, const char* area, const char* message);
+*/
+import "C"
+
+import (
+ "sync"
+ "unsafe"
+
+ gopointer "github.com/mattn/go-pointer"
+)
+
+type LogCallBackFunc func(level SrtLogLevel, file string, line int, area, message string)
+
+type SrtLogLevel int
+
+const (
+ // SrtLogLevelEmerg = int(C.LOG_EMERG)
+ // SrtLogLevelAlert = int(C.LOG_ALERT)
+ SrtLogLevelCrit SrtLogLevel = SrtLogLevel(C.LOG_CRIT)
+ SrtLogLevelErr SrtLogLevel = SrtLogLevel(C.LOG_ERR)
+ SrtLogLevelWarning SrtLogLevel = SrtLogLevel(C.LOG_WARNING)
+ SrtLogLevelNotice SrtLogLevel = SrtLogLevel(C.LOG_NOTICE)
+ SrtLogLevelInfo SrtLogLevel = SrtLogLevel(C.LOG_INFO)
+ SrtLogLevelDebug SrtLogLevel = SrtLogLevel(C.LOG_DEBUG)
+ SrtLogLevelTrace SrtLogLevel = SrtLogLevel(8)
+)
+
+var (
+ logCBPtr unsafe.Pointer = nil
+ logCBPtrLock sync.Mutex
+)
+
+//export srtLogCBWrapper
+func srtLogCBWrapper(arg unsafe.Pointer, level C.int, file *C.char, line C.int, area, message *C.char) {
+ userCB := gopointer.Restore(arg).(LogCallBackFunc)
+ go userCB(SrtLogLevel(level), C.GoString(file), int(line), C.GoString(area), C.GoString(message))
+}
+
+func SrtSetLogLevel(level SrtLogLevel) {
+ C.srt_setloglevel(C.int(level))
+}
+
+func SrtSetLogHandler(cb LogCallBackFunc) {
+ ptr := gopointer.Save(cb)
+ C.srt_setloghandler(ptr, (*C.SRT_LOG_HANDLER_FN)(C.srtLogCB))
+ storeLogCBPtr(ptr)
+}
+
+func SrtUnsetLogHandler() {
+ C.srt_setloghandler(nil, nil)
+ storeLogCBPtr(nil)
+}
+
+func storeLogCBPtr(ptr unsafe.Pointer) {
+ logCBPtrLock.Lock()
+ defer logCBPtrLock.Unlock()
+ if logCBPtr != nil {
+ gopointer.Unref(logCBPtr)
+ }
+ logCBPtr = ptr
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/logging_c.go b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/logging_c.go
new file mode 100644
index 0000000000..d804c1b83e
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/logging_c.go
@@ -0,0 +1,14 @@
+package srtgo
+
+/*
+#cgo LDFLAGS: -lsrt
+#include
+
+extern void srtLogCBWrapper (void* opaque, int level, char* file, int line, char* area, char* message);
+
+void srtLogCB(void* opaque, int level, const char* file, int line, const char* area, const char* message)
+{
+ srtLogCBWrapper(opaque, level, (char*)file, line, (char*)area,(char*) message);
+}
+*/
+import "C"
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/netutils.go b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/netutils.go
new file mode 100644
index 0000000000..ef23d00e94
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/netutils.go
@@ -0,0 +1,87 @@
+package srtgo
+
+//#include
+import "C"
+
+import (
+ "encoding/binary"
+ "fmt"
+ "net"
+ "syscall"
+ "unsafe"
+)
+
+func ntohs(val uint16) uint16 {
+ tmp := ((*[unsafe.Sizeof(val)]byte)(unsafe.Pointer(&val)))
+ return binary.BigEndian.Uint16((*tmp)[:])
+}
+
+func udpAddrFromSockaddr(addr *syscall.RawSockaddrAny) (*net.UDPAddr, error) {
+ var udpAddr net.UDPAddr
+
+ switch addr.Addr.Family {
+ case afINET6:
+ ptr := (*syscall.RawSockaddrInet6)(unsafe.Pointer(addr))
+ udpAddr.Port = int(ntohs(ptr.Port))
+ udpAddr.IP = ptr.Addr[:]
+
+ case afINET4:
+ ptr := (*syscall.RawSockaddrInet4)(unsafe.Pointer(addr))
+ udpAddr.Port = int(ntohs(ptr.Port))
+ udpAddr.IP = net.IPv4(
+ ptr.Addr[0],
+ ptr.Addr[1],
+ ptr.Addr[2],
+ ptr.Addr[3],
+ )
+ default:
+ return nil, fmt.Errorf("unknown address family: %v", addr.Addr.Family)
+ }
+
+ return &udpAddr, nil
+}
+
+func sockAddrFromIp4(ip net.IP, port uint16) (*C.struct_sockaddr, int, error) {
+ var raw syscall.RawSockaddrInet4
+ raw.Family = afINET4
+
+ p := (*[2]byte)(unsafe.Pointer(&raw.Port))
+ p[0] = byte(port >> 8)
+ p[1] = byte(port)
+
+ copy(raw.Addr[:], ip.To4())
+
+ return (*C.struct_sockaddr)(unsafe.Pointer(&raw)), int(sizeofSockAddrInet4), nil
+}
+
+func sockAddrFromIp6(ip net.IP, port uint16) (*C.struct_sockaddr, int, error) {
+ var raw syscall.RawSockaddrInet6
+ raw.Family = afINET6
+
+ p := (*[2]byte)(unsafe.Pointer(&raw.Port))
+ p[0] = byte(port >> 8)
+ p[1] = byte(port)
+
+ copy(raw.Addr[:], ip.To16())
+
+ return (*C.struct_sockaddr)(unsafe.Pointer(&raw)), int(sizeofSockAddrInet6), nil
+}
+
+func CreateAddrInet(name string, port uint16) (*C.struct_sockaddr, int, error) {
+ ip := net.ParseIP(name)
+ if ip == nil {
+ ips, err := net.LookupIP(name)
+ if err != nil {
+ return nil, 0, fmt.Errorf("Error in CreateAddrInet, LookupIP")
+ }
+ ip = ips[0]
+ }
+
+ if ip.To4() != nil {
+ return sockAddrFromIp4(ip, port)
+ } else if ip.To16() != nil {
+ return sockAddrFromIp6(ip, port)
+ }
+
+ return nil, 0, fmt.Errorf("Error in CreateAddrInet, LookupIP")
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/netutils_unix.go b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/netutils_unix.go
new file mode 100644
index 0000000000..4950a2c5ca
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/netutils_unix.go
@@ -0,0 +1,17 @@
+//go:build !windows
+
+package srtgo
+
+import (
+ "syscall"
+
+ "golang.org/x/sys/unix"
+)
+
+const (
+ sizeofSockAddrInet4 = syscall.SizeofSockaddrInet4
+ sizeofSockAddrInet6 = syscall.SizeofSockaddrInet6
+ sizeofSockaddrAny = syscall.SizeofSockaddrAny
+ afINET4 = unix.AF_INET
+ afINET6 = unix.AF_INET6
+)
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/netutils_windows.go b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/netutils_windows.go
new file mode 100644
index 0000000000..c022f73054
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/netutils_windows.go
@@ -0,0 +1,29 @@
+//go:build windows
+
+package srtgo
+
+import (
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+const (
+ afINET4 = windows.AF_INET
+ afINET6 = windows.AF_INET6
+)
+
+var (
+ sizeofSockAddrInet4 uint64 = 0
+ sizeofSockAddrInet6 uint64 = 0
+ sizeofSockaddrAny uint64 = 0
+)
+
+func init() {
+ inet4 := windows.RawSockaddrInet4{}
+ inet6 := windows.RawSockaddrInet6{}
+ any := windows.RawSockaddrAny{}
+ sizeofSockAddrInet4 = uint64(unsafe.Sizeof(inet4))
+ sizeofSockAddrInet6 = uint64(unsafe.Sizeof(inet6))
+ sizeofSockaddrAny = uint64(unsafe.Sizeof(any))
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/poll.go b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/poll.go
new file mode 100644
index 0000000000..336f686fff
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/poll.go
@@ -0,0 +1,269 @@
+package srtgo
+
+/*
+#cgo LDFLAGS: -lsrt
+#include
+*/
+import "C"
+import (
+ "sync"
+ "sync/atomic"
+ "time"
+)
+
+const (
+ pollDefault = int32(iota)
+ pollReady = int32(iota)
+ pollWait = int32(iota)
+)
+
+type PollMode int
+
+const (
+ ModeRead = PollMode(iota)
+ ModeWrite
+)
+
+/*
+ pollDesc contains the polling state for the associated SrtSocket
+ closing: socket is closing, reject all poll operations
+ pollErr: an error occured on the socket, indicates it's not useable anymore.
+ unblockRd: is used to unblock the poller when the socket becomes ready for io
+ rdState: polling state for read operations
+ rdDeadline: deadline in NS before poll operation times out, -1 means timedout (needs to be cleared), 0 is without timeout
+ rdSeq: sequence number protects against spurious signalling of timeouts when timer is reset.
+ rdTimer: timer used to enforce deadline.
+*/
+type pollDesc struct {
+ lock sync.Mutex
+ closing bool
+ fd C.SRTSOCKET
+ pollErr bool
+ unblockRd chan interface{}
+ rdState int32
+ rdLock sync.Mutex
+ rdDeadline int64
+ rdSeq int64
+ rdTimer *time.Timer
+ rtSeq int64
+ unblockWr chan interface{}
+ wrState int32
+ wrLock sync.Mutex
+ wdDeadline int64
+ wdSeq int64
+ wdTimer *time.Timer
+ wtSeq int64
+ pollS *pollServer
+}
+
+var pdPool = sync.Pool{
+ New: func() interface{} {
+ return &pollDesc{
+ unblockRd: make(chan interface{}, 1),
+ unblockWr: make(chan interface{}, 1),
+ rdTimer: time.NewTimer(0),
+ wdTimer: time.NewTimer(0),
+ }
+ },
+}
+
+func pollDescInit(s C.SRTSOCKET) *pollDesc {
+ pd := pdPool.Get().(*pollDesc)
+ pd.lock.Lock()
+ defer pd.lock.Unlock()
+ pd.fd = s
+ pd.rdState = pollDefault
+ pd.wrState = pollDefault
+ pd.pollS = pollServerCtx()
+ pd.closing = false
+ pd.pollErr = false
+ pd.rdSeq++
+ pd.wdSeq++
+ pd.pollS.pollOpen(pd)
+ return pd
+}
+
+func (pd *pollDesc) release() {
+ pd.lock.Lock()
+ defer pd.lock.Unlock()
+ if !pd.closing || pd.rdState == pollWait || pd.wrState == pollWait {
+ panic("returning open or blocked upon pollDesc")
+ }
+ pd.fd = 0
+ pdPool.Put(pd)
+}
+
+func (pd *pollDesc) wait(mode PollMode) error {
+ defer pd.reset(mode)
+ if err := pd.checkPollErr(mode); err != nil {
+ return err
+ }
+ state := &pd.rdState
+ unblockChan := pd.unblockRd
+ expiryChan := pd.rdTimer.C
+ timerSeq := int64(0)
+ pd.lock.Lock()
+ if mode == ModeRead {
+ timerSeq = pd.rtSeq
+ pd.rdLock.Lock()
+ defer pd.rdLock.Unlock()
+ } else if mode == ModeWrite {
+ timerSeq = pd.wtSeq
+ state = &pd.wrState
+ unblockChan = pd.unblockWr
+ expiryChan = pd.wdTimer.C
+ pd.wrLock.Lock()
+ defer pd.wrLock.Unlock()
+ }
+
+ for {
+ old := *state
+ if old == pollReady {
+ *state = pollDefault
+ pd.lock.Unlock()
+ return nil
+ }
+ if atomic.CompareAndSwapInt32(state, pollDefault, pollWait) {
+ break
+ }
+ }
+ pd.lock.Unlock()
+
+wait:
+ for {
+ select {
+ case <-unblockChan:
+ break wait
+ case <-expiryChan:
+ pd.lock.Lock()
+ if mode == ModeRead {
+ if timerSeq == pd.rdSeq {
+ pd.rdDeadline = -1
+ pd.lock.Unlock()
+ break wait
+ }
+ timerSeq = pd.rtSeq
+ }
+ if mode == ModeWrite {
+ if timerSeq == pd.wdSeq {
+ pd.wdDeadline = -1
+ pd.lock.Unlock()
+ break wait
+ }
+ timerSeq = pd.wtSeq
+ }
+ pd.lock.Unlock()
+ }
+ }
+ err := pd.checkPollErr(mode)
+ return err
+}
+
+func (pd *pollDesc) close() {
+ pd.lock.Lock()
+ defer pd.lock.Unlock()
+ if pd.closing {
+ return
+ }
+ pd.closing = true
+ pd.pollS.pollClose(pd)
+}
+
+func (pd *pollDesc) checkPollErr(mode PollMode) error {
+ pd.lock.Lock()
+ defer pd.lock.Unlock()
+ if pd.closing {
+ return &SrtSocketClosed{}
+ }
+
+ if mode == ModeRead && pd.rdDeadline < 0 || mode == ModeWrite && pd.wdDeadline < 0 {
+ return &SrtEpollTimeout{}
+ }
+
+ if pd.pollErr {
+ return &SrtSocketClosed{}
+ }
+
+ return nil
+}
+
+func (pd *pollDesc) setDeadline(t time.Time, mode PollMode) {
+ pd.lock.Lock()
+ defer pd.lock.Unlock()
+ var d int64
+ if !t.IsZero() {
+ d = int64(time.Until(t))
+ if d == 0 {
+ d = -1
+ }
+ }
+ if mode == ModeRead || mode == ModeRead+ModeWrite {
+ pd.rdSeq++
+ pd.rtSeq = pd.rdSeq
+ if pd.rdDeadline > 0 {
+ pd.rdTimer.Stop()
+ }
+ pd.rdDeadline = d
+ if d > 0 {
+ pd.rdTimer.Reset(time.Duration(d))
+ }
+ if d < 0 {
+ pd.unblock(ModeRead, false, false)
+ }
+ }
+ if mode == ModeWrite || mode == ModeRead+ModeWrite {
+ pd.wdSeq++
+ pd.wtSeq = pd.wdSeq
+ if pd.wdDeadline > 0 {
+ pd.wdTimer.Stop()
+ }
+ pd.wdDeadline = d
+ if d > 0 {
+ pd.wdTimer.Reset(time.Duration(d))
+ }
+ if d < 0 {
+ pd.unblock(ModeWrite, false, false)
+ }
+ }
+}
+
+func (pd *pollDesc) unblock(mode PollMode, pollerr, ioready bool) {
+ if pollerr {
+ pd.lock.Lock()
+ pd.pollErr = pollerr
+ pd.lock.Unlock()
+ }
+ state := &pd.rdState
+ unblockChan := pd.unblockRd
+ if mode == ModeWrite {
+ state = &pd.wrState
+ unblockChan = pd.unblockWr
+ }
+ pd.lock.Lock()
+ old := atomic.LoadInt32(state)
+ if ioready {
+ atomic.StoreInt32(state, pollReady)
+ }
+ pd.lock.Unlock()
+ if old == pollWait {
+ //make sure we never block here
+ select {
+ case unblockChan <- struct{}{}:
+ //
+ default:
+ //
+ }
+ }
+}
+
+func (pd *pollDesc) reset(mode PollMode) {
+ if mode == ModeRead {
+ pd.rdLock.Lock()
+ pd.rdState = pollDefault
+ pd.rdLock.Unlock()
+ } else if mode == ModeWrite {
+ pd.wrLock.Lock()
+ pd.wrState = pollDefault
+ pd.wrLock.Unlock()
+ }
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/pollserver.go b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/pollserver.go
new file mode 100644
index 0000000000..4c04da5672
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/pollserver.go
@@ -0,0 +1,109 @@
+package srtgo
+
+/*
+#cgo LDFLAGS: -lsrt
+#include
+*/
+import "C"
+
+import (
+ "sync"
+ "unsafe"
+)
+
+var (
+ phctx *pollServer
+ once sync.Once
+)
+
+func pollServerCtx() *pollServer {
+ once.Do(pollServerCtxInit)
+ return phctx
+}
+
+func pollServerCtxInit() {
+ eid := C.srt_epoll_create()
+ C.srt_epoll_set(eid, C.SRT_EPOLL_ENABLE_EMPTY)
+ phctx = &pollServer{
+ srtEpollDescr: eid,
+ pollDescs: make(map[C.SRTSOCKET]*pollDesc),
+ }
+ go phctx.run()
+}
+
+type pollServer struct {
+ srtEpollDescr C.int
+ pollDescLock sync.Mutex
+ pollDescs map[C.SRTSOCKET]*pollDesc
+}
+
+func (p *pollServer) pollOpen(pd *pollDesc) {
+ //use uint because otherwise with ET it would overflow :/ (srt should accept an uint instead, or fix it's SRT_EPOLL_ET definition)
+ events := C.uint(C.SRT_EPOLL_IN | C.SRT_EPOLL_OUT | C.SRT_EPOLL_ERR | C.SRT_EPOLL_ET)
+ //via unsafe.Pointer because we cannot cast *C.uint to *C.int directly
+ //block poller
+ p.pollDescLock.Lock()
+ ret := C.srt_epoll_add_usock(p.srtEpollDescr, pd.fd, (*C.int)(unsafe.Pointer(&events)))
+ if ret == -1 {
+ panic("ERROR ADDING FD TO EPOLL")
+ }
+ p.pollDescs[pd.fd] = pd
+ p.pollDescLock.Unlock()
+}
+
+func (p *pollServer) pollClose(pd *pollDesc) {
+ sockstate := C.srt_getsockstate(pd.fd)
+ //Broken/closed sockets get removed internally by SRT lib
+ if sockstate == C.SRTS_BROKEN || sockstate == C.SRTS_CLOSING || sockstate == C.SRTS_CLOSED || sockstate == C.SRTS_NONEXIST {
+ return
+ }
+ ret := C.srt_epoll_remove_usock(p.srtEpollDescr, pd.fd)
+ if ret == -1 {
+ panic("ERROR REMOVING FD FROM EPOLL")
+ }
+ p.pollDescLock.Lock()
+ delete(p.pollDescs, pd.fd)
+ p.pollDescLock.Unlock()
+}
+
+func init() {
+
+}
+
+func (p *pollServer) run() {
+ timeoutMs := C.int64_t(-1)
+ fds := [128]C.SRT_EPOLL_EVENT{}
+ fdlen := C.int(128)
+ for {
+ res := C.srt_epoll_uwait(p.srtEpollDescr, &fds[0], fdlen, timeoutMs)
+ if res == 0 {
+ continue //Shouldn't happen with -1
+ } else if res == -1 {
+ panic("srt_epoll_error")
+ } else if res > 0 {
+ max := int(res)
+ if fdlen < res {
+ max = int(fdlen)
+ }
+ p.pollDescLock.Lock()
+ for i := 0; i < max; i++ {
+ s := fds[i].fd
+ events := fds[i].events
+
+ pd := p.pollDescs[s]
+ if events&C.SRT_EPOLL_ERR != 0 {
+ pd.unblock(ModeRead, true, false)
+ pd.unblock(ModeWrite, true, false)
+ continue
+ }
+ if events&C.SRT_EPOLL_IN != 0 {
+ pd.unblock(ModeRead, false, true)
+ }
+ if events&C.SRT_EPOLL_OUT != 0 {
+ pd.unblock(ModeWrite, false, true)
+ }
+ }
+ p.pollDescLock.Unlock()
+ }
+ }
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/read.go b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/read.go
new file mode 100644
index 0000000000..0378dadbf3
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/read.go
@@ -0,0 +1,54 @@
+package srtgo
+
+/*
+#cgo LDFLAGS: -lsrt
+#include
+
+int srt_recvmsg2_wrapped(SRTSOCKET u, char* buf, int len, SRT_MSGCTRL *mctrl, int *srterror, int *syserror)
+{
+ int ret = srt_recvmsg2(u, buf, len, mctrl);
+ if (ret < 0) {
+ *srterror = srt_getlasterror(syserror);
+ }
+ return ret;
+}
+
+*/
+import "C"
+import (
+ "errors"
+ "syscall"
+ "unsafe"
+)
+
+func srtRecvMsg2Impl(u C.SRTSOCKET, buf []byte, msgctrl *C.SRT_MSGCTRL) (n int, err error) {
+ srterr := C.int(0)
+ syserr := C.int(0)
+ n = int(C.srt_recvmsg2_wrapped(u, (*C.char)(unsafe.Pointer(&buf[0])), C.int(len(buf)), msgctrl, &srterr, &syserr))
+ if n < 0 {
+ srterror := SRTErrno(srterr)
+ if syserr < 0 {
+ srterror.wrapSysErr(syscall.Errno(syserr))
+ }
+ err = srterror
+ n = 0
+ }
+ return
+}
+
+// Read data from the SRT socket
+func (s SrtSocket) Read(b []byte) (n int, err error) {
+ //Fastpath
+ if !s.blocking {
+ s.pd.reset(ModeRead)
+ }
+ n, err = srtRecvMsg2Impl(s.socket, b, nil)
+
+ for {
+ if !errors.Is(err, error(EAsyncRCV)) || s.blocking {
+ return
+ }
+ s.pd.wait(ModeRead)
+ n, err = srtRecvMsg2Impl(s.socket, b, nil)
+ }
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/srtgo.go b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/srtgo.go
new file mode 100644
index 0000000000..d7791c80d6
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/srtgo.go
@@ -0,0 +1,578 @@
+package srtgo
+
+/*
+#cgo LDFLAGS: -lsrt
+#include
+#include
+#include "callback.h"
+static const SRTSOCKET get_srt_invalid_sock() { return SRT_INVALID_SOCK; };
+static const int get_srt_error() { return SRT_ERROR; };
+static const int get_srt_error_reject_predefined() { return SRT_REJC_PREDEFINED; };
+static const int get_srt_error_reject_userdefined() { return SRT_REJC_USERDEFINED; };
+*/
+import "C"
+
+import (
+ "errors"
+ "fmt"
+ "net"
+ "runtime"
+ "strconv"
+ "sync"
+ "syscall"
+ "time"
+ "unsafe"
+
+ gopointer "github.com/mattn/go-pointer"
+)
+
+// SRT Socket mode
+const (
+ ModeFailure = iota
+ ModeListener
+ ModeCaller
+ ModeRendezvouz
+)
+
+// Binding ops
+const (
+ bindingPre = 0
+ bindingPost = 1
+)
+
+// SrtSocket - SRT socket
+type SrtSocket struct {
+ socket C.int
+ blocking bool
+ pd *pollDesc
+ host string
+ port uint16
+ options map[string]string
+ mode int
+ pktSize int
+ pollTimeout int64
+}
+
+var (
+ callbackMutex sync.Mutex
+ listenCallbackMap map[C.int]unsafe.Pointer = make(map[C.int]unsafe.Pointer)
+ connectCallbackMap map[C.int]unsafe.Pointer = make(map[C.int]unsafe.Pointer)
+)
+
+// Static consts from library
+var (
+ SRT_INVALID_SOCK = C.get_srt_invalid_sock()
+ SRT_ERROR = C.get_srt_error()
+ SRTS_CONNECTED = C.SRTS_CONNECTED
+)
+
+const defaultPacketSize = 1456
+
+// InitSRT - Initialize srt library
+func InitSRT() {
+ C.srt_startup()
+}
+
+// CleanupSRT - Cleanup SRT lib
+func CleanupSRT() {
+ C.srt_cleanup()
+}
+
+// NewSrtSocket - Create a new SRT Socket
+func NewSrtSocket(host string, port uint16, options map[string]string) *SrtSocket {
+ s := new(SrtSocket)
+
+ s.socket = C.srt_create_socket()
+ if s.socket == SRT_INVALID_SOCK {
+ return nil
+ }
+
+ s.host = host
+ s.port = port
+ s.options = options
+ s.pollTimeout = -1
+
+ val, exists := options["pktsize"]
+ if exists {
+ pktSize, err := strconv.Atoi(val)
+ if err != nil {
+ s.pktSize = pktSize
+ }
+ }
+ if s.pktSize <= 0 {
+ s.pktSize = defaultPacketSize
+ }
+
+ val, exists = options["blocking"]
+ if exists && val != "0" {
+ s.blocking = true
+ }
+
+ if !s.blocking {
+ s.pd = pollDescInit(s.socket)
+ }
+
+ finalizer := func(obj interface{}) {
+ sf := obj.(*SrtSocket)
+ sf.Close()
+ if sf.pd != nil {
+ sf.pd.release()
+ }
+ }
+
+ //Cleanup SrtSocket if no references exist anymore
+ runtime.SetFinalizer(s, finalizer)
+
+ var err error
+ s.mode, err = s.preconfiguration()
+ if err != nil {
+ return nil
+ }
+
+ return s
+}
+
+func newFromSocket(acceptSocket *SrtSocket, socket C.SRTSOCKET) (*SrtSocket, error) {
+ s := new(SrtSocket)
+ s.socket = socket
+ s.pktSize = acceptSocket.pktSize
+ s.blocking = acceptSocket.blocking
+ s.pollTimeout = acceptSocket.pollTimeout
+
+ err := acceptSocket.postconfiguration(s)
+ if err != nil {
+ return nil, err
+ }
+
+ if !s.blocking {
+ s.pd = pollDescInit(s.socket)
+ }
+
+ finalizer := func(obj interface{}) {
+ sf := obj.(*SrtSocket)
+ sf.Close()
+ if sf.pd != nil {
+ sf.pd.release()
+ }
+ }
+
+ //Cleanup SrtSocket if no references exist anymore
+ runtime.SetFinalizer(s, finalizer)
+
+ return s, nil
+}
+
+func (s SrtSocket) GetSocket() C.int {
+ return s.socket
+}
+
+// Listen for incoming connections. The backlog setting defines how many sockets
+// may be allowed to wait until they are accepted (excessive connection requests
+// are rejected in advance)
+func (s *SrtSocket) Listen(backlog int) error {
+ runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
+ nbacklog := C.int(backlog)
+
+ sa, salen, err := CreateAddrInet(s.host, s.port)
+ if err != nil {
+ return err
+ }
+
+ res := C.srt_bind(s.socket, sa, C.int(salen))
+ if res == SRT_ERROR {
+ C.srt_close(s.socket)
+ return fmt.Errorf("Error in srt_bind: %w", srtGetAndClearError())
+ }
+
+ res = C.srt_listen(s.socket, nbacklog)
+ if res == SRT_ERROR {
+ C.srt_close(s.socket)
+ return fmt.Errorf("Error in srt_listen: %w", srtGetAndClearError())
+ }
+
+ err = s.postconfiguration(s)
+ if err != nil {
+ return fmt.Errorf("Error setting post socket options")
+ }
+
+ return nil
+}
+
+// Connect to a remote endpoint
+func (s *SrtSocket) Connect() error {
+ runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
+ sa, salen, err := CreateAddrInet(s.host, s.port)
+ if err != nil {
+ return err
+ }
+
+ res := C.srt_connect(s.socket, sa, C.int(salen))
+ if res == SRT_ERROR {
+ C.srt_close(s.socket)
+ return srtGetAndClearError()
+ }
+
+ if !s.blocking {
+ if err := s.pd.wait(ModeWrite); err != nil {
+ return err
+ }
+ }
+
+ err = s.postconfiguration(s)
+ if err != nil {
+ return fmt.Errorf("Error setting post socket options in connect")
+ }
+
+ return nil
+}
+
+// Stats - Retrieve stats from the SRT socket
+func (s SrtSocket) Stats() (*SrtStats, error) {
+ runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
+ var stats C.SRT_TRACEBSTATS = C.SRT_TRACEBSTATS{}
+ var b C.int = 1
+ if C.srt_bstats(s.socket, &stats, b) == SRT_ERROR {
+ return nil, fmt.Errorf("Error getting stats, %w", srtGetAndClearError())
+ }
+
+ return newSrtStats(&stats), nil
+}
+
+// Mode - Return working mode of the SRT socket
+func (s SrtSocket) Mode() int {
+ return s.mode
+}
+
+// PacketSize - Return packet size of the SRT socket
+func (s SrtSocket) PacketSize() int {
+ return s.pktSize
+}
+
+// PollTimeout - Return polling max time, for connect/read/write operations.
+// Only applied when socket is in non-blocking mode.
+func (s SrtSocket) PollTimeout() time.Duration {
+ return time.Duration(s.pollTimeout) * time.Millisecond
+}
+
+// SetPollTimeout - Sets polling max time, for connect/read/write operations.
+// Only applied when socket is in non-blocking mode.
+func (s *SrtSocket) SetPollTimeout(pollTimeout time.Duration) {
+ s.pollTimeout = pollTimeout.Milliseconds()
+}
+
+func (s *SrtSocket) SetDeadline(deadline time.Time) {
+ s.pd.setDeadline(deadline, ModeRead+ModeWrite)
+}
+
+func (s *SrtSocket) SetReadDeadline(deadline time.Time) {
+ s.pd.setDeadline(deadline, ModeRead)
+}
+
+func (s *SrtSocket) SetWriteDeadline(deadline time.Time) {
+ s.pd.setDeadline(deadline, ModeWrite)
+}
+
+// Close the SRT socket
+func (s *SrtSocket) Close() {
+
+ C.srt_close(s.socket)
+ s.socket = SRT_INVALID_SOCK
+ if !s.blocking {
+ s.pd.close()
+ }
+ callbackMutex.Lock()
+ if ptr, exists := listenCallbackMap[s.socket]; exists {
+ gopointer.Unref(ptr)
+ }
+ if ptr, exists := connectCallbackMap[s.socket]; exists {
+ gopointer.Unref(ptr)
+ }
+ callbackMutex.Unlock()
+}
+
+// ListenCallbackFunc specifies a function to be called before a connecting socket is passed to accept
+type ListenCallbackFunc func(socket *SrtSocket, version int, addr *net.UDPAddr, streamid string) bool
+
+//export srtListenCBWrapper
+func srtListenCBWrapper(arg unsafe.Pointer, socket C.SRTSOCKET, hsVersion C.int, peeraddr *C.struct_sockaddr, streamid *C.char) C.int {
+ userCB := gopointer.Restore(arg).(ListenCallbackFunc)
+
+ s := new(SrtSocket)
+ s.socket = socket
+ udpAddr, _ := udpAddrFromSockaddr((*syscall.RawSockaddrAny)(unsafe.Pointer(peeraddr)))
+
+ if userCB(s, int(hsVersion), udpAddr, C.GoString(streamid)) {
+ return 0
+ }
+ return SRT_ERROR
+}
+
+// SetListenCallback - set a function to be called early in the handshake before a client
+// is handed to accept on a listening socket.
+// The connection can be rejected by returning false from the callback.
+// See examples/echo-receiver for more details.
+func (s SrtSocket) SetListenCallback(cb ListenCallbackFunc) {
+ ptr := gopointer.Save(cb)
+ C.srt_listen_callback(s.socket, (*C.srt_listen_callback_fn)(C.srtListenCB), ptr)
+
+ callbackMutex.Lock()
+ defer callbackMutex.Unlock()
+ if listenCallbackMap[s.socket] != nil {
+ gopointer.Unref(listenCallbackMap[s.socket])
+ }
+ listenCallbackMap[s.socket] = ptr
+}
+
+// ConnectCallbackFunc specifies a function to be called after a socket or connection in a group has failed.
+type ConnectCallbackFunc func(socket *SrtSocket, err error, addr *net.UDPAddr, token int)
+
+//export srtConnectCBWrapper
+func srtConnectCBWrapper(arg unsafe.Pointer, socket C.SRTSOCKET, errcode C.int, peeraddr *C.struct_sockaddr, token C.int) {
+ userCB := gopointer.Restore(arg).(ConnectCallbackFunc)
+
+ s := new(SrtSocket)
+ s.socket = socket
+ udpAddr, _ := udpAddrFromSockaddr((*syscall.RawSockaddrAny)(unsafe.Pointer(peeraddr)))
+
+ userCB(s, SRTErrno(errcode), udpAddr, int(token))
+}
+
+// SetConnectCallback - set a function to be called after a socket or connection in a group has failed
+// Note that the function is not guaranteed to be called if the socket is set to blocking mode.
+func (s SrtSocket) SetConnectCallback(cb ConnectCallbackFunc) {
+ ptr := gopointer.Save(cb)
+ C.srt_connect_callback(s.socket, (*C.srt_connect_callback_fn)(C.srtConnectCB), ptr)
+
+ callbackMutex.Lock()
+ defer callbackMutex.Unlock()
+ if connectCallbackMap[s.socket] != nil {
+ gopointer.Unref(connectCallbackMap[s.socket])
+ }
+ connectCallbackMap[s.socket] = ptr
+}
+
+// Rejection reasons
+var (
+ // Start of range for predefined rejection reasons
+ RejectionReasonPredefined = int(C.get_srt_error_reject_predefined())
+
+ // General syntax error in the SocketID specification (also a fallback code for undefined cases)
+ RejectionReasonBadRequest = RejectionReasonPredefined + 400
+
+ // Authentication failed, provided that the user was correctly identified and access to the required resource would be granted
+ RejectionReasonUnauthorized = RejectionReasonPredefined + 401
+
+ // The server is too heavily loaded, or you have exceeded credits for accessing the service and the resource.
+ RejectionReasonOverload = RejectionReasonPredefined + 402
+
+ // Access denied to the resource by any kind of reason
+ RejectionReasonForbidden = RejectionReasonPredefined + 403
+
+ // Resource not found at this time.
+ RejectionReasonNotFound = RejectionReasonPredefined + 404
+
+ // The mode specified in `m` key in StreamID is not supported for this request.
+ RejectionReasonBadMode = RejectionReasonPredefined + 405
+
+ // The requested parameters specified in SocketID cannot be satisfied for the requested resource. Also when m=publish and the data format is not acceptable.
+ RejectionReasonUnacceptable = RejectionReasonPredefined + 406
+
+ // Start of range for application defined rejection reasons
+ RejectionReasonUserDefined = int(C.get_srt_error_reject_predefined())
+)
+
+// SetRejectReason - set custom reason for connection reject
+func (s SrtSocket) SetRejectReason(value int) error {
+ res := C.srt_setrejectreason(s.socket, C.int(value))
+ if res == SRT_ERROR {
+ return errors.New(C.GoString(C.srt_getlasterror_str()))
+ }
+ return nil
+}
+
+// GetSockOptByte - return byte value obtained with srt_getsockopt
+func (s SrtSocket) GetSockOptByte(opt int) (byte, error) {
+ var v byte
+ l := 1
+
+ err := s.getSockOpt(opt, unsafe.Pointer(&v), &l)
+ return v, err
+}
+
+// GetSockOptBool - return bool value obtained with srt_getsockopt
+func (s SrtSocket) GetSockOptBool(opt int) (bool, error) {
+ var v int32
+ l := 4
+
+ err := s.getSockOpt(opt, unsafe.Pointer(&v), &l)
+ if v == 1 {
+ return true, err
+ }
+
+ return false, err
+}
+
+// GetSockOptInt - return int value obtained with srt_getsockopt
+func (s SrtSocket) GetSockOptInt(opt int) (int, error) {
+ var v int32
+ l := 4
+
+ err := s.getSockOpt(opt, unsafe.Pointer(&v), &l)
+ return int(v), err
+}
+
+// GetSockOptInt64 - return int64 value obtained with srt_getsockopt
+func (s SrtSocket) GetSockOptInt64(opt int) (int64, error) {
+ var v int64
+ l := 8
+
+ err := s.getSockOpt(opt, unsafe.Pointer(&v), &l)
+ return v, err
+}
+
+// GetSockOptString - return string value obtained with srt_getsockopt
+func (s SrtSocket) GetSockOptString(opt int) (string, error) {
+ buf := make([]byte, 256)
+ l := len(buf)
+
+ err := s.getSockOpt(opt, unsafe.Pointer(&buf[0]), &l)
+ if err != nil {
+ return "", err
+ }
+ return string(buf[:l]), nil
+}
+
+// SetSockOptByte - set byte value using srt_setsockopt
+func (s SrtSocket) SetSockOptByte(opt int, value byte) error {
+ return s.setSockOpt(opt, unsafe.Pointer(&value), 1)
+}
+
+// SetSockOptBool - set bool value using srt_setsockopt
+func (s SrtSocket) SetSockOptBool(opt int, value bool) error {
+ val := int(0)
+ if value {
+ val = 1
+ }
+ return s.setSockOpt(opt, unsafe.Pointer(&val), 4)
+}
+
+// SetSockOptInt - set int value using srt_setsockopt
+func (s SrtSocket) SetSockOptInt(opt int, value int) error {
+ return s.setSockOpt(opt, unsafe.Pointer(&value), 4)
+}
+
+// SetSockOptInt64 - set int64 value using srt_setsockopt
+func (s SrtSocket) SetSockOptInt64(opt int, value int64) error {
+ return s.setSockOpt(opt, unsafe.Pointer(&value), 8)
+}
+
+// SetSockOptString - set string value using srt_setsockopt
+func (s SrtSocket) SetSockOptString(opt int, value string) error {
+ return s.setSockOpt(opt, unsafe.Pointer(&[]byte(value)[0]), len(value))
+}
+
+func (s SrtSocket) setSockOpt(opt int, data unsafe.Pointer, size int) error {
+ runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
+ res := C.srt_setsockopt(s.socket, 0, C.SRT_SOCKOPT(opt), data, C.int(size))
+ if res == -1 {
+ return fmt.Errorf("Error calling srt_setsockopt %w", srtGetAndClearError())
+ }
+ return nil
+}
+
+func (s SrtSocket) getSockOpt(opt int, data unsafe.Pointer, size *int) error {
+ runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
+ res := C.srt_getsockopt(s.socket, 0, C.SRT_SOCKOPT(opt), data, (*C.int)(unsafe.Pointer(size)))
+ if res == -1 {
+ return fmt.Errorf("Error calling srt_getsockopt %w", srtGetAndClearError())
+ }
+
+ return nil
+}
+
+func (s SrtSocket) preconfiguration() (int, error) {
+ runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
+ var blocking C.int
+ if s.blocking {
+ blocking = C.int(1)
+ } else {
+ blocking = C.int(0)
+ }
+ result := C.srt_setsockopt(s.socket, 0, C.SRTO_RCVSYN, unsafe.Pointer(&blocking), C.int(unsafe.Sizeof(blocking)))
+ if result == -1 {
+ return ModeFailure, fmt.Errorf("could not set SRTO_RCVSYN flag: %w", srtGetAndClearError())
+ }
+
+ var mode int
+ modeVal, ok := s.options["mode"]
+ if !ok {
+ modeVal = "default"
+ }
+
+ if modeVal == "client" || modeVal == "caller" {
+ mode = ModeCaller
+ } else if modeVal == "server" || modeVal == "listener" {
+ mode = ModeListener
+ } else if modeVal == "default" {
+ if s.host == "" {
+ mode = ModeListener
+ } else {
+ // Host is given, so check also "adapter"
+ if _, ok := s.options["adapter"]; ok {
+ mode = ModeRendezvouz
+ } else {
+ mode = ModeCaller
+ }
+ }
+ } else {
+ mode = ModeFailure
+ }
+
+ if linger, ok := s.options["linger"]; ok {
+ li, err := strconv.Atoi(linger)
+ if err == nil {
+ if err := setSocketLingerOption(s.socket, int32(li)); err != nil {
+ return ModeFailure, fmt.Errorf("could not set LINGER option %w", err)
+ }
+ } else {
+ return ModeFailure, fmt.Errorf("could not set LINGER option %w", err)
+ }
+ }
+
+ err := setSocketOptions(s.socket, bindingPre, s.options)
+ if err != nil {
+ return ModeFailure, fmt.Errorf("Error setting socket options: %w", err)
+ }
+
+ return mode, nil
+}
+
+func (s SrtSocket) postconfiguration(sck *SrtSocket) error {
+ runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
+ var blocking C.int
+ if s.blocking {
+ blocking = 1
+ } else {
+ blocking = 0
+ }
+
+ res := C.srt_setsockopt(sck.socket, 0, C.SRTO_SNDSYN, unsafe.Pointer(&blocking), C.int(unsafe.Sizeof(blocking)))
+ if res == -1 {
+ return fmt.Errorf("Error in postconfiguration setting SRTO_SNDSYN: %w", srtGetAndClearError())
+ }
+
+ res = C.srt_setsockopt(sck.socket, 0, C.SRTO_RCVSYN, unsafe.Pointer(&blocking), C.int(unsafe.Sizeof(blocking)))
+ if res == -1 {
+ return fmt.Errorf("Error in postconfiguration setting SRTO_RCVSYN: %w", srtGetAndClearError())
+ }
+
+ err := setSocketOptions(sck.socket, bindingPost, s.options)
+ return err
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/srtsocketoptions.go b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/srtsocketoptions.go
new file mode 100644
index 0000000000..461f791e31
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/srtsocketoptions.go
@@ -0,0 +1,191 @@
+package srtgo
+
+// #cgo LDFLAGS: -lsrt
+// #include
+import "C"
+
+import (
+ "errors"
+ "fmt"
+ "strconv"
+ "syscall"
+ "unsafe"
+)
+
+const (
+ transTypeLive = 0
+ transTypeFile = 1
+)
+
+const (
+ tInteger32 = 0
+ tInteger64 = 1
+ tString = 2
+ tBoolean = 3
+ tTransType = 4
+
+ SRTO_TRANSTYPE = C.SRTO_TRANSTYPE
+ SRTO_MAXBW = C.SRTO_MAXBW
+ SRTO_PBKEYLEN = C.SRTO_PBKEYLEN
+ SRTO_PASSPHRASE = C.SRTO_PASSPHRASE
+ SRTO_MSS = C.SRTO_MSS
+ SRTO_FC = C.SRTO_FC
+ SRTO_SNDBUF = C.SRTO_SNDBUF
+ SRTO_RCVBUF = C.SRTO_RCVBUF
+ SRTO_IPTTL = C.SRTO_IPTTL
+ SRTO_IPTOS = C.SRTO_IPTOS
+ SRTO_INPUTBW = C.SRTO_INPUTBW
+ SRTO_OHEADBW = C.SRTO_OHEADBW
+ SRTO_LATENCY = C.SRTO_LATENCY
+ SRTO_TSBPDMODE = C.SRTO_TSBPDMODE
+ SRTO_TLPKTDROP = C.SRTO_TLPKTDROP
+ SRTO_SNDDROPDELAY = C.SRTO_SNDDROPDELAY
+ SRTO_NAKREPORT = C.SRTO_NAKREPORT
+ SRTO_CONNTIMEO = C.SRTO_CONNTIMEO
+ SRTO_LOSSMAXTTL = C.SRTO_LOSSMAXTTL
+ SRTO_RCVLATENCY = C.SRTO_RCVLATENCY
+ SRTO_PEERLATENCY = C.SRTO_PEERLATENCY
+ SRTO_MINVERSION = C.SRTO_MINVERSION
+ SRTO_STREAMID = C.SRTO_STREAMID
+ SRTO_CONGESTION = C.SRTO_CONGESTION
+ SRTO_MESSAGEAPI = C.SRTO_MESSAGEAPI
+ SRTO_PAYLOADSIZE = C.SRTO_PAYLOADSIZE
+ SRTO_KMREFRESHRATE = C.SRTO_KMREFRESHRATE
+ SRTO_KMPREANNOUNCE = C.SRTO_KMPREANNOUNCE
+ SRTO_ENFORCEDENCRYPTION = C.SRTO_ENFORCEDENCRYPTION
+ SRTO_PEERIDLETIMEO = C.SRTO_PEERIDLETIMEO
+ SRTO_PACKETFILTER = C.SRTO_PACKETFILTER
+ SRTO_STATE = C.SRTO_STATE
+)
+
+type socketOption struct {
+ name string
+ level int
+ option int
+ binding int
+ dataType int
+}
+
+// List of possible srt socket options
+var SocketOptions = []socketOption{
+ {"transtype", 0, SRTO_TRANSTYPE, bindingPre, tTransType},
+ {"maxbw", 0, SRTO_MAXBW, bindingPre, tInteger64},
+ {"pbkeylen", 0, SRTO_PBKEYLEN, bindingPre, tInteger32},
+ {"passphrase", 0, SRTO_PASSPHRASE, bindingPre, tString},
+ {"mss", 0, SRTO_MSS, bindingPre, tInteger32},
+ {"fc", 0, SRTO_FC, bindingPre, tInteger32},
+ {"sndbuf", 0, SRTO_SNDBUF, bindingPre, tInteger32},
+ {"rcvbuf", 0, SRTO_RCVBUF, bindingPre, tInteger32},
+ {"ipttl", 0, SRTO_IPTTL, bindingPre, tInteger32},
+ {"iptos", 0, SRTO_IPTOS, bindingPre, tInteger32},
+ {"inputbw", 0, SRTO_INPUTBW, bindingPost, tInteger64},
+ {"oheadbw", 0, SRTO_OHEADBW, bindingPost, tInteger32},
+ {"latency", 0, SRTO_LATENCY, bindingPre, tInteger32},
+ {"tsbpdmode", 0, SRTO_TSBPDMODE, bindingPre, tBoolean},
+ {"tlpktdrop", 0, SRTO_TLPKTDROP, bindingPre, tBoolean},
+ {"snddropdelay", 0, SRTO_SNDDROPDELAY, bindingPost, tInteger32},
+ {"nakreport", 0, SRTO_NAKREPORT, bindingPre, tBoolean},
+ {"conntimeo", 0, SRTO_CONNTIMEO, bindingPre, tInteger32},
+ {"lossmaxttl", 0, SRTO_LOSSMAXTTL, bindingPre, tInteger32},
+ {"rcvlatency", 0, SRTO_RCVLATENCY, bindingPre, tInteger32},
+ {"peerlatency", 0, SRTO_PEERLATENCY, bindingPre, tInteger32},
+ {"minversion", 0, SRTO_MINVERSION, bindingPre, tInteger32},
+ {"streamid", 0, SRTO_STREAMID, bindingPre, tString},
+ {"congestion", 0, SRTO_CONGESTION, bindingPre, tString},
+ {"messageapi", 0, SRTO_MESSAGEAPI, bindingPre, tBoolean},
+ {"payloadsize", 0, SRTO_PAYLOADSIZE, bindingPre, tInteger32},
+ {"kmrefreshrate", 0, SRTO_KMREFRESHRATE, bindingPre, tInteger32},
+ {"kmpreannounce", 0, SRTO_KMPREANNOUNCE, bindingPre, tInteger32},
+ {"enforcedencryption", 0, SRTO_ENFORCEDENCRYPTION, bindingPre, tBoolean},
+ {"peeridletimeo", 0, SRTO_PEERIDLETIMEO, bindingPre, tInteger32},
+ {"packetfilter", 0, SRTO_PACKETFILTER, bindingPre, tString},
+}
+
+func setSocketLingerOption(s C.int, li int32) error {
+ var lin syscall.Linger
+ lin.Linger = li
+ if lin.Linger > 0 {
+ lin.Onoff = 1
+ } else {
+ lin.Onoff = 0
+ }
+ res := C.srt_setsockopt(s, bindingPre, C.SRTO_LINGER, unsafe.Pointer(&lin), C.int(unsafe.Sizeof(lin)))
+ if res == SRT_ERROR {
+ return errors.New("failed to set linger")
+ }
+ return nil
+}
+
+func getSocketLingerOption(s *SrtSocket) (int32, error) {
+ var lin syscall.Linger
+ size := int(unsafe.Sizeof(lin))
+ err := s.getSockOpt(C.SRTO_LINGER, unsafe.Pointer(&lin), &size)
+ if err != nil {
+ return 0, err
+ }
+ if lin.Onoff == 0 {
+ return 0, nil
+ }
+ return lin.Linger, nil
+}
+
+// Set socket options for SRT
+func setSocketOptions(s C.int, binding int, options map[string]string) error {
+ for _, so := range SocketOptions {
+ if val, ok := options[so.name]; ok {
+ if so.binding == binding {
+ if so.dataType == tInteger32 {
+ v, err := strconv.Atoi(val)
+ v32 := int32(v)
+ if err == nil {
+ result := C.srt_setsockflag(s, C.SRT_SOCKOPT(so.option), unsafe.Pointer(&v32), C.int32_t(unsafe.Sizeof(v32)))
+ if result == -1 {
+ return fmt.Errorf("warning - error setting option %s to %s, %w", so.name, val, srtGetAndClearError())
+ }
+ }
+ } else if so.dataType == tInteger64 {
+ v, err := strconv.ParseInt(val, 10, 64)
+ if err == nil {
+ result := C.srt_setsockflag(s, C.SRT_SOCKOPT(so.option), unsafe.Pointer(&v), C.int32_t(unsafe.Sizeof(v)))
+ if result == -1 {
+ return fmt.Errorf("warning - error setting option %s to %s, %w", so.name, val, srtGetAndClearError())
+ }
+ }
+ } else if so.dataType == tString {
+ sval := C.CString(val)
+ defer C.free(unsafe.Pointer(sval))
+ result := C.srt_setsockflag(s, C.SRT_SOCKOPT(so.option), unsafe.Pointer(sval), C.int32_t(len(val)))
+ if result == -1 {
+ return fmt.Errorf("warning - error setting option %s to %s, %w", so.name, val, srtGetAndClearError())
+ }
+
+ } else if so.dataType == tBoolean {
+ var result C.int
+ if val == "1" {
+ v := C.char(1)
+ result = C.srt_setsockflag(s, C.SRT_SOCKOPT(so.option), unsafe.Pointer(&v), C.int32_t(unsafe.Sizeof(v)))
+ } else if val == "0" {
+ v := C.char(0)
+ result = C.srt_setsockflag(s, C.SRT_SOCKOPT(so.option), unsafe.Pointer(&v), C.int32_t(unsafe.Sizeof(v)))
+ }
+ if result == -1 {
+ return fmt.Errorf("warning - error setting option %s to %s, %w", so.name, val, srtGetAndClearError())
+ }
+ } else if so.dataType == tTransType {
+ var result C.int
+ if val == "live" {
+ var v int32 = C.SRTT_LIVE
+ result = C.srt_setsockflag(s, C.SRT_SOCKOPT(so.option), unsafe.Pointer(&v), C.int32_t(unsafe.Sizeof(v)))
+ } else if val == "file" {
+ var v int32 = C.SRTT_FILE
+ result = C.srt_setsockflag(s, C.SRT_SOCKOPT(so.option), unsafe.Pointer(&v), C.int32_t(unsafe.Sizeof(v)))
+ }
+ if result == -1 {
+ return fmt.Errorf("warning - error setting option %s to %s: %w", so.name, val, srtGetAndClearError())
+ }
+ }
+ }
+ }
+ }
+ return nil
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/srtstats.go b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/srtstats.go
new file mode 100644
index 0000000000..b300c6b9e2
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/srtstats.go
@@ -0,0 +1,188 @@
+package srtgo
+
+// #cgo LDFLAGS: -lsrt
+// #include
+import "C"
+
+type SrtStats struct {
+ // Global measurements
+ MsTimeStamp int64 // time since the UDT entity is started, in milliseconds
+ PktSentTotal int64 // total number of sent data packets, including retransmissions
+ PktRecvTotal int64 // total number of received packets
+ PktSndLossTotal int // total number of lost packets (sender side)
+ PktRcvLossTotal int // total number of lost packets (receiver side)
+ PktRetransTotal int // total number of retransmitted packets
+ PktSentACKTotal int // total number of sent ACK packets
+ PktRecvACKTotal int // total number of received ACK packets
+ PktSentNAKTotal int // total number of sent NAK packets
+ PktRecvNAKTotal int // total number of received NAK packets
+ UsSndDurationTotal int64 // total time duration when UDT is sending data (idle time exclusive)
+
+ PktSndDropTotal int // number of too-late-to-send dropped packets
+ PktRcvDropTotal int // number of too-late-to play missing packets
+ PktRcvUndecryptTotal int // number of undecrypted packets
+ ByteSentTotal int64 // total number of sent data bytes, including retransmissions
+ ByteRecvTotal int64 // total number of received bytes
+ ByteRcvLossTotal int64 // total number of lost bytes
+
+ ByteRetransTotal int64 // total number of retransmitted bytes
+ ByteSndDropTotal int64 // number of too-late-to-send dropped bytes
+ ByteRcvDropTotal int64 // number of too-late-to play missing bytes (estimate based on average packet size)
+ ByteRcvUndecryptTotal int64 // number of undecrypted bytes
+
+ // Local measurements
+ PktSent int64 // number of sent data packets, including retransmissions
+ PktRecv int64 // number of received packets
+ PktSndLoss int // number of lost packets (sender side)
+ PktRcvLoss int // number of lost packets (receiver side)
+ PktRetrans int // number of retransmitted packets
+ PktRcvRetrans int // number of retransmitted packets received
+ PktSentACK int // number of sent ACK packets
+ PktRecvACK int // number of received ACK packets
+ PktSentNAK int // number of sent NAK packets
+ PktRecvNAK int // number of received NAK packets
+ MbpsSendRate float64 // sending rate in Mb/s
+ MbpsRecvRate float64 // receiving rate in Mb/s
+ UsSndDuration int64 // busy sending time (i.e., idle time exclusive)
+ PktReorderDistance int // size of order discrepancy in received sequences
+ PktRcvAvgBelatedTime float64 // average time of packet delay for belated packets (packets with sequence past the ACK)
+ PktRcvBelated int64 // number of received AND IGNORED packets due to having come too late
+
+ PktSndDrop int // number of too-late-to-send dropped packets
+ PktRcvDrop int // number of too-late-to play missing packets
+ PktRcvUndecrypt int // number of undecrypted packets
+ ByteSent int64 // number of sent data bytes, including retransmissions
+ ByteRecv int64 // number of received bytes
+
+ ByteRcvLoss int64 // number of retransmitted Bytes
+ ByteRetrans int64 // number of retransmitted Bytes
+ ByteSndDrop int64 // number of too-late-to-send dropped Bytes
+ ByteRcvDrop int64 // number of too-late-to play missing Bytes (estimate based on average packet size)
+ ByteRcvUndecrypt int64 // number of undecrypted bytes
+
+ // Instant measurements
+ UsPktSndPeriod float64 // packet sending period, in microseconds
+ PktFlowWindow int // flow window size, in number of packets
+ PktCongestionWindow int // congestion window size, in number of packets
+ PktFlightSize int // number of packets on flight
+ MsRTT float64 // RTT, in milliseconds
+ MbpsBandwidth float64 // estimated bandwidth, in Mb/s
+ ByteAvailSndBuf int // available UDT sender buffer size
+ ByteAvailRcvBuf int // available UDT receiver buffer size
+
+ MbpsMaxBW float64 // Transmit Bandwidth ceiling (Mbps)
+ ByteMSS int // MTU
+
+ PktSndBuf int // UnACKed packets in UDT sender
+ ByteSndBuf int // UnACKed bytes in UDT sender
+ MsSndBuf int // UnACKed timespan (msec) of UDT sender
+ MsSndTsbPdDelay int // Timestamp-based Packet Delivery Delay
+
+ PktRcvBuf int // Undelivered packets in UDT receiver
+ ByteRcvBuf int // Undelivered bytes of UDT receiver
+ MsRcvBuf int // Undelivered timespan (msec) of UDT receiver
+ MsRcvTsbPdDelay int // Timestamp-based Packet Delivery Delay
+
+ PktSndFilterExtraTotal int // number of control packets supplied by packet filter
+ PktRcvFilterExtraTotal int // number of control packets received and not supplied back
+ PktRcvFilterSupplyTotal int // number of packets that the filter supplied extra (e.g. FEC rebuilt)
+ PktRcvFilterLossTotal int // number of packet loss not coverable by filter
+
+ PktSndFilterExtra int // number of control packets supplied by packet filter
+ PktRcvFilterExtra int // number of control packets received and not supplied back
+ PktRcvFilterSupply int // number of packets that the filter supplied extra (e.g. FEC rebuilt)
+ PktRcvFilterLoss int // number of packet loss not coverable by filter
+ PktReorderTolerance int // packet reorder tolerance value
+}
+
+func newSrtStats(stats *C.SRT_TRACEBSTATS) *SrtStats {
+ s := new(SrtStats)
+
+ s.MsTimeStamp = int64(stats.msTimeStamp)
+ s.PktSentTotal = int64(stats.pktSentTotal)
+ s.PktRecvTotal = int64(stats.pktRecvTotal)
+ s.PktSndLossTotal = int(stats.pktSndLossTotal)
+ s.PktRcvLossTotal = int(stats.pktRcvLossTotal)
+ s.PktRetransTotal = int(stats.pktRetransTotal)
+ s.PktSentACKTotal = int(stats.pktSentACKTotal)
+ s.PktRecvACKTotal = int(stats.pktRecvACKTotal)
+ s.PktSentNAKTotal = int(stats.pktSentNAKTotal)
+ s.PktRecvNAKTotal = int(stats.pktRecvNAKTotal)
+ s.UsSndDurationTotal = int64(stats.usSndDurationTotal)
+
+ s.PktSndDropTotal = int(stats.pktSndDropTotal)
+ s.PktRcvDropTotal = int(stats.pktRcvDropTotal)
+ s.PktRcvUndecryptTotal = int(stats.pktRcvUndecryptTotal)
+ s.ByteSentTotal = int64(stats.byteSentTotal)
+ s.ByteRecvTotal = int64(stats.byteRecvTotal)
+ s.ByteRcvLossTotal = int64(stats.byteRcvLossTotal)
+
+ s.ByteRetransTotal = int64(stats.byteRetransTotal)
+ s.ByteSndDropTotal = int64(stats.byteSndDropTotal)
+ s.ByteRcvDropTotal = int64(stats.byteRcvDropTotal)
+ s.ByteRcvUndecryptTotal = int64(stats.byteRcvUndecryptTotal)
+
+ s.PktSent = int64(stats.pktSent)
+ s.PktRecv = int64(stats.pktRecv)
+ s.PktSndLoss = int(stats.pktSndLoss)
+ s.PktRcvLoss = int(stats.pktRcvLoss)
+ s.PktRetrans = int(stats.pktRetrans)
+ s.PktRcvRetrans = int(stats.pktRcvRetrans)
+ s.PktSentACK = int(stats.pktSentACK)
+ s.PktRecvACK = int(stats.pktRecvACK)
+ s.PktSentNAK = int(stats.pktSentNAK)
+ s.PktRecvNAK = int(stats.pktRecvNAK)
+ s.MbpsSendRate = float64(stats.mbpsSendRate)
+ s.MbpsRecvRate = float64(stats.mbpsRecvRate)
+ s.UsSndDuration = int64(stats.usSndDuration)
+ s.PktReorderDistance = int(stats.pktReorderDistance)
+ s.PktRcvAvgBelatedTime = float64(stats.pktRcvAvgBelatedTime)
+ s.PktRcvBelated = int64(stats.pktRcvBelated)
+
+ s.PktSndDrop = int(stats.pktSndDrop)
+ s.PktRcvDrop = int(stats.pktRcvDrop)
+ s.PktRcvUndecrypt = int(stats.pktRcvUndecrypt)
+ s.ByteSent = int64(stats.byteSent)
+ s.ByteRecv = int64(stats.byteRecv)
+
+ s.ByteRcvLoss = int64(stats.byteRcvLoss)
+ s.ByteRetrans = int64(stats.byteRetrans)
+ s.ByteSndDrop = int64(stats.byteSndDrop)
+ s.ByteRcvDrop = int64(stats.byteRcvDrop)
+ s.ByteRcvUndecrypt = int64(stats.byteRcvUndecrypt)
+
+ s.UsPktSndPeriod = float64(stats.usPktSndPeriod)
+ s.PktFlowWindow = int(stats.pktFlowWindow)
+ s.PktCongestionWindow = int(stats.pktCongestionWindow)
+ s.PktFlightSize = int(stats.pktFlightSize)
+ s.MsRTT = float64(stats.msRTT)
+ s.MbpsBandwidth = float64(stats.mbpsBandwidth)
+ s.ByteAvailSndBuf = int(stats.byteAvailSndBuf)
+ s.ByteAvailRcvBuf = int(stats.byteAvailRcvBuf)
+
+ s.MbpsMaxBW = float64(stats.mbpsMaxBW)
+ s.ByteMSS = int(stats.byteMSS)
+
+ s.PktSndBuf = int(stats.pktSndBuf)
+ s.ByteSndBuf = int(stats.byteSndBuf)
+ s.MsSndBuf = int(stats.msSndBuf)
+ s.MsSndTsbPdDelay = int(stats.msSndTsbPdDelay)
+
+ s.PktRcvBuf = int(stats.pktRcvBuf)
+ s.ByteRcvBuf = int(stats.byteRcvBuf)
+ s.MsRcvBuf = int(stats.msRcvBuf)
+ s.MsRcvTsbPdDelay = int(stats.msRcvTsbPdDelay)
+
+ s.PktSndFilterExtraTotal = int(stats.pktSndFilterExtraTotal)
+ s.PktRcvFilterExtraTotal = int(stats.pktRcvFilterExtraTotal)
+ s.PktRcvFilterSupplyTotal = int(stats.pktRcvFilterSupplyTotal)
+ s.PktRcvFilterLossTotal = int(stats.pktRcvFilterLossTotal)
+
+ s.PktSndFilterExtra = int(stats.pktSndFilterExtra)
+ s.PktRcvFilterExtra = int(stats.pktRcvFilterExtra)
+ s.PktRcvFilterSupply = int(stats.pktRcvFilterSupply)
+ s.PktRcvFilterLoss = int(stats.pktRcvFilterLoss)
+ s.PktReorderTolerance = int(stats.pktReorderTolerance)
+
+ return s
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/write.go b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/write.go
new file mode 100644
index 0000000000..01cb8a7211
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/haivision/srtgo/write.go
@@ -0,0 +1,55 @@
+package srtgo
+
+/*
+#cgo LDFLAGS: -lsrt
+#include
+
+int srt_sendmsg2_wrapped(SRTSOCKET u, const char* buf, int len, SRT_MSGCTRL *mctrl, int *srterror, int *syserror)
+{
+ int ret = srt_sendmsg2(u, buf, len, mctrl);
+ if (ret < 0) {
+ *srterror = srt_getlasterror(syserror);
+ }
+ return ret;
+}
+
+*/
+import "C"
+import (
+ "errors"
+ "syscall"
+ "unsafe"
+)
+
+func srtSendMsg2Impl(u C.SRTSOCKET, buf []byte, msgctrl *C.SRT_MSGCTRL) (n int, err error) {
+ srterr := C.int(0)
+ syserr := C.int(0)
+ n = int(C.srt_sendmsg2_wrapped(u, (*C.char)(unsafe.Pointer(&buf[0])), C.int(len(buf)), msgctrl, &srterr, &syserr))
+ if n < 0 {
+ srterror := SRTErrno(srterr)
+ if syserr < 0 {
+ srterror.wrapSysErr(syscall.Errno(syserr))
+ }
+ err = srterror
+ n = 0
+ }
+ return
+}
+
+// Write data to the SRT socket
+func (s SrtSocket) Write(b []byte) (n int, err error) {
+
+ //Fastpath:
+ if !s.blocking {
+ s.pd.reset(ModeWrite)
+ }
+ n, err = srtSendMsg2Impl(s.socket, b, nil)
+
+ for {
+ if !errors.Is(err, error(EAsyncSND)) || s.blocking {
+ return
+ }
+ s.pd.wait(ModeWrite)
+ n, err = srtSendMsg2Impl(s.socket, b, nil)
+ }
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/mattn/go-pointer/LICENSE b/trunk/3rdparty/srs-bench/vendor/github.com/mattn/go-pointer/LICENSE
new file mode 100644
index 0000000000..5794eddcd2
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/mattn/go-pointer/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 Yasuhiro Matsumoto
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/mattn/go-pointer/README.md b/trunk/3rdparty/srs-bench/vendor/github.com/mattn/go-pointer/README.md
new file mode 100644
index 0000000000..c74eee22ad
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/mattn/go-pointer/README.md
@@ -0,0 +1,29 @@
+# go-pointer
+
+Utility for cgo
+
+## Usage
+
+https://github.com/golang/proposal/blob/master/design/12416-cgo-pointers.md
+
+In go 1.6, cgo argument can't be passed Go pointer.
+
+```
+var s string
+C.pass_pointer(pointer.Save(&s))
+v := *(pointer.Restore(C.get_from_pointer()).(*string))
+```
+
+## Installation
+
+```
+go get github.com/mattn/go-pointer
+```
+
+## License
+
+MIT
+
+## Author
+
+Yasuhiro Matsumoto (a.k.a mattn)
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/mattn/go-pointer/doc.go b/trunk/3rdparty/srs-bench/vendor/github.com/mattn/go-pointer/doc.go
new file mode 100644
index 0000000000..c27bd8c059
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/mattn/go-pointer/doc.go
@@ -0,0 +1 @@
+package pointer
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/mattn/go-pointer/pointer.go b/trunk/3rdparty/srs-bench/vendor/github.com/mattn/go-pointer/pointer.go
new file mode 100644
index 0000000000..08a985339f
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/mattn/go-pointer/pointer.go
@@ -0,0 +1,57 @@
+package pointer
+
+// #include
+import "C"
+import (
+ "sync"
+ "unsafe"
+)
+
+var (
+ mutex sync.RWMutex
+ store = map[unsafe.Pointer]interface{}{}
+)
+
+func Save(v interface{}) unsafe.Pointer {
+ if v == nil {
+ return nil
+ }
+
+ // Generate real fake C pointer.
+ // This pointer will not store any data, but will bi used for indexing purposes.
+ // Since Go doest allow to cast dangling pointer to unsafe.Pointer, we do rally allocate one byte.
+ // Why we need indexing, because Go doest allow C code to store pointers to Go data.
+ var ptr unsafe.Pointer = C.malloc(C.size_t(1))
+ if ptr == nil {
+ panic("can't allocate 'cgo-pointer hack index pointer': ptr == nil")
+ }
+
+ mutex.Lock()
+ store[ptr] = v
+ mutex.Unlock()
+
+ return ptr
+}
+
+func Restore(ptr unsafe.Pointer) (v interface{}) {
+ if ptr == nil {
+ return nil
+ }
+
+ mutex.RLock()
+ v = store[ptr]
+ mutex.RUnlock()
+ return
+}
+
+func Unref(ptr unsafe.Pointer) {
+ if ptr == nil {
+ return
+ }
+
+ mutex.Lock()
+ delete(store, ptr)
+ mutex.Unlock()
+
+ C.free(ptr)
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_compare.go b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_compare.go
index b774da88d8..4d4b4aad6f 100644
--- a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_compare.go
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_compare.go
@@ -28,6 +28,8 @@ var (
uint32Type = reflect.TypeOf(uint32(1))
uint64Type = reflect.TypeOf(uint64(1))
+ uintptrType = reflect.TypeOf(uintptr(1))
+
float32Type = reflect.TypeOf(float32(1))
float64Type = reflect.TypeOf(float64(1))
@@ -308,11 +310,11 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) {
case reflect.Struct:
{
// All structs enter here. We're not interested in most types.
- if !canConvert(obj1Value, timeType) {
+ if !obj1Value.CanConvert(timeType) {
break
}
- // time.Time can compared!
+ // time.Time can be compared!
timeObj1, ok := obj1.(time.Time)
if !ok {
timeObj1 = obj1Value.Convert(timeType).Interface().(time.Time)
@@ -328,7 +330,7 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) {
case reflect.Slice:
{
// We only care about the []byte type.
- if !canConvert(obj1Value, bytesType) {
+ if !obj1Value.CanConvert(bytesType) {
break
}
@@ -345,6 +347,26 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) {
return CompareType(bytes.Compare(bytesObj1, bytesObj2)), true
}
+ case reflect.Uintptr:
+ {
+ uintptrObj1, ok := obj1.(uintptr)
+ if !ok {
+ uintptrObj1 = obj1Value.Convert(uintptrType).Interface().(uintptr)
+ }
+ uintptrObj2, ok := obj2.(uintptr)
+ if !ok {
+ uintptrObj2 = obj2Value.Convert(uintptrType).Interface().(uintptr)
+ }
+ if uintptrObj1 > uintptrObj2 {
+ return compareGreater, true
+ }
+ if uintptrObj1 == uintptrObj2 {
+ return compareEqual, true
+ }
+ if uintptrObj1 < uintptrObj2 {
+ return compareLess, true
+ }
+ }
}
return compareEqual, false
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go
deleted file mode 100644
index da867903e2..0000000000
--- a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go
+++ /dev/null
@@ -1,16 +0,0 @@
-//go:build go1.17
-// +build go1.17
-
-// TODO: once support for Go 1.16 is dropped, this file can be
-// merged/removed with assertion_compare_go1.17_test.go and
-// assertion_compare_legacy.go
-
-package assert
-
-import "reflect"
-
-// Wrapper around reflect.Value.CanConvert, for compatibility
-// reasons.
-func canConvert(value reflect.Value, to reflect.Type) bool {
- return value.CanConvert(to)
-}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go
deleted file mode 100644
index 1701af2a3c..0000000000
--- a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go
+++ /dev/null
@@ -1,16 +0,0 @@
-//go:build !go1.17
-// +build !go1.17
-
-// TODO: once support for Go 1.16 is dropped, this file can be
-// merged/removed with assertion_compare_go1.17_test.go and
-// assertion_compare_can_convert.go
-
-package assert
-
-import "reflect"
-
-// Older versions of Go does not have the reflect.Value.CanConvert
-// method.
-func canConvert(value reflect.Value, to reflect.Type) bool {
- return false
-}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_format.go b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_format.go
index 84dbd6c790..3ddab109ad 100644
--- a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_format.go
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_format.go
@@ -1,7 +1,4 @@
-/*
-* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen
-* THIS FILE MUST NOT BE EDITED BY HAND
- */
+// Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT.
package assert
@@ -107,7 +104,7 @@ func EqualExportedValuesf(t TestingT, expected interface{}, actual interface{},
return EqualExportedValues(t, expected, actual, append([]interface{}{msg}, args...)...)
}
-// EqualValuesf asserts that two objects are equal or convertable to the same types
+// EqualValuesf asserts that two objects are equal or convertible to the same types
// and equal.
//
// assert.EqualValuesf(t, uint32(123), int32(123), "error message %s", "formatted")
@@ -616,6 +613,16 @@ func NotErrorIsf(t TestingT, err error, target error, msg string, args ...interf
return NotErrorIs(t, err, target, append([]interface{}{msg}, args...)...)
}
+// NotImplementsf asserts that an object does not implement the specified interface.
+//
+// assert.NotImplementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted")
+func NotImplementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return NotImplements(t, interfaceObject, object, append([]interface{}{msg}, args...)...)
+}
+
// NotNilf asserts that the specified object is not nil.
//
// assert.NotNilf(t, err, "error message %s", "formatted")
@@ -660,10 +667,12 @@ func NotSamef(t TestingT, expected interface{}, actual interface{}, msg string,
return NotSame(t, expected, actual, append([]interface{}{msg}, args...)...)
}
-// NotSubsetf asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
+// NotSubsetf asserts that the specified list(array, slice...) or map does NOT
+// contain all elements given in the specified subset list(array, slice...) or
+// map.
//
-// assert.NotSubsetf(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted")
+// assert.NotSubsetf(t, [1, 3, 4], [1, 2], "error message %s", "formatted")
+// assert.NotSubsetf(t, {"x": 1, "y": 2}, {"z": 3}, "error message %s", "formatted")
func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -747,10 +756,11 @@ func Samef(t TestingT, expected interface{}, actual interface{}, msg string, arg
return Same(t, expected, actual, append([]interface{}{msg}, args...)...)
}
-// Subsetf asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
+// Subsetf asserts that the specified list(array, slice...) or map contains all
+// elements given in the specified subset list(array, slice...) or map.
//
-// assert.Subsetf(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted")
+// assert.Subsetf(t, [1, 2, 3], [1, 2], "error message %s", "formatted")
+// assert.Subsetf(t, {"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted")
func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool {
if h, ok := t.(tHelper); ok {
h.Helper()
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_forward.go b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_forward.go
index b1d94aec53..a84e09bd40 100644
--- a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_forward.go
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertion_forward.go
@@ -1,7 +1,4 @@
-/*
-* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen
-* THIS FILE MUST NOT BE EDITED BY HAND
- */
+// Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT.
package assert
@@ -189,7 +186,7 @@ func (a *Assertions) EqualExportedValuesf(expected interface{}, actual interface
return EqualExportedValuesf(a.t, expected, actual, msg, args...)
}
-// EqualValues asserts that two objects are equal or convertable to the same types
+// EqualValues asserts that two objects are equal or convertible to the same types
// and equal.
//
// a.EqualValues(uint32(123), int32(123))
@@ -200,7 +197,7 @@ func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAn
return EqualValues(a.t, expected, actual, msgAndArgs...)
}
-// EqualValuesf asserts that two objects are equal or convertable to the same types
+// EqualValuesf asserts that two objects are equal or convertible to the same types
// and equal.
//
// a.EqualValuesf(uint32(123), int32(123), "error message %s", "formatted")
@@ -1221,6 +1218,26 @@ func (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...in
return NotErrorIsf(a.t, err, target, msg, args...)
}
+// NotImplements asserts that an object does not implement the specified interface.
+//
+// a.NotImplements((*MyInterface)(nil), new(MyObject))
+func (a *Assertions) NotImplements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return NotImplements(a.t, interfaceObject, object, msgAndArgs...)
+}
+
+// NotImplementsf asserts that an object does not implement the specified interface.
+//
+// a.NotImplementsf((*MyInterface)(nil), new(MyObject), "error message %s", "formatted")
+func (a *Assertions) NotImplementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return NotImplementsf(a.t, interfaceObject, object, msg, args...)
+}
+
// NotNil asserts that the specified object is not nil.
//
// a.NotNil(err)
@@ -1309,10 +1326,12 @@ func (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg stri
return NotSamef(a.t, expected, actual, msg, args...)
}
-// NotSubset asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
+// NotSubset asserts that the specified list(array, slice...) or map does NOT
+// contain all elements given in the specified subset list(array, slice...) or
+// map.
//
-// a.NotSubset([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]")
+// a.NotSubset([1, 3, 4], [1, 2])
+// a.NotSubset({"x": 1, "y": 2}, {"z": 3})
func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -1320,10 +1339,12 @@ func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs
return NotSubset(a.t, list, subset, msgAndArgs...)
}
-// NotSubsetf asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
+// NotSubsetf asserts that the specified list(array, slice...) or map does NOT
+// contain all elements given in the specified subset list(array, slice...) or
+// map.
//
-// a.NotSubsetf([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted")
+// a.NotSubsetf([1, 3, 4], [1, 2], "error message %s", "formatted")
+// a.NotSubsetf({"x": 1, "y": 2}, {"z": 3}, "error message %s", "formatted")
func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -1483,10 +1504,11 @@ func (a *Assertions) Samef(expected interface{}, actual interface{}, msg string,
return Samef(a.t, expected, actual, msg, args...)
}
-// Subset asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
+// Subset asserts that the specified list(array, slice...) or map contains all
+// elements given in the specified subset list(array, slice...) or map.
//
-// a.Subset([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]")
+// a.Subset([1, 2, 3], [1, 2])
+// a.Subset({"x": 1, "y": 2}, {"x": 1})
func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -1494,10 +1516,11 @@ func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...
return Subset(a.t, list, subset, msgAndArgs...)
}
-// Subsetf asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
+// Subsetf asserts that the specified list(array, slice...) or map contains all
+// elements given in the specified subset list(array, slice...) or map.
//
-// a.Subsetf([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted")
+// a.Subsetf([1, 2, 3], [1, 2], "error message %s", "formatted")
+// a.Subsetf({"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted")
func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool {
if h, ok := a.t.(tHelper); ok {
h.Helper()
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertions.go b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertions.go
index a55d1bba92..0b7570f21c 100644
--- a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertions.go
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/assertions.go
@@ -19,7 +19,7 @@ import (
"github.com/davecgh/go-spew/spew"
"github.com/pmezard/go-difflib/difflib"
- yaml "gopkg.in/yaml.v3"
+ "gopkg.in/yaml.v3"
)
//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_format.go.tmpl"
@@ -110,7 +110,12 @@ func copyExportedFields(expected interface{}) interface{} {
return result.Interface()
case reflect.Array, reflect.Slice:
- result := reflect.MakeSlice(expectedType, expectedValue.Len(), expectedValue.Len())
+ var result reflect.Value
+ if expectedKind == reflect.Array {
+ result = reflect.New(reflect.ArrayOf(expectedValue.Len(), expectedType.Elem())).Elem()
+ } else {
+ result = reflect.MakeSlice(expectedType, expectedValue.Len(), expectedValue.Len())
+ }
for i := 0; i < expectedValue.Len(); i++ {
index := expectedValue.Index(i)
if isNil(index) {
@@ -140,6 +145,8 @@ func copyExportedFields(expected interface{}) interface{} {
// structures.
//
// This function does no assertion of any kind.
+//
+// Deprecated: Use [EqualExportedValues] instead.
func ObjectsExportedFieldsAreEqual(expected, actual interface{}) bool {
expectedCleaned := copyExportedFields(expected)
actualCleaned := copyExportedFields(actual)
@@ -153,17 +160,40 @@ func ObjectsAreEqualValues(expected, actual interface{}) bool {
return true
}
- actualType := reflect.TypeOf(actual)
- if actualType == nil {
+ expectedValue := reflect.ValueOf(expected)
+ actualValue := reflect.ValueOf(actual)
+ if !expectedValue.IsValid() || !actualValue.IsValid() {
return false
}
- expectedValue := reflect.ValueOf(expected)
- if expectedValue.IsValid() && expectedValue.Type().ConvertibleTo(actualType) {
+
+ expectedType := expectedValue.Type()
+ actualType := actualValue.Type()
+ if !expectedType.ConvertibleTo(actualType) {
+ return false
+ }
+
+ if !isNumericType(expectedType) || !isNumericType(actualType) {
// Attempt comparison after type conversion
- return reflect.DeepEqual(expectedValue.Convert(actualType).Interface(), actual)
+ return reflect.DeepEqual(
+ expectedValue.Convert(actualType).Interface(), actual,
+ )
}
- return false
+ // If BOTH values are numeric, there are chances of false positives due
+ // to overflow or underflow. So, we need to make sure to always convert
+ // the smaller type to a larger type before comparing.
+ if expectedType.Size() >= actualType.Size() {
+ return actualValue.Convert(expectedType).Interface() == expected
+ }
+
+ return expectedValue.Convert(actualType).Interface() == actual
+}
+
+// isNumericType returns true if the type is one of:
+// int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64,
+// float32, float64, complex64, complex128
+func isNumericType(t reflect.Type) bool {
+ return t.Kind() >= reflect.Int && t.Kind() <= reflect.Complex128
}
/* CallerInfo is necessary because the assert functions use the testing object
@@ -266,7 +296,7 @@ func messageFromMsgAndArgs(msgAndArgs ...interface{}) string {
// Aligns the provided message so that all lines after the first line start at the same location as the first line.
// Assumes that the first line starts at the correct location (after carriage return, tab, label, spacer and tab).
-// The longestLabelLen parameter specifies the length of the longest label in the output (required becaues this is the
+// The longestLabelLen parameter specifies the length of the longest label in the output (required because this is the
// basis on which the alignment occurs).
func indentMessageLines(message string, longestLabelLen int) string {
outBuf := new(bytes.Buffer)
@@ -382,6 +412,25 @@ func Implements(t TestingT, interfaceObject interface{}, object interface{}, msg
return true
}
+// NotImplements asserts that an object does not implement the specified interface.
+//
+// assert.NotImplements(t, (*MyInterface)(nil), new(MyObject))
+func NotImplements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ interfaceType := reflect.TypeOf(interfaceObject).Elem()
+
+ if object == nil {
+ return Fail(t, fmt.Sprintf("Cannot check if nil does not implement %v", interfaceType), msgAndArgs...)
+ }
+ if reflect.TypeOf(object).Implements(interfaceType) {
+ return Fail(t, fmt.Sprintf("%T implements %v", object, interfaceType), msgAndArgs...)
+ }
+
+ return true
+}
+
// IsType asserts that the specified objects are of the same type.
func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool {
if h, ok := t.(tHelper); ok {
@@ -496,7 +545,7 @@ func samePointers(first, second interface{}) bool {
// representations appropriate to be presented to the user.
//
// If the values are not of like type, the returned strings will be prefixed
-// with the type name, and the value will be enclosed in parenthesis similar
+// with the type name, and the value will be enclosed in parentheses similar
// to a type conversion in the Go grammar.
func formatUnequalValues(expected, actual interface{}) (e string, a string) {
if reflect.TypeOf(expected) != reflect.TypeOf(actual) {
@@ -523,7 +572,7 @@ func truncatingFormat(data interface{}) string {
return value
}
-// EqualValues asserts that two objects are equal or convertable to the same types
+// EqualValues asserts that two objects are equal or convertible to the same types
// and equal.
//
// assert.EqualValues(t, uint32(123), int32(123))
@@ -566,12 +615,19 @@ func EqualExportedValues(t TestingT, expected, actual interface{}, msgAndArgs ..
return Fail(t, fmt.Sprintf("Types expected to match exactly\n\t%v != %v", aType, bType), msgAndArgs...)
}
+ if aType.Kind() == reflect.Ptr {
+ aType = aType.Elem()
+ }
+ if bType.Kind() == reflect.Ptr {
+ bType = bType.Elem()
+ }
+
if aType.Kind() != reflect.Struct {
- return Fail(t, fmt.Sprintf("Types expected to both be struct \n\t%v != %v", aType.Kind(), reflect.Struct), msgAndArgs...)
+ return Fail(t, fmt.Sprintf("Types expected to both be struct or pointer to struct \n\t%v != %v", aType.Kind(), reflect.Struct), msgAndArgs...)
}
if bType.Kind() != reflect.Struct {
- return Fail(t, fmt.Sprintf("Types expected to both be struct \n\t%v != %v", bType.Kind(), reflect.Struct), msgAndArgs...)
+ return Fail(t, fmt.Sprintf("Types expected to both be struct or pointer to struct \n\t%v != %v", bType.Kind(), reflect.Struct), msgAndArgs...)
}
expected = copyExportedFields(expected)
@@ -620,17 +676,6 @@ func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
return Fail(t, "Expected value not to be nil.", msgAndArgs...)
}
-// containsKind checks if a specified kind in the slice of kinds.
-func containsKind(kinds []reflect.Kind, kind reflect.Kind) bool {
- for i := 0; i < len(kinds); i++ {
- if kind == kinds[i] {
- return true
- }
- }
-
- return false
-}
-
// isNil checks if a specified object is nil or not, without Failing.
func isNil(object interface{}) bool {
if object == nil {
@@ -638,16 +683,13 @@ func isNil(object interface{}) bool {
}
value := reflect.ValueOf(object)
- kind := value.Kind()
- isNilableKind := containsKind(
- []reflect.Kind{
- reflect.Chan, reflect.Func,
- reflect.Interface, reflect.Map,
- reflect.Ptr, reflect.Slice, reflect.UnsafePointer},
- kind)
-
- if isNilableKind && value.IsNil() {
- return true
+ switch value.Kind() {
+ case
+ reflect.Chan, reflect.Func,
+ reflect.Interface, reflect.Map,
+ reflect.Ptr, reflect.Slice, reflect.UnsafePointer:
+
+ return value.IsNil()
}
return false
@@ -731,16 +773,14 @@ func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
}
-// getLen try to get length of object.
-// return (false, 0) if impossible.
-func getLen(x interface{}) (ok bool, length int) {
+// getLen tries to get the length of an object.
+// It returns (0, false) if impossible.
+func getLen(x interface{}) (length int, ok bool) {
v := reflect.ValueOf(x)
defer func() {
- if e := recover(); e != nil {
- ok = false
- }
+ ok = recover() == nil
}()
- return true, v.Len()
+ return v.Len(), true
}
// Len asserts that the specified object has specific length.
@@ -751,13 +791,13 @@ func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{})
if h, ok := t.(tHelper); ok {
h.Helper()
}
- ok, l := getLen(object)
+ l, ok := getLen(object)
if !ok {
- return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", object), msgAndArgs...)
+ return Fail(t, fmt.Sprintf("\"%v\" could not be applied builtin len()", object), msgAndArgs...)
}
if l != length {
- return Fail(t, fmt.Sprintf("\"%s\" should have %d item(s), but has %d", object, length, l), msgAndArgs...)
+ return Fail(t, fmt.Sprintf("\"%v\" should have %d item(s), but has %d", object, length, l), msgAndArgs...)
}
return true
}
@@ -919,10 +959,11 @@ func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{})
}
-// Subset asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
+// Subset asserts that the specified list(array, slice...) or map contains all
+// elements given in the specified subset list(array, slice...) or map.
//
-// assert.Subset(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]")
+// assert.Subset(t, [1, 2, 3], [1, 2])
+// assert.Subset(t, {"x": 1, "y": 2}, {"x": 1})
func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -975,10 +1016,12 @@ func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok
return true
}
-// NotSubset asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
+// NotSubset asserts that the specified list(array, slice...) or map does NOT
+// contain all elements given in the specified subset list(array, slice...) or
+// map.
//
-// assert.NotSubset(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]")
+// assert.NotSubset(t, [1, 3, 4], [1, 2])
+// assert.NotSubset(t, {"x": 1, "y": 2}, {"z": 3})
func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -1439,7 +1482,7 @@ func InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, msgAnd
h.Helper()
}
if math.IsNaN(epsilon) {
- return Fail(t, "epsilon must not be NaN")
+ return Fail(t, "epsilon must not be NaN", msgAndArgs...)
}
actualEpsilon, err := calcRelativeError(expected, actual)
if err != nil {
@@ -1458,19 +1501,26 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m
if h, ok := t.(tHelper); ok {
h.Helper()
}
- if expected == nil || actual == nil ||
- reflect.TypeOf(actual).Kind() != reflect.Slice ||
- reflect.TypeOf(expected).Kind() != reflect.Slice {
+
+ if expected == nil || actual == nil {
return Fail(t, "Parameters must be slice", msgAndArgs...)
}
- actualSlice := reflect.ValueOf(actual)
expectedSlice := reflect.ValueOf(expected)
+ actualSlice := reflect.ValueOf(actual)
- for i := 0; i < actualSlice.Len(); i++ {
- result := InEpsilon(t, actualSlice.Index(i).Interface(), expectedSlice.Index(i).Interface(), epsilon)
- if !result {
- return result
+ if expectedSlice.Type().Kind() != reflect.Slice {
+ return Fail(t, "Expected value must be slice", msgAndArgs...)
+ }
+
+ expectedLen := expectedSlice.Len()
+ if !IsType(t, expected, actual) || !Len(t, actual, expectedLen) {
+ return false
+ }
+
+ for i := 0; i < expectedLen; i++ {
+ if !InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon, "at index %d", i) {
+ return false
}
}
@@ -1870,23 +1920,18 @@ func (c *CollectT) Errorf(format string, args ...interface{}) {
}
// FailNow panics.
-func (c *CollectT) FailNow() {
+func (*CollectT) FailNow() {
panic("Assertion failed")
}
-// Reset clears the collected errors.
-func (c *CollectT) Reset() {
- c.errors = nil
+// Deprecated: That was a method for internal usage that should not have been published. Now just panics.
+func (*CollectT) Reset() {
+ panic("Reset() is deprecated")
}
-// Copy copies the collected errors to the supplied t.
-func (c *CollectT) Copy(t TestingT) {
- if tt, ok := t.(tHelper); ok {
- tt.Helper()
- }
- for _, err := range c.errors {
- t.Errorf("%v", err)
- }
+// Deprecated: That was a method for internal usage that should not have been published. Now just panics.
+func (*CollectT) Copy(TestingT) {
+ panic("Copy() is deprecated")
}
// EventuallyWithT asserts that given condition will be met in waitFor time,
@@ -1912,8 +1957,8 @@ func EventuallyWithT(t TestingT, condition func(collect *CollectT), waitFor time
h.Helper()
}
- collect := new(CollectT)
- ch := make(chan bool, 1)
+ var lastFinishedTickErrs []error
+ ch := make(chan []error, 1)
timer := time.NewTimer(waitFor)
defer timer.Stop()
@@ -1924,19 +1969,25 @@ func EventuallyWithT(t TestingT, condition func(collect *CollectT), waitFor time
for tick := ticker.C; ; {
select {
case <-timer.C:
- collect.Copy(t)
+ for _, err := range lastFinishedTickErrs {
+ t.Errorf("%v", err)
+ }
return Fail(t, "Condition never satisfied", msgAndArgs...)
case <-tick:
tick = nil
- collect.Reset()
go func() {
+ collect := new(CollectT)
+ defer func() {
+ ch <- collect.errors
+ }()
condition(collect)
- ch <- len(collect.errors) == 0
}()
- case v := <-ch:
- if v {
+ case errs := <-ch:
+ if len(errs) == 0 {
return true
}
+ // Keep the errors from the last ended condition, so that they can be copied to t if timeout is reached.
+ lastFinishedTickErrs = errs
tick = ticker.C
}
}
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/http_assertions.go b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/http_assertions.go
index d8038c28a7..861ed4b7ce 100644
--- a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/http_assertions.go
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/assert/http_assertions.go
@@ -12,7 +12,7 @@ import (
// an error if building a new request fails.
func httpCode(handler http.HandlerFunc, method, url string, values url.Values) (int, error) {
w := httptest.NewRecorder()
- req, err := http.NewRequest(method, url, nil)
+ req, err := http.NewRequest(method, url, http.NoBody)
if err != nil {
return -1, err
}
@@ -32,12 +32,12 @@ func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, value
}
code, err := httpCode(handler, method, url, values)
if err != nil {
- Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err))
+ Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...)
}
isSuccessCode := code >= http.StatusOK && code <= http.StatusPartialContent
if !isSuccessCode {
- Fail(t, fmt.Sprintf("Expected HTTP success status code for %q but received %d", url+"?"+values.Encode(), code))
+ Fail(t, fmt.Sprintf("Expected HTTP success status code for %q but received %d", url+"?"+values.Encode(), code), msgAndArgs...)
}
return isSuccessCode
@@ -54,12 +54,12 @@ func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, valu
}
code, err := httpCode(handler, method, url, values)
if err != nil {
- Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err))
+ Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...)
}
isRedirectCode := code >= http.StatusMultipleChoices && code <= http.StatusTemporaryRedirect
if !isRedirectCode {
- Fail(t, fmt.Sprintf("Expected HTTP redirect status code for %q but received %d", url+"?"+values.Encode(), code))
+ Fail(t, fmt.Sprintf("Expected HTTP redirect status code for %q but received %d", url+"?"+values.Encode(), code), msgAndArgs...)
}
return isRedirectCode
@@ -76,12 +76,12 @@ func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values
}
code, err := httpCode(handler, method, url, values)
if err != nil {
- Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err))
+ Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...)
}
isErrorCode := code >= http.StatusBadRequest
if !isErrorCode {
- Fail(t, fmt.Sprintf("Expected HTTP error status code for %q but received %d", url+"?"+values.Encode(), code))
+ Fail(t, fmt.Sprintf("Expected HTTP error status code for %q but received %d", url+"?"+values.Encode(), code), msgAndArgs...)
}
return isErrorCode
@@ -98,12 +98,12 @@ func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method, url string, va
}
code, err := httpCode(handler, method, url, values)
if err != nil {
- Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err))
+ Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...)
}
successful := code == statuscode
if !successful {
- Fail(t, fmt.Sprintf("Expected HTTP status code %d for %q but received %d", statuscode, url+"?"+values.Encode(), code))
+ Fail(t, fmt.Sprintf("Expected HTTP status code %d for %q but received %d", statuscode, url+"?"+values.Encode(), code), msgAndArgs...)
}
return successful
@@ -113,7 +113,10 @@ func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method, url string, va
// empty string if building a new request fails.
func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) string {
w := httptest.NewRecorder()
- req, err := http.NewRequest(method, url+"?"+values.Encode(), nil)
+ if len(values) > 0 {
+ url += "?" + values.Encode()
+ }
+ req, err := http.NewRequest(method, url, http.NoBody)
if err != nil {
return ""
}
@@ -135,7 +138,7 @@ func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string,
contains := strings.Contains(body, fmt.Sprint(str))
if !contains {
- Fail(t, fmt.Sprintf("Expected response body for \"%s\" to contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body))
+ Fail(t, fmt.Sprintf("Expected response body for \"%s\" to contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body), msgAndArgs...)
}
return contains
@@ -155,7 +158,7 @@ func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url strin
contains := strings.Contains(body, fmt.Sprint(str))
if contains {
- Fail(t, fmt.Sprintf("Expected response body for \"%s\" to NOT contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body))
+ Fail(t, fmt.Sprintf("Expected response body for \"%s\" to NOT contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body), msgAndArgs...)
}
return !contains
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/require/require.go b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/require/require.go
index 63f8521476..506a82f807 100644
--- a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/require/require.go
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/require/require.go
@@ -1,7 +1,4 @@
-/*
-* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen
-* THIS FILE MUST NOT BE EDITED BY HAND
- */
+// Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT.
package require
@@ -235,7 +232,7 @@ func EqualExportedValuesf(t TestingT, expected interface{}, actual interface{},
t.FailNow()
}
-// EqualValues asserts that two objects are equal or convertable to the same types
+// EqualValues asserts that two objects are equal or convertible to the same types
// and equal.
//
// assert.EqualValues(t, uint32(123), int32(123))
@@ -249,7 +246,7 @@ func EqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArg
t.FailNow()
}
-// EqualValuesf asserts that two objects are equal or convertable to the same types
+// EqualValuesf asserts that two objects are equal or convertible to the same types
// and equal.
//
// assert.EqualValuesf(t, uint32(123), int32(123), "error message %s", "formatted")
@@ -1546,6 +1543,32 @@ func NotErrorIsf(t TestingT, err error, target error, msg string, args ...interf
t.FailNow()
}
+// NotImplements asserts that an object does not implement the specified interface.
+//
+// assert.NotImplements(t, (*MyInterface)(nil), new(MyObject))
+func NotImplements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ if assert.NotImplements(t, interfaceObject, object, msgAndArgs...) {
+ return
+ }
+ t.FailNow()
+}
+
+// NotImplementsf asserts that an object does not implement the specified interface.
+//
+// assert.NotImplementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted")
+func NotImplementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ if assert.NotImplementsf(t, interfaceObject, object, msg, args...) {
+ return
+ }
+ t.FailNow()
+}
+
// NotNil asserts that the specified object is not nil.
//
// assert.NotNil(t, err)
@@ -1658,10 +1681,12 @@ func NotSamef(t TestingT, expected interface{}, actual interface{}, msg string,
t.FailNow()
}
-// NotSubset asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
+// NotSubset asserts that the specified list(array, slice...) or map does NOT
+// contain all elements given in the specified subset list(array, slice...) or
+// map.
//
-// assert.NotSubset(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]")
+// assert.NotSubset(t, [1, 3, 4], [1, 2])
+// assert.NotSubset(t, {"x": 1, "y": 2}, {"z": 3})
func NotSubset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -1672,10 +1697,12 @@ func NotSubset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...i
t.FailNow()
}
-// NotSubsetf asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
+// NotSubsetf asserts that the specified list(array, slice...) or map does NOT
+// contain all elements given in the specified subset list(array, slice...) or
+// map.
//
-// assert.NotSubsetf(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted")
+// assert.NotSubsetf(t, [1, 3, 4], [1, 2], "error message %s", "formatted")
+// assert.NotSubsetf(t, {"x": 1, "y": 2}, {"z": 3}, "error message %s", "formatted")
func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -1880,10 +1907,11 @@ func Samef(t TestingT, expected interface{}, actual interface{}, msg string, arg
t.FailNow()
}
-// Subset asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
+// Subset asserts that the specified list(array, slice...) or map contains all
+// elements given in the specified subset list(array, slice...) or map.
//
-// assert.Subset(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]")
+// assert.Subset(t, [1, 2, 3], [1, 2])
+// assert.Subset(t, {"x": 1, "y": 2}, {"x": 1})
func Subset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) {
if h, ok := t.(tHelper); ok {
h.Helper()
@@ -1894,10 +1922,11 @@ func Subset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...inte
t.FailNow()
}
-// Subsetf asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
+// Subsetf asserts that the specified list(array, slice...) or map contains all
+// elements given in the specified subset list(array, slice...) or map.
//
-// assert.Subsetf(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted")
+// assert.Subsetf(t, [1, 2, 3], [1, 2], "error message %s", "formatted")
+// assert.Subsetf(t, {"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted")
func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) {
if h, ok := t.(tHelper); ok {
h.Helper()
diff --git a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/require/require_forward.go b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/require/require_forward.go
index 3b5b09330a..eee8310a5f 100644
--- a/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/require/require_forward.go
+++ b/trunk/3rdparty/srs-bench/vendor/github.com/stretchr/testify/require/require_forward.go
@@ -1,7 +1,4 @@
-/*
-* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen
-* THIS FILE MUST NOT BE EDITED BY HAND
- */
+// Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT.
package require
@@ -190,7 +187,7 @@ func (a *Assertions) EqualExportedValuesf(expected interface{}, actual interface
EqualExportedValuesf(a.t, expected, actual, msg, args...)
}
-// EqualValues asserts that two objects are equal or convertable to the same types
+// EqualValues asserts that two objects are equal or convertible to the same types
// and equal.
//
// a.EqualValues(uint32(123), int32(123))
@@ -201,7 +198,7 @@ func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAn
EqualValues(a.t, expected, actual, msgAndArgs...)
}
-// EqualValuesf asserts that two objects are equal or convertable to the same types
+// EqualValuesf asserts that two objects are equal or convertible to the same types
// and equal.
//
// a.EqualValuesf(uint32(123), int32(123), "error message %s", "formatted")
@@ -1222,6 +1219,26 @@ func (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...in
NotErrorIsf(a.t, err, target, msg, args...)
}
+// NotImplements asserts that an object does not implement the specified interface.
+//
+// a.NotImplements((*MyInterface)(nil), new(MyObject))
+func (a *Assertions) NotImplements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ NotImplements(a.t, interfaceObject, object, msgAndArgs...)
+}
+
+// NotImplementsf asserts that an object does not implement the specified interface.
+//
+// a.NotImplementsf((*MyInterface)(nil), new(MyObject), "error message %s", "formatted")
+func (a *Assertions) NotImplementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ NotImplementsf(a.t, interfaceObject, object, msg, args...)
+}
+
// NotNil asserts that the specified object is not nil.
//
// a.NotNil(err)
@@ -1310,10 +1327,12 @@ func (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg stri
NotSamef(a.t, expected, actual, msg, args...)
}
-// NotSubset asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
+// NotSubset asserts that the specified list(array, slice...) or map does NOT
+// contain all elements given in the specified subset list(array, slice...) or
+// map.
//
-// a.NotSubset([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]")
+// a.NotSubset([1, 3, 4], [1, 2])
+// a.NotSubset({"x": 1, "y": 2}, {"z": 3})
func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -1321,10 +1340,12 @@ func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs
NotSubset(a.t, list, subset, msgAndArgs...)
}
-// NotSubsetf asserts that the specified list(array, slice...) contains not all
-// elements given in the specified subset(array, slice...).
+// NotSubsetf asserts that the specified list(array, slice...) or map does NOT
+// contain all elements given in the specified subset list(array, slice...) or
+// map.
//
-// a.NotSubsetf([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted")
+// a.NotSubsetf([1, 3, 4], [1, 2], "error message %s", "formatted")
+// a.NotSubsetf({"x": 1, "y": 2}, {"z": 3}, "error message %s", "formatted")
func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -1484,10 +1505,11 @@ func (a *Assertions) Samef(expected interface{}, actual interface{}, msg string,
Samef(a.t, expected, actual, msg, args...)
}
-// Subset asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
+// Subset asserts that the specified list(array, slice...) or map contains all
+// elements given in the specified subset list(array, slice...) or map.
//
-// a.Subset([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]")
+// a.Subset([1, 2, 3], [1, 2])
+// a.Subset({"x": 1, "y": 2}, {"x": 1})
func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) {
if h, ok := a.t.(tHelper); ok {
h.Helper()
@@ -1495,10 +1517,11 @@ func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...
Subset(a.t, list, subset, msgAndArgs...)
}
-// Subsetf asserts that the specified list(array, slice...) contains all
-// elements given in the specified subset(array, slice...).
+// Subsetf asserts that the specified list(array, slice...) or map contains all
+// elements given in the specified subset list(array, slice...) or map.
//
-// a.Subsetf([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted")
+// a.Subsetf([1, 2, 3], [1, 2], "error message %s", "formatted")
+// a.Subsetf({"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted")
func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) {
if h, ok := a.t.(tHelper); ok {
h.Helper()
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/cryptobyte/asn1.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/cryptobyte/asn1.go
index 6fc2838a3f..2492f796af 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/cryptobyte/asn1.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/cryptobyte/asn1.go
@@ -733,13 +733,14 @@ func (s *String) ReadOptionalASN1OctetString(out *[]byte, outPresent *bool, tag
return true
}
-// ReadOptionalASN1Boolean sets *out to the value of the next ASN.1 BOOLEAN or,
-// if the next bytes are not an ASN.1 BOOLEAN, to the value of defaultValue.
-// It reports whether the operation was successful.
-func (s *String) ReadOptionalASN1Boolean(out *bool, defaultValue bool) bool {
+// ReadOptionalASN1Boolean attempts to read an optional ASN.1 BOOLEAN
+// explicitly tagged with tag into out and advances. If no element with a
+// matching tag is present, it sets "out" to defaultValue instead. It reports
+// whether the read was successful.
+func (s *String) ReadOptionalASN1Boolean(out *bool, tag asn1.Tag, defaultValue bool) bool {
var present bool
var child String
- if !s.ReadOptionalASN1(&child, &present, asn1.BOOLEAN) {
+ if !s.ReadOptionalASN1(&child, &present, tag) {
return false
}
@@ -748,7 +749,7 @@ func (s *String) ReadOptionalASN1Boolean(out *bool, defaultValue bool) bool {
return true
}
- return s.ReadASN1Boolean(out)
+ return child.ReadASN1Boolean(out)
}
func (s *String) readASN1(out *String, outTag *asn1.Tag, skipHeader bool) bool {
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/cryptobyte/builder.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/cryptobyte/builder.go
index c05ac7d16d..cf254f5f1e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/cryptobyte/builder.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/cryptobyte/builder.go
@@ -95,6 +95,11 @@ func (b *Builder) AddUint32(v uint32) {
b.add(byte(v>>24), byte(v>>16), byte(v>>8), byte(v))
}
+// AddUint48 appends a big-endian, 48-bit value to the byte string.
+func (b *Builder) AddUint48(v uint64) {
+ b.add(byte(v>>40), byte(v>>32), byte(v>>24), byte(v>>16), byte(v>>8), byte(v))
+}
+
// AddUint64 appends a big-endian, 64-bit value to the byte string.
func (b *Builder) AddUint64(v uint64) {
b.add(byte(v>>56), byte(v>>48), byte(v>>40), byte(v>>32), byte(v>>24), byte(v>>16), byte(v>>8), byte(v))
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/cryptobyte/string.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/cryptobyte/string.go
index 0531a3d6f1..10692a8a31 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/cryptobyte/string.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/cryptobyte/string.go
@@ -81,6 +81,17 @@ func (s *String) ReadUint32(out *uint32) bool {
return true
}
+// ReadUint48 decodes a big-endian, 48-bit value into out and advances over it.
+// It reports whether the read was successful.
+func (s *String) ReadUint48(out *uint64) bool {
+ v := s.read(6)
+ if v == nil {
+ return false
+ }
+ *out = uint64(v[0])<<40 | uint64(v[1])<<32 | uint64(v[2])<<24 | uint64(v[3])<<16 | uint64(v[4])<<8 | uint64(v[5])
+ return true
+}
+
// ReadUint64 decodes a big-endian, 64-bit value into out and advances over it.
// It reports whether the read was successful.
func (s *String) ReadUint64(out *uint64) bool {
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go
index edcf163c4e..70c541692c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go
@@ -1,7 +1,6 @@
// Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT.
//go:build amd64 && gc && !purego
-// +build amd64,gc,!purego
package field
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s
index 293f013c94..60817acc41 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s
@@ -1,7 +1,6 @@
// Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT.
//go:build amd64 && gc && !purego
-// +build amd64,gc,!purego
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go
index ddb6c9b8f7..9da280d1d8 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !amd64 || !gc || purego
-// +build !amd64 !gc purego
package field
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go
index af459ef515..075fe9b925 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build arm64 && gc && !purego
-// +build arm64,gc,!purego
package field
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s
index 5c91e45892..3126a43419 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build arm64 && gc && !purego
-// +build arm64,gc,!purego
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go
index 234a5b2e5d..fc029ac12d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !arm64 || !gc || purego
-// +build !arm64 !gc purego
package field
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/dns/dnsmessage/message.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/dns/dnsmessage/message.go
index ffdf19d5d3..a656efc128 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/dns/dnsmessage/message.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/dns/dnsmessage/message.go
@@ -260,9 +260,11 @@ var (
errReserved = errors.New("segment prefix is reserved")
errTooManyPtr = errors.New("too many pointers (>10)")
errInvalidPtr = errors.New("invalid pointer")
+ errInvalidName = errors.New("invalid dns name")
errNilResouceBody = errors.New("nil resource body")
errResourceLen = errors.New("insufficient data for resource body length")
errSegTooLong = errors.New("segment length too long")
+ errNameTooLong = errors.New("name too long")
errZeroSegLen = errors.New("zero length segment")
errResTooLong = errors.New("resource length too long")
errTooManyQuestions = errors.New("too many Questions to pack (>65535)")
@@ -271,7 +273,6 @@ var (
errTooManyAdditionals = errors.New("too many Additionals to pack (>65535)")
errNonCanonicalName = errors.New("name is not in canonical format (it must end with a .)")
errStringTooLong = errors.New("character string exceeds maximum length (255)")
- errCompressedSRV = errors.New("compressed name in SRV resource data")
)
// Internal constants.
@@ -359,6 +360,8 @@ func (m *Header) GoString() string {
"Truncated: " + printBool(m.Truncated) + ", " +
"RecursionDesired: " + printBool(m.RecursionDesired) + ", " +
"RecursionAvailable: " + printBool(m.RecursionAvailable) + ", " +
+ "AuthenticData: " + printBool(m.AuthenticData) + ", " +
+ "CheckingDisabled: " + printBool(m.CheckingDisabled) + ", " +
"RCode: " + m.RCode.GoString() + "}"
}
@@ -488,7 +491,7 @@ func (r *Resource) GoString() string {
// A ResourceBody is a DNS resource record minus the header.
type ResourceBody interface {
// pack packs a Resource except for its header.
- pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error)
+ pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error)
// realType returns the actual type of the Resource. This is used to
// fill in the header Type field.
@@ -499,7 +502,7 @@ type ResourceBody interface {
}
// pack appends the wire format of the Resource to msg.
-func (r *Resource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+func (r *Resource) pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error) {
if r.Body == nil {
return msg, errNilResouceBody
}
@@ -525,22 +528,26 @@ func (r *Resource) pack(msg []byte, compression map[string]int, compressionOff i
// When parsing is started, the Header is parsed. Next, each Question can be
// either parsed or skipped. Alternatively, all Questions can be skipped at
// once. When all Questions have been parsed, attempting to parse Questions
-// will return (nil, nil) and attempting to skip Questions will return
-// (true, nil). After all Questions have been either parsed or skipped, all
+// will return the [ErrSectionDone] error.
+// After all Questions have been either parsed or skipped, all
// Answers, Authorities and Additionals can be either parsed or skipped in the
// same way, and each type of Resource must be fully parsed or skipped before
// proceeding to the next type of Resource.
//
+// Parser is safe to copy to preserve the parsing state.
+//
// Note that there is no requirement to fully skip or parse the message.
type Parser struct {
msg []byte
header header
- section section
- off int
- index int
- resHeaderValid bool
- resHeader ResourceHeader
+ section section
+ off int
+ index int
+ resHeaderValid bool
+ resHeaderOffset int
+ resHeaderType Type
+ resHeaderLength uint16
}
// Start parses the header and enables the parsing of Questions.
@@ -591,8 +598,9 @@ func (p *Parser) resource(sec section) (Resource, error) {
func (p *Parser) resourceHeader(sec section) (ResourceHeader, error) {
if p.resHeaderValid {
- return p.resHeader, nil
+ p.off = p.resHeaderOffset
}
+
if err := p.checkAdvance(sec); err != nil {
return ResourceHeader{}, err
}
@@ -602,14 +610,16 @@ func (p *Parser) resourceHeader(sec section) (ResourceHeader, error) {
return ResourceHeader{}, err
}
p.resHeaderValid = true
- p.resHeader = hdr
+ p.resHeaderOffset = p.off
+ p.resHeaderType = hdr.Type
+ p.resHeaderLength = hdr.Length
p.off = off
return hdr, nil
}
func (p *Parser) skipResource(sec section) error {
- if p.resHeaderValid {
- newOff := p.off + int(p.resHeader.Length)
+ if p.resHeaderValid && p.section == sec {
+ newOff := p.off + int(p.resHeaderLength)
if newOff > len(p.msg) {
return errResourceLen
}
@@ -740,6 +750,9 @@ func (p *Parser) AllAnswers() ([]Resource, error) {
}
// SkipAnswer skips a single Answer Resource.
+//
+// It does not perform a complete validation of the resource header, which means
+// it may return a nil error when the [AnswerHeader] would actually return an error.
func (p *Parser) SkipAnswer() error {
return p.skipResource(sectionAnswers)
}
@@ -790,6 +803,9 @@ func (p *Parser) AllAuthorities() ([]Resource, error) {
}
// SkipAuthority skips a single Authority Resource.
+//
+// It does not perform a complete validation of the resource header, which means
+// it may return a nil error when the [AuthorityHeader] would actually return an error.
func (p *Parser) SkipAuthority() error {
return p.skipResource(sectionAuthorities)
}
@@ -840,6 +856,9 @@ func (p *Parser) AllAdditionals() ([]Resource, error) {
}
// SkipAdditional skips a single Additional Resource.
+//
+// It does not perform a complete validation of the resource header, which means
+// it may return a nil error when the [AdditionalHeader] would actually return an error.
func (p *Parser) SkipAdditional() error {
return p.skipResource(sectionAdditionals)
}
@@ -860,14 +879,14 @@ func (p *Parser) SkipAllAdditionals() error {
// One of the XXXHeader methods must have been called before calling this
// method.
func (p *Parser) CNAMEResource() (CNAMEResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeCNAME {
+ if !p.resHeaderValid || p.resHeaderType != TypeCNAME {
return CNAMEResource{}, ErrNotStarted
}
r, err := unpackCNAMEResource(p.msg, p.off)
if err != nil {
return CNAMEResource{}, err
}
- p.off += int(p.resHeader.Length)
+ p.off += int(p.resHeaderLength)
p.resHeaderValid = false
p.index++
return r, nil
@@ -878,14 +897,14 @@ func (p *Parser) CNAMEResource() (CNAMEResource, error) {
// One of the XXXHeader methods must have been called before calling this
// method.
func (p *Parser) MXResource() (MXResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeMX {
+ if !p.resHeaderValid || p.resHeaderType != TypeMX {
return MXResource{}, ErrNotStarted
}
r, err := unpackMXResource(p.msg, p.off)
if err != nil {
return MXResource{}, err
}
- p.off += int(p.resHeader.Length)
+ p.off += int(p.resHeaderLength)
p.resHeaderValid = false
p.index++
return r, nil
@@ -896,14 +915,14 @@ func (p *Parser) MXResource() (MXResource, error) {
// One of the XXXHeader methods must have been called before calling this
// method.
func (p *Parser) NSResource() (NSResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeNS {
+ if !p.resHeaderValid || p.resHeaderType != TypeNS {
return NSResource{}, ErrNotStarted
}
r, err := unpackNSResource(p.msg, p.off)
if err != nil {
return NSResource{}, err
}
- p.off += int(p.resHeader.Length)
+ p.off += int(p.resHeaderLength)
p.resHeaderValid = false
p.index++
return r, nil
@@ -914,14 +933,14 @@ func (p *Parser) NSResource() (NSResource, error) {
// One of the XXXHeader methods must have been called before calling this
// method.
func (p *Parser) PTRResource() (PTRResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypePTR {
+ if !p.resHeaderValid || p.resHeaderType != TypePTR {
return PTRResource{}, ErrNotStarted
}
r, err := unpackPTRResource(p.msg, p.off)
if err != nil {
return PTRResource{}, err
}
- p.off += int(p.resHeader.Length)
+ p.off += int(p.resHeaderLength)
p.resHeaderValid = false
p.index++
return r, nil
@@ -932,14 +951,14 @@ func (p *Parser) PTRResource() (PTRResource, error) {
// One of the XXXHeader methods must have been called before calling this
// method.
func (p *Parser) SOAResource() (SOAResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeSOA {
+ if !p.resHeaderValid || p.resHeaderType != TypeSOA {
return SOAResource{}, ErrNotStarted
}
r, err := unpackSOAResource(p.msg, p.off)
if err != nil {
return SOAResource{}, err
}
- p.off += int(p.resHeader.Length)
+ p.off += int(p.resHeaderLength)
p.resHeaderValid = false
p.index++
return r, nil
@@ -950,14 +969,14 @@ func (p *Parser) SOAResource() (SOAResource, error) {
// One of the XXXHeader methods must have been called before calling this
// method.
func (p *Parser) TXTResource() (TXTResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeTXT {
+ if !p.resHeaderValid || p.resHeaderType != TypeTXT {
return TXTResource{}, ErrNotStarted
}
- r, err := unpackTXTResource(p.msg, p.off, p.resHeader.Length)
+ r, err := unpackTXTResource(p.msg, p.off, p.resHeaderLength)
if err != nil {
return TXTResource{}, err
}
- p.off += int(p.resHeader.Length)
+ p.off += int(p.resHeaderLength)
p.resHeaderValid = false
p.index++
return r, nil
@@ -968,14 +987,14 @@ func (p *Parser) TXTResource() (TXTResource, error) {
// One of the XXXHeader methods must have been called before calling this
// method.
func (p *Parser) SRVResource() (SRVResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeSRV {
+ if !p.resHeaderValid || p.resHeaderType != TypeSRV {
return SRVResource{}, ErrNotStarted
}
r, err := unpackSRVResource(p.msg, p.off)
if err != nil {
return SRVResource{}, err
}
- p.off += int(p.resHeader.Length)
+ p.off += int(p.resHeaderLength)
p.resHeaderValid = false
p.index++
return r, nil
@@ -986,14 +1005,14 @@ func (p *Parser) SRVResource() (SRVResource, error) {
// One of the XXXHeader methods must have been called before calling this
// method.
func (p *Parser) AResource() (AResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeA {
+ if !p.resHeaderValid || p.resHeaderType != TypeA {
return AResource{}, ErrNotStarted
}
r, err := unpackAResource(p.msg, p.off)
if err != nil {
return AResource{}, err
}
- p.off += int(p.resHeader.Length)
+ p.off += int(p.resHeaderLength)
p.resHeaderValid = false
p.index++
return r, nil
@@ -1004,14 +1023,14 @@ func (p *Parser) AResource() (AResource, error) {
// One of the XXXHeader methods must have been called before calling this
// method.
func (p *Parser) AAAAResource() (AAAAResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeAAAA {
+ if !p.resHeaderValid || p.resHeaderType != TypeAAAA {
return AAAAResource{}, ErrNotStarted
}
r, err := unpackAAAAResource(p.msg, p.off)
if err != nil {
return AAAAResource{}, err
}
- p.off += int(p.resHeader.Length)
+ p.off += int(p.resHeaderLength)
p.resHeaderValid = false
p.index++
return r, nil
@@ -1022,14 +1041,14 @@ func (p *Parser) AAAAResource() (AAAAResource, error) {
// One of the XXXHeader methods must have been called before calling this
// method.
func (p *Parser) OPTResource() (OPTResource, error) {
- if !p.resHeaderValid || p.resHeader.Type != TypeOPT {
+ if !p.resHeaderValid || p.resHeaderType != TypeOPT {
return OPTResource{}, ErrNotStarted
}
- r, err := unpackOPTResource(p.msg, p.off, p.resHeader.Length)
+ r, err := unpackOPTResource(p.msg, p.off, p.resHeaderLength)
if err != nil {
return OPTResource{}, err
}
- p.off += int(p.resHeader.Length)
+ p.off += int(p.resHeaderLength)
p.resHeaderValid = false
p.index++
return r, nil
@@ -1043,11 +1062,11 @@ func (p *Parser) UnknownResource() (UnknownResource, error) {
if !p.resHeaderValid {
return UnknownResource{}, ErrNotStarted
}
- r, err := unpackUnknownResource(p.resHeader.Type, p.msg, p.off, p.resHeader.Length)
+ r, err := unpackUnknownResource(p.resHeaderType, p.msg, p.off, p.resHeaderLength)
if err != nil {
return UnknownResource{}, err
}
- p.off += int(p.resHeader.Length)
+ p.off += int(p.resHeaderLength)
p.resHeaderValid = false
p.index++
return r, nil
@@ -1118,7 +1137,7 @@ func (m *Message) AppendPack(b []byte) ([]byte, error) {
// DNS messages can be a maximum of 512 bytes long. Without compression,
// many DNS response messages are over this limit, so enabling
// compression will help ensure compliance.
- compression := map[string]int{}
+ compression := map[string]uint16{}
for i := range m.Questions {
var err error
@@ -1209,7 +1228,7 @@ type Builder struct {
// compression is a mapping from name suffixes to their starting index
// in msg.
- compression map[string]int
+ compression map[string]uint16
}
// NewBuilder creates a new builder with compression disabled.
@@ -1246,7 +1265,7 @@ func NewBuilder(buf []byte, h Header) Builder {
//
// Compression should be enabled before any sections are added for best results.
func (b *Builder) EnableCompression() {
- b.compression = map[string]int{}
+ b.compression = map[string]uint16{}
}
func (b *Builder) startCheck(s section) error {
@@ -1662,7 +1681,7 @@ func (h *ResourceHeader) GoString() string {
// pack appends the wire format of the ResourceHeader to oldMsg.
//
// lenOff is the offset in msg where the Length field was packed.
-func (h *ResourceHeader) pack(oldMsg []byte, compression map[string]int, compressionOff int) (msg []byte, lenOff int, err error) {
+func (h *ResourceHeader) pack(oldMsg []byte, compression map[string]uint16, compressionOff int) (msg []byte, lenOff int, err error) {
msg = oldMsg
if msg, err = h.Name.pack(msg, compression, compressionOff); err != nil {
return oldMsg, 0, &nestedError{"Name", err}
@@ -1728,7 +1747,7 @@ const (
//
// The provided extRCode must be an extended RCode.
func (h *ResourceHeader) SetEDNS0(udpPayloadLen int, extRCode RCode, dnssecOK bool) error {
- h.Name = Name{Data: [nameLen]byte{'.'}, Length: 1} // RFC 6891 section 6.1.2
+ h.Name = Name{Data: [255]byte{'.'}, Length: 1} // RFC 6891 section 6.1.2
h.Type = TypeOPT
h.Class = Class(udpPayloadLen)
h.TTL = uint32(extRCode) >> 4 << 24
@@ -1888,21 +1907,21 @@ func unpackBytes(msg []byte, off int, field []byte) (int, error) {
return newOff, nil
}
-const nameLen = 255
+const nonEncodedNameMax = 254
-// A Name is a non-encoded domain name. It is used instead of strings to avoid
+// A Name is a non-encoded and non-escaped domain name. It is used instead of strings to avoid
// allocations.
type Name struct {
- Data [nameLen]byte // 255 bytes
+ Data [255]byte
Length uint8
}
// NewName creates a new Name from a string.
func NewName(name string) (Name, error) {
- if len(name) > nameLen {
+ n := Name{Length: uint8(len(name))}
+ if len(name) > len(n.Data) {
return Name{}, errCalcLen
}
- n := Name{Length: uint8(len(name))}
copy(n.Data[:], name)
return n, nil
}
@@ -1917,6 +1936,8 @@ func MustNewName(name string) Name {
}
// String implements fmt.Stringer.String.
+//
+// Note: characters inside the labels are not escaped in any way.
func (n Name) String() string {
return string(n.Data[:n.Length])
}
@@ -1933,9 +1954,13 @@ func (n *Name) GoString() string {
//
// The compression map will be updated with new domain suffixes. If compression
// is nil, compression will not be used.
-func (n *Name) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+func (n *Name) pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error) {
oldMsg := msg
+ if n.Length > nonEncodedNameMax {
+ return nil, errNameTooLong
+ }
+
// Add a trailing dot to canonicalize name.
if n.Length == 0 || n.Data[n.Length-1] != '.' {
return oldMsg, errNonCanonicalName
@@ -1946,6 +1971,8 @@ func (n *Name) pack(msg []byte, compression map[string]int, compressionOff int)
return append(msg, 0), nil
}
+ var nameAsStr string
+
// Emit sequence of counted strings, chopping at dots.
for i, begin := 0, 0; i < int(n.Length); i++ {
// Check for the end of the segment.
@@ -1976,16 +2003,22 @@ func (n *Name) pack(msg []byte, compression map[string]int, compressionOff int)
// segment. A pointer is two bytes with the two most significant
// bits set to 1 to indicate that it is a pointer.
if (i == 0 || n.Data[i-1] == '.') && compression != nil {
- if ptr, ok := compression[string(n.Data[i:])]; ok {
+ if ptr, ok := compression[string(n.Data[i:n.Length])]; ok {
// Hit. Emit a pointer instead of the rest of
// the domain.
return append(msg, byte(ptr>>8|0xC0), byte(ptr)), nil
}
// Miss. Add the suffix to the compression table if the
- // offset can be stored in the available 14 bytes.
- if len(msg) <= int(^uint16(0)>>2) {
- compression[string(n.Data[i:])] = len(msg) - compressionOff
+ // offset can be stored in the available 14 bits.
+ newPtr := len(msg) - compressionOff
+ if newPtr <= int(^uint16(0)>>2) {
+ if nameAsStr == "" {
+ // allocate n.Data on the heap once, to avoid allocating it
+ // multiple times (for next labels).
+ nameAsStr = string(n.Data[:n.Length])
+ }
+ compression[nameAsStr[i:]] = uint16(newPtr)
}
}
}
@@ -1994,10 +2027,6 @@ func (n *Name) pack(msg []byte, compression map[string]int, compressionOff int)
// unpack unpacks a domain name.
func (n *Name) unpack(msg []byte, off int) (int, error) {
- return n.unpackCompressed(msg, off, true /* allowCompression */)
-}
-
-func (n *Name) unpackCompressed(msg []byte, off int, allowCompression bool) (int, error) {
// currOff is the current working offset.
currOff := off
@@ -2029,13 +2058,19 @@ Loop:
if endOff > len(msg) {
return off, errCalcLen
}
+
+ // Reject names containing dots.
+ // See issue golang/go#56246
+ for _, v := range msg[currOff:endOff] {
+ if v == '.' {
+ return off, errInvalidName
+ }
+ }
+
name = append(name, msg[currOff:endOff]...)
name = append(name, '.')
currOff = endOff
case 0xC0: // Pointer
- if !allowCompression {
- return off, errCompressedSRV
- }
if currOff >= len(msg) {
return off, errInvalidPtr
}
@@ -2057,8 +2092,8 @@ Loop:
if len(name) == 0 {
name = append(name, '.')
}
- if len(name) > len(n.Data) {
- return off, errCalcLen
+ if len(name) > nonEncodedNameMax {
+ return off, errNameTooLong
}
n.Length = uint8(len(name))
if ptr == 0 {
@@ -2116,7 +2151,7 @@ type Question struct {
}
// pack appends the wire format of the Question to msg.
-func (q *Question) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+func (q *Question) pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error) {
msg, err := q.Name.pack(msg, compression, compressionOff)
if err != nil {
return msg, &nestedError{"Name", err}
@@ -2212,7 +2247,7 @@ func (r *CNAMEResource) realType() Type {
}
// pack appends the wire format of the CNAMEResource to msg.
-func (r *CNAMEResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+func (r *CNAMEResource) pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error) {
return r.CNAME.pack(msg, compression, compressionOff)
}
@@ -2240,7 +2275,7 @@ func (r *MXResource) realType() Type {
}
// pack appends the wire format of the MXResource to msg.
-func (r *MXResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+func (r *MXResource) pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error) {
oldMsg := msg
msg = packUint16(msg, r.Pref)
msg, err := r.MX.pack(msg, compression, compressionOff)
@@ -2279,7 +2314,7 @@ func (r *NSResource) realType() Type {
}
// pack appends the wire format of the NSResource to msg.
-func (r *NSResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+func (r *NSResource) pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error) {
return r.NS.pack(msg, compression, compressionOff)
}
@@ -2306,7 +2341,7 @@ func (r *PTRResource) realType() Type {
}
// pack appends the wire format of the PTRResource to msg.
-func (r *PTRResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+func (r *PTRResource) pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error) {
return r.PTR.pack(msg, compression, compressionOff)
}
@@ -2343,7 +2378,7 @@ func (r *SOAResource) realType() Type {
}
// pack appends the wire format of the SOAResource to msg.
-func (r *SOAResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+func (r *SOAResource) pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error) {
oldMsg := msg
msg, err := r.NS.pack(msg, compression, compressionOff)
if err != nil {
@@ -2415,7 +2450,7 @@ func (r *TXTResource) realType() Type {
}
// pack appends the wire format of the TXTResource to msg.
-func (r *TXTResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+func (r *TXTResource) pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error) {
oldMsg := msg
for _, s := range r.TXT {
var err error
@@ -2471,7 +2506,7 @@ func (r *SRVResource) realType() Type {
}
// pack appends the wire format of the SRVResource to msg.
-func (r *SRVResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+func (r *SRVResource) pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error) {
oldMsg := msg
msg = packUint16(msg, r.Priority)
msg = packUint16(msg, r.Weight)
@@ -2506,7 +2541,7 @@ func unpackSRVResource(msg []byte, off int) (SRVResource, error) {
return SRVResource{}, &nestedError{"Port", err}
}
var target Name
- if _, err := target.unpackCompressed(msg, off, false /* allowCompression */); err != nil {
+ if _, err := target.unpack(msg, off); err != nil {
return SRVResource{}, &nestedError{"Target", err}
}
return SRVResource{priority, weight, port, target}, nil
@@ -2522,7 +2557,7 @@ func (r *AResource) realType() Type {
}
// pack appends the wire format of the AResource to msg.
-func (r *AResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+func (r *AResource) pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error) {
return packBytes(msg, r.A[:]), nil
}
@@ -2556,7 +2591,7 @@ func (r *AAAAResource) GoString() string {
}
// pack appends the wire format of the AAAAResource to msg.
-func (r *AAAAResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+func (r *AAAAResource) pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error) {
return packBytes(msg, r.AAAA[:]), nil
}
@@ -2596,7 +2631,7 @@ func (r *OPTResource) realType() Type {
return TypeOPT
}
-func (r *OPTResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+func (r *OPTResource) pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error) {
for _, opt := range r.Options {
msg = packUint16(msg, opt.Code)
l := uint16(len(opt.Data))
@@ -2654,7 +2689,7 @@ func (r *UnknownResource) realType() Type {
}
// pack appends the wire format of the UnknownResource to msg.
-func (r *UnknownResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+func (r *UnknownResource) pack(msg []byte, compression map[string]uint16, compressionOff int) ([]byte, error) {
return packBytes(msg, r.Data[:]), nil
}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr.go
index 4bdaaaf1ad..33a5bf59c3 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go
index 0d30e0a0f2..68f438c845 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd
-// +build aix darwin dragonfly freebsd netbsd openbsd
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go
index 4936e8a6f3..058ea8de89 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (arm || mips || mipsle || 386 || ppc) && linux
-// +build arm mips mipsle 386 ppc
-// +build linux
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go
index f6877f98fd..3ca0d3a0ab 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (arm64 || amd64 || loong64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && linux
-// +build arm64 amd64 loong64 ppc64 ppc64le mips64 mips64le riscv64 s390x
-// +build linux
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go
index d3dbe1b8e0..6d0e426cdd 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build amd64 && solaris
-// +build amd64,solaris
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go
index 1d9f2ed625..7ca9cb7e78 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
-// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go
index 19d46789de..0211f225bf 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/complete_dontwait.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/complete_dontwait.go
index 5b1d50ae72..2038f29043 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/complete_dontwait.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/complete_dontwait.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/complete_nodontwait.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/complete_nodontwait.go
index be63409583..70e6f448b0 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/complete_nodontwait.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/complete_nodontwait.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || windows || zos
-// +build aix windows zos
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/empty.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/empty.s
index 90ab4ca3d8..49d79791e0 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/empty.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/empty.s
@@ -3,6 +3,5 @@
// license that can be found in the LICENSE file.
//go:build darwin && go1.12
-// +build darwin,go1.12
// This exists solely so we can linkname in symbols from syscall.
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/error_unix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/error_unix.go
index 78f4129047..7a5cc5c43e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/error_unix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/error_unix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_32bit.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_32bit.go
index 2b8fbb3f3d..340e53fbda 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_32bit.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_32bit.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (arm || mips || mipsle || 386 || ppc) && (darwin || dragonfly || freebsd || linux || netbsd || openbsd)
-// +build arm mips mipsle 386 ppc
-// +build darwin dragonfly freebsd linux netbsd openbsd
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_64bit.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_64bit.go
index 2e94e96f8b..26470c191a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_64bit.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_64bit.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (arm64 || amd64 || loong64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || zos)
-// +build arm64 amd64 loong64 ppc64 ppc64le mips64 mips64le riscv64 s390x
-// +build aix darwin dragonfly freebsd linux netbsd openbsd zos
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go
index f7da2bc4d4..8859ce1035 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build amd64 && solaris
-// +build amd64,solaris
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_stub.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_stub.go
index 14caf52483..da886b0326 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_stub.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/iovec_stub.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
-// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go
index 113e773cd5..4825b21e3e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !aix && !linux && !netbsd
-// +build !aix,!linux,!netbsd
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go
index 41883c530c..311fd2c789 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || linux || netbsd
-// +build aix linux netbsd
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go
index 25f6847f99..ebff4f6e05 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd
-// +build aix darwin dragonfly freebsd netbsd openbsd
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go
index 5b8e00f1cd..62e6fe8616 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || netbsd
-// +build aix darwin dragonfly freebsd netbsd
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go
index b4658fbaeb..3dd07250a6 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (arm || mips || mipsle || 386 || ppc) && linux
-// +build arm mips mipsle 386 ppc
-// +build linux
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go
index 42411affad..5af9ddd6ab 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (arm64 || amd64 || loong64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && linux
-// +build arm64 amd64 loong64 ppc64 ppc64le mips64 mips64le riscv64 s390x
-// +build linux
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go
index 3098f5d783..e212b50f8d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build amd64 && solaris
-// +build amd64,solaris
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_stub.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_stub.go
index eb79151f6a..e876776459 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_stub.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_stub.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
-// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_zos_s390x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_zos_s390x.go
index 324e9ee7d1..529db68ee3 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_zos_s390x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/msghdr_zos_s390x.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build s390x && zos
-// +build s390x,zos
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/norace.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/norace.go
index de0ad420fc..8af30ecfbb 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/norace.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/norace.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !race
-// +build !race
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/race.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/race.go
index f0a28a625d..9afa958083 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/race.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/race.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build race
-// +build race
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go
index 8f79b38f74..0431390789 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux
-// +build linux
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_msg.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_msg.go
index f7d0b0d2b8..7c0d7410bc 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_msg.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_msg.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go
index 02f3285566..e363fb5a89 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !linux
-// +build !linux
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go
index dd785877b6..ff7a8baf0b 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
-// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_bsd.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_bsd.go
index b258879d44..e7664d48be 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_bsd.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_bsd.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || openbsd || solaris
-// +build aix darwin dragonfly freebsd openbsd solaris
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_const_unix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_const_unix.go
index 5d99f2373f..d7627f87eb 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_const_unix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_const_unix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_linux.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_linux.go
index 76f5b8ae5d..08d4910778 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_linux.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_linux.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && !s390x && !386
-// +build linux,!s390x,!386
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_linux_loong64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_linux_loong64.go
index af964e6171..1d182470d0 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_linux_loong64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_linux_loong64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build loong64
-// +build loong64
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go
index 5b128fbb2a..0e407d1257 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build riscv64
-// +build riscv64
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_posix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_posix.go
index 42b8f2340e..58d8654824 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_posix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_posix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_stub.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_stub.go
index 7cfb349c0c..2e5b473c66 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_stub.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_stub.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
-// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_unix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_unix.go
index de823932b9..93058db5b9 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_unix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/sys_unix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go
index 00691bd524..45bab004c1 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go
@@ -3,7 +3,6 @@
// Added for go1.11 compatibility
//go:build aix
-// +build aix
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/zsys_linux_loong64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/zsys_linux_loong64.go
index 6a94fec2c5..b6fc15a1a2 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/zsys_linux_loong64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/zsys_linux_loong64.go
@@ -2,7 +2,6 @@
// cgo -godefs defs_linux.go
//go:build loong64
-// +build loong64
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go
index c066272ddd..e67fc3cbaa 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go
@@ -2,7 +2,6 @@
// cgo -godefs defs_linux.go
//go:build riscv64
-// +build riscv64
package socket
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_bsd.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_bsd.go
index b7385dfd95..c88da8cbe7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_bsd.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_bsd.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd
-// +build aix darwin dragonfly freebsd netbsd openbsd
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_pktinfo.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_pktinfo.go
index 0e748dbdc4..14ae2dae49 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_pktinfo.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_pktinfo.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || linux || solaris
-// +build darwin linux solaris
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_stub.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_stub.go
index f27322c3ed..3ba6611609 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_stub.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_stub.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
-// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_unix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_unix.go
index 2413e02f8f..2e765548f3 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_unix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/control_unix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/icmp_stub.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/icmp_stub.go
index cd4ee6e1c9..c2c4ce7ff5 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/icmp_stub.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/icmp_stub.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !linux
-// +build !linux
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/payload_cmsg.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/payload_cmsg.go
index 1bb370e25f..91c685e8fc 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/payload_cmsg.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/payload_cmsg.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/payload_nocmsg.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/payload_nocmsg.go
index 53f0794eb7..2afd4b50ef 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/payload_nocmsg.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/payload_nocmsg.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
-// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sockopt_posix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sockopt_posix.go
index eb07c1c02a..82e2c37838 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sockopt_posix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sockopt_posix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sockopt_stub.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sockopt_stub.go
index cf036893b7..840108bf76 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sockopt_stub.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sockopt_stub.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
-// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_aix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_aix.go
index 02730cdfd2..9244a68a38 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_aix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_aix.go
@@ -4,7 +4,6 @@
// Added for go1.11 compatibility
//go:build aix
-// +build aix
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreq.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreq.go
index 22322b387e..645f254c6d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreq.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreq.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd || solaris || windows
-// +build aix darwin dragonfly freebsd netbsd openbsd solaris windows
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go
index fde640142d..48cfb6db2f 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !aix && !darwin && !dragonfly && !freebsd && !netbsd && !openbsd && !solaris && !windows
-// +build !aix,!darwin,!dragonfly,!freebsd,!netbsd,!openbsd,!solaris,!windows
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreqn.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreqn.go
index 54eb9901b5..0b27b632f1 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreqn.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreqn.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || freebsd || linux
-// +build darwin freebsd linux
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go
index dcb15f25a5..303a5e2e68 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !darwin && !freebsd && !linux
-// +build !darwin,!freebsd,!linux
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_bpf.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_bpf.go
index fb11e324e2..1b4780df41 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_bpf.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_bpf.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux
-// +build linux
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go
index fc53a0d33a..b1f779b493 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !linux
-// +build !linux
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_bsd.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_bsd.go
index e191b2f14f..b7b032d260 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_bsd.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_bsd.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build netbsd || openbsd
-// +build netbsd openbsd
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_ssmreq.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_ssmreq.go
index 6a4e7abf9b..a295e15ea0 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_ssmreq.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_ssmreq.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || freebsd || linux || solaris
-// +build darwin freebsd linux solaris
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go
index 157159fd50..74bd454e25 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !darwin && !freebsd && !linux && !solaris
-// +build !darwin,!freebsd,!linux,!solaris
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_stub.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_stub.go
index d550851658..20af4074c2 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_stub.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/sys_stub.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
-// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/zsys_aix_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/zsys_aix_ppc64.go
index b7f2d6e5c1..dd454025c7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/zsys_aix_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/zsys_aix_ppc64.go
@@ -3,7 +3,6 @@
// Added for go1.11 compatibility
//go:build aix
-// +build aix
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/zsys_linux_loong64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/zsys_linux_loong64.go
index e15c22c748..54f9e13948 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/zsys_linux_loong64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/zsys_linux_loong64.go
@@ -2,7 +2,6 @@
// cgo -godefs defs_linux.go
//go:build loong64
-// +build loong64
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/zsys_linux_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/zsys_linux_riscv64.go
index e2edebdb81..78374a5250 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/zsys_linux_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/net/ipv4/zsys_linux_riscv64.go
@@ -2,7 +2,6 @@
// cgo -godefs defs_linux.go
//go:build riscv64
-// +build riscv64
package ipv4
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s
index db9171c2e4..269e173ca4 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gc
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu.go
index 83f112c4c8..4756ad5f79 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu.go
@@ -38,7 +38,7 @@ var X86 struct {
HasAVX512F bool // Advanced vector extension 512 Foundation Instructions
HasAVX512CD bool // Advanced vector extension 512 Conflict Detection Instructions
HasAVX512ER bool // Advanced vector extension 512 Exponential and Reciprocal Instructions
- HasAVX512PF bool // Advanced vector extension 512 Prefetch Instructions Instructions
+ HasAVX512PF bool // Advanced vector extension 512 Prefetch Instructions
HasAVX512VL bool // Advanced vector extension 512 Vector Length Extensions
HasAVX512BW bool // Advanced vector extension 512 Byte and Word Instructions
HasAVX512DQ bool // Advanced vector extension 512 Doubleword and Quadword Instructions
@@ -54,6 +54,9 @@ var X86 struct {
HasAVX512VBMI2 bool // Advanced vector extension 512 Vector Byte Manipulation Instructions 2
HasAVX512BITALG bool // Advanced vector extension 512 Bit Algorithms
HasAVX512BF16 bool // Advanced vector extension 512 BFloat16 Instructions
+ HasAMXTile bool // Advanced Matrix Extension Tile instructions
+ HasAMXInt8 bool // Advanced Matrix Extension Int8 instructions
+ HasAMXBF16 bool // Advanced Matrix Extension BFloat16 instructions
HasBMI1 bool // Bit manipulation instruction set 1
HasBMI2 bool // Bit manipulation instruction set 2
HasCX16 bool // Compare and exchange 16 Bytes
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_aix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_aix.go
index 8aaeef545a..9bf0c32eb6 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_aix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_aix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix
-// +build aix
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_arm64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_arm64.s
index c61f95a05a..fcb9a38882 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_arm64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_arm64.s
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gc
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
index ccf542a73d..a8acd3e328 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gc
-// +build gc
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go
index 0af2f24841..c8ae6ddc15 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gc
-// +build gc
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
index fa7cdb9bcd..910728fb16 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (386 || amd64 || amd64p32) && gc
-// +build 386 amd64 amd64p32
-// +build gc
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
index 2aff318911..7f1946780b 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gccgo
-// +build gccgo
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go
index 4bfbda6199..9526d2ce3a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gccgo
-// +build gccgo
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c
index 6cc73109f5..3f73a05dcf 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (386 || amd64 || amd64p32) && gccgo
-// +build 386 amd64 amd64p32
-// +build gccgo
#include
#include
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go
index 863d415ab4..99c60fe9f9 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (386 || amd64 || amd64p32) && gccgo
-// +build 386 amd64 amd64p32
-// +build gccgo
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux.go
index 159a686f6f..743eb54354 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !386 && !amd64 && !amd64p32 && !arm64
-// +build !386,!amd64,!amd64p32,!arm64
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go
index 6000db4cdd..4686c1d541 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && (mips64 || mips64le)
-// +build linux
-// +build mips64 mips64le
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go
index f4992b1a59..cd63e73355 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x
-// +build linux,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le,!s390x
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go
index 021356d6de..197188e67f 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && (ppc64 || ppc64le)
-// +build linux
-// +build ppc64 ppc64le
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_loong64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_loong64.go
index 0f57b05bdb..558635850c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_loong64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_loong64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build loong64
-// +build loong64
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_mips64x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_mips64x.go
index f4063c6642..fedb00cc4c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_mips64x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_mips64x.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build mips64 || mips64le
-// +build mips64 mips64le
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_mipsx.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_mipsx.go
index 07c4e36d8f..ffb4ec7eb3 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_mipsx.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_mipsx.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build mips || mipsle
-// +build mips mipsle
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_arm.go
index d7b4fb4ccc..e9ecf2a456 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_arm.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !linux && arm
-// +build !linux,arm
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
index f3cde129b6..5341e7f88d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !linux && !netbsd && !openbsd && arm64
-// +build !linux,!netbsd,!openbsd,arm64
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go
index 0dafe9644a..5f8f2419ab 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !linux && (mips64 || mips64le)
-// +build !linux
-// +build mips64 mips64le
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go
index 060d46b6ea..89608fba27 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go
@@ -3,9 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !aix && !linux && (ppc64 || ppc64le)
-// +build !aix
-// +build !linux
-// +build ppc64 ppc64le
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go
index dd10eb79fe..5ab87808f7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !linux && riscv64
-// +build !linux,riscv64
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go
index 4e8acd1658..c14f12b149 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ppc64 || ppc64le
-// +build ppc64 ppc64le
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_riscv64.go
index bd6c128af9..7f0c79c004 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_riscv64.go
@@ -3,10 +3,9 @@
// license that can be found in the LICENSE file.
//go:build riscv64
-// +build riscv64
package cpu
-const cacheLineSize = 32
+const cacheLineSize = 64
func initOptions() {}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_s390x.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_s390x.s
index 96f81e2097..1fb4b70133 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_s390x.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_s390x.s
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gc
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_wasm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_wasm.go
index 7747d888a6..384787ea30 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_wasm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_wasm.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build wasm
-// +build wasm
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_x86.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_x86.go
index f5aacfc825..c29f5e4c5a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_x86.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_x86.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build 386 || amd64 || amd64p32
-// +build 386 amd64 amd64p32
package cpu
@@ -37,6 +36,9 @@ func initOptions() {
{Name: "avx512vbmi2", Feature: &X86.HasAVX512VBMI2},
{Name: "avx512bitalg", Feature: &X86.HasAVX512BITALG},
{Name: "avx512bf16", Feature: &X86.HasAVX512BF16},
+ {Name: "amxtile", Feature: &X86.HasAMXTile},
+ {Name: "amxint8", Feature: &X86.HasAMXInt8},
+ {Name: "amxbf16", Feature: &X86.HasAMXBF16},
{Name: "bmi1", Feature: &X86.HasBMI1},
{Name: "bmi2", Feature: &X86.HasBMI2},
{Name: "cx16", Feature: &X86.HasCX16},
@@ -138,6 +140,10 @@ func archInit() {
eax71, _, _, _ := cpuid(7, 1)
X86.HasAVX512BF16 = isSet(5, eax71)
}
+
+ X86.HasAMXTile = isSet(24, edx7)
+ X86.HasAMXInt8 = isSet(25, edx7)
+ X86.HasAMXBF16 = isSet(22, edx7)
}
func isSet(bitpos uint, value uint32) bool {
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_x86.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_x86.s
index 39acab2ff5..7d7ba33efb 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_x86.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/cpu_x86.s
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (386 || amd64 || amd64p32) && gc
-// +build 386 amd64 amd64p32
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/endian_big.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/endian_big.go
index 93ce03a346..7fe04b0a13 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/endian_big.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/endian_big.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
-// +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/endian_little.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/endian_little.go
index fe545966b6..48eccc4c79 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/endian_little.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/endian_little.go
@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
-// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
+//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/hwcap_linux.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/hwcap_linux.go
index 1d9d91f3ed..34e49f955a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/hwcap_linux.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/hwcap_linux.go
@@ -5,7 +5,7 @@
package cpu
import (
- "io/ioutil"
+ "os"
)
const (
@@ -39,7 +39,7 @@ func readHWCAP() error {
return nil
}
- buf, err := ioutil.ReadFile(procAuxv)
+ buf, err := os.ReadFile(procAuxv)
if err != nil {
// e.g. on android /proc/self/auxv is not accessible, so silently
// ignore the error and leave Initialized = false. On some
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go
index d87bd6b3eb..4cd64c7042 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && arm64
-// +build linux,arm64
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go
index b975ea2a04..4c9788ea8e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build go1.21
-// +build go1.21
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
index 96134157a1..1b9ccb091a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
@@ -9,7 +9,6 @@
// gccgo's libgo and thus must not used a CGo method.
//go:build aix && gccgo
-// +build aix,gccgo
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go
index 904be42ffd..e8b6cdbe9a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go
@@ -7,7 +7,6 @@
// (See golang.org/issue/32102)
//go:build aix && ppc64 && gc
-// +build aix,ppc64,gc
package cpu
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go
deleted file mode 100644
index e07899b909..0000000000
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go
+++ /dev/null
@@ -1,30 +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.
-
-// Package unsafeheader contains header declarations for the Go runtime's
-// slice and string implementations.
-//
-// This package allows x/sys to use types equivalent to
-// reflect.SliceHeader and reflect.StringHeader without introducing
-// a dependency on the (relatively heavy) "reflect" package.
-package unsafeheader
-
-import (
- "unsafe"
-)
-
-// Slice is the runtime representation of a slice.
-// It cannot be used safely or portably and its representation may change in a later release.
-type Slice struct {
- Data unsafe.Pointer
- Len int
- Cap int
-}
-
-// String is the runtime representation of a string.
-// It cannot be used safely or portably and its representation may change in a later release.
-type String struct {
- Data unsafe.Pointer
- Len int
-}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go
index c9b69937a0..73687de748 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build go1.5
-// +build go1.5
package plan9
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/pwd_plan9.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/pwd_plan9.go
index 98bf56b732..fb94582184 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/pwd_plan9.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/pwd_plan9.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !go1.5
-// +build !go1.5
package plan9
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/race.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/race.go
index 62377d2ff9..c02d9ed333 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/race.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/race.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build plan9 && race
-// +build plan9,race
package plan9
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/race0.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/race0.go
index f8da30876d..7b15e15f65 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/race0.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/race0.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build plan9 && !race
-// +build plan9,!race
package plan9
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/str.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/str.go
index 55fa8d025e..ba3e8ff8a6 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/str.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/str.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build plan9
-// +build plan9
package plan9
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/syscall.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/syscall.go
index 67e5b0115c..d631fd664a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/syscall.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/syscall.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build plan9
-// +build plan9
// Package plan9 contains an interface to the low-level operating system
// primitives. OS details vary depending on the underlying system, and
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go
index 3f40b9bd74..f780d5c807 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build plan9 && 386
-// +build plan9,386
package plan9
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go
index 0e6a96aa4f..7de61065f6 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build plan9 && amd64
-// +build plan9,amd64
package plan9
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go
index 244c501b77..ea85780f03 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build plan9 && arm
-// +build plan9,arm
package plan9
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/aliases.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/aliases.go
index abc89c104a..b0e4198575 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/aliases.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/aliases.go
@@ -2,9 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
-// +build go1.9
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s
index db9171c2e4..269e173ca4 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gc
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_386.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_386.s
index e0fcd9b3de..a4fcef0e0d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_386.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_386.s
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (freebsd || netbsd || openbsd) && gc
-// +build freebsd netbsd openbsd
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s
index 2b99c349a2..1e63615c57 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc
-// +build darwin dragonfly freebsd netbsd openbsd
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_arm.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_arm.s
index d702d4adc7..6496c31008 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_arm.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_arm.s
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (freebsd || netbsd || openbsd) && gc
-// +build freebsd netbsd openbsd
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s
index fe36a7391a..4fd1f54daa 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (darwin || freebsd || netbsd || openbsd) && gc
-// +build darwin freebsd netbsd openbsd
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s
index e5b9a84899..42f7eb9e47 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (darwin || freebsd || netbsd || openbsd) && gc
-// +build darwin freebsd netbsd openbsd
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s
index d560019ea2..f8902667e9 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (darwin || freebsd || netbsd || openbsd) && gc
-// +build darwin freebsd netbsd openbsd
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_386.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_386.s
index 8fd101d071..3b4734870d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_386.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_386.s
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gc
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_amd64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
index 7ed38e43c6..67e29f3178 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gc
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_arm.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_arm.s
index 8ef1d51402..d6ae269ce1 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_arm.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_arm.s
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gc
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_arm64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
index 98ae02760d..01e5e253c6 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
@@ -3,9 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && arm64 && gc
-// +build linux
-// +build arm64
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_loong64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_loong64.s
index 565357288a..2abf12f6e8 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_loong64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_loong64.s
@@ -3,9 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && loong64 && gc
-// +build linux
-// +build loong64
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
index 21231d2ce1..f84bae7120 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
@@ -3,9 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && (mips64 || mips64le) && gc
-// +build linux
-// +build mips64 mips64le
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
index 6783b26c60..f08f628077 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
@@ -3,9 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && (mips || mipsle) && gc
-// +build linux
-// +build mips mipsle
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
index 19d4989344..bdfc024d2d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
@@ -3,9 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && (ppc64 || ppc64le) && gc
-// +build linux
-// +build ppc64 ppc64le
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s
index e42eb81d58..2e8c996120 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build riscv64 && gc
-// +build riscv64
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_s390x.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
index c46aab3395..2c394b11eb 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
@@ -3,9 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && s390x && gc
-// +build linux
-// +build s390x
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s
index 5e7a1169c0..fab586a2c4 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gc
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
index f8c5394c1a..f949ec5476 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gc
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_zos_s390x.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_zos_s390x.s
index 3b54e18581..2f67ba86d5 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_zos_s390x.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/asm_zos_s390x.s
@@ -3,9 +3,6 @@
// license that can be found in the LICENSE file.
//go:build zos && s390x && gc
-// +build zos
-// +build s390x
-// +build gc
#include "textflag.h"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/cap_freebsd.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/cap_freebsd.go
index 0b7c6adb86..a08657890f 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/cap_freebsd.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/cap_freebsd.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build freebsd
-// +build freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/constants.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/constants.go
index 394a3965b6..6fb7cb77d0 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/constants.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/constants.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dev_aix_ppc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dev_aix_ppc.go
index 65a998508d..d785134617 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dev_aix_ppc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dev_aix_ppc.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix && ppc
-// +build aix,ppc
// Functions to access/create device major and minor numbers matching the
// encoding used by AIX.
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go
index 8fc08ad0aa..623a5e6973 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix && ppc64
-// +build aix,ppc64
// Functions to access/create device major and minor numbers matching the
// encoding used AIX.
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dev_zos.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dev_zos.go
index a388e59a0e..bb6a64fe92 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dev_zos.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dev_zos.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build zos && s390x
-// +build zos,s390x
// Functions to access/create device major and minor numbers matching the
// encoding used by z/OS.
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dirent.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dirent.go
index 2499f977b0..1ebf117826 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dirent.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/dirent.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/endian_big.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/endian_big.go
index a520265576..1095fd31d6 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/endian_big.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/endian_big.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//
//go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
-// +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/endian_little.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/endian_little.go
index b0f2bc4ae3..b9f0e277b1 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/endian_little.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/endian_little.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//
//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
-// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/env_unix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/env_unix.go
index 29ccc4d133..a96da71f47 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/env_unix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/env_unix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
// Unix environment variables.
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/epoll_zos.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/epoll_zos.go
index cedaf7e024..7753fddea8 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/epoll_zos.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/epoll_zos.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build zos && s390x
-// +build zos,s390x
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fcntl.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fcntl.go
index e9b991258c..6200876fb2 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fcntl.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fcntl.go
@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build dragonfly || freebsd || linux || netbsd || openbsd
-// +build dragonfly freebsd linux netbsd openbsd
+//go:build dragonfly || freebsd || linux || netbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go
index 29d44808b1..13b4acd5c6 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc)
-// +build linux,386 linux,arm linux,mips linux,mipsle linux,ppc
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fdset.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fdset.go
index a8068f94f2..9e83d18cd0 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fdset.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fdset.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fstatfs_zos.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fstatfs_zos.go
index e377cc9f49..c8bde601e7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fstatfs_zos.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/fstatfs_zos.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build zos && s390x
-// +build zos,s390x
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/gccgo.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/gccgo.go
index b06f52d748..aca5721ddc 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/gccgo.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/gccgo.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gccgo && !aix && !hurd
-// +build gccgo,!aix,!hurd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/gccgo_c.c b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/gccgo_c.c
index f98a1c542f..d468b7b47f 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/gccgo_c.c
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/gccgo_c.c
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gccgo && !aix && !hurd
-// +build gccgo,!aix,!hurd
#include
#include
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
index e60e49a3d9..972d61bd75 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build gccgo && linux && amd64
-// +build gccgo,linux,amd64
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ifreq_linux.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ifreq_linux.go
index 15721a5104..848840ae4c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ifreq_linux.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ifreq_linux.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux
-// +build linux
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_linux.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_linux.go
index 0d12c0851a..dbe680eab8 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_linux.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_linux.go
@@ -231,3 +231,8 @@ func IoctlLoopGetStatus64(fd int) (*LoopInfo64, error) {
func IoctlLoopSetStatus64(fd int, value *LoopInfo64) error {
return ioctlPtr(fd, LOOP_SET_STATUS64, unsafe.Pointer(value))
}
+
+// IoctlLoopConfigure configures all loop device parameters in a single step
+func IoctlLoopConfigure(fd int, value *LoopConfig) error {
+ return ioctlPtr(fd, LOOP_CONFIGURE, unsafe.Pointer(value))
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_signed.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_signed.go
index 7def9580e6..5b0759bd86 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_signed.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_signed.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || solaris
-// +build aix solaris
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_unsigned.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_unsigned.go
index 649913d1ea..20f470b9d0 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_unsigned.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_unsigned.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd
-// +build darwin dragonfly freebsd hurd linux netbsd openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_zos.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_zos.go
index cdc21bf76d..c8b2a750f8 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_zos.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ioctl_zos.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build zos && s390x
-// +build zos,s390x
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/mkall.sh b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/mkall.sh
index 8e3947c368..e6f31d374d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/mkall.sh
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/mkall.sh
@@ -50,7 +50,7 @@ if [[ "$GOOS" = "linux" ]]; then
# Use the Docker-based build system
# Files generated through docker (use $cmd so you can Ctl-C the build or run)
$cmd docker build --tag generate:$GOOS $GOOS
- $cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && /bin/pwd):/build generate:$GOOS
+ $cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && pwd):/build generate:$GOOS
exit
fi
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/mkerrors.sh b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/mkerrors.sh
index be0423e685..fdcaa974d2 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -248,6 +248,7 @@ struct ltchars {
#include
#include
#include
+#include
#include
#include
#include
@@ -283,10 +284,6 @@ struct ltchars {
#include
#endif
-#ifndef MSG_FASTOPEN
-#define MSG_FASTOPEN 0x20000000
-#endif
-
#ifndef PTRACE_GETREGS
#define PTRACE_GETREGS 0xc
#endif
@@ -295,14 +292,6 @@ struct ltchars {
#define PTRACE_SETREGS 0xd
#endif
-#ifndef SOL_NETLINK
-#define SOL_NETLINK 270
-#endif
-
-#ifndef SOL_SMC
-#define SOL_SMC 286
-#endif
-
#ifdef SOL_BLUETOOTH
// SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
// but it is already in bluetooth_linux.go
@@ -319,10 +308,23 @@ struct ltchars {
#undef TIPC_WAIT_FOREVER
#define TIPC_WAIT_FOREVER 0xffffffff
-// Copied from linux/l2tp.h
-// Including linux/l2tp.h here causes conflicts between linux/in.h
-// and netinet/in.h included via net/route.h above.
-#define IPPROTO_L2TP 115
+// Copied from linux/netfilter/nf_nat.h
+// Including linux/netfilter/nf_nat.h here causes conflicts between linux/in.h
+// and netinet/in.h.
+#define NF_NAT_RANGE_MAP_IPS (1 << 0)
+#define NF_NAT_RANGE_PROTO_SPECIFIED (1 << 1)
+#define NF_NAT_RANGE_PROTO_RANDOM (1 << 2)
+#define NF_NAT_RANGE_PERSISTENT (1 << 3)
+#define NF_NAT_RANGE_PROTO_RANDOM_FULLY (1 << 4)
+#define NF_NAT_RANGE_PROTO_OFFSET (1 << 5)
+#define NF_NAT_RANGE_NETMAP (1 << 6)
+#define NF_NAT_RANGE_PROTO_RANDOM_ALL \
+ (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY)
+#define NF_NAT_RANGE_MASK \
+ (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED | \
+ NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PERSISTENT | \
+ NF_NAT_RANGE_PROTO_RANDOM_FULLY | NF_NAT_RANGE_PROTO_OFFSET | \
+ NF_NAT_RANGE_NETMAP)
// Copied from linux/hid.h.
// Keep in sync with the size of the referenced fields.
@@ -519,7 +521,8 @@ ccflags="$@"
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
- $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ ||
+ $2 == "LOOP_CONFIGURE" ||
+ $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MREMAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ ||
$2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
$2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
$2 ~ /^RAW_PAYLOAD_/ ||
@@ -560,7 +563,7 @@ ccflags="$@"
$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ ||
$2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
$2 ~ /^CLONE_[A-Z_]+/ ||
- $2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+)$/ &&
+ $2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+|BPF_F_LINK)$/ &&
$2 ~ /^(BPF|DLT)_/ ||
$2 ~ /^AUDIT_/ ||
$2 ~ /^(CLOCK|TIMER)_/ ||
@@ -581,8 +584,9 @@ ccflags="$@"
$2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ ||
$2 ~ /^KEYCTL_/ ||
$2 ~ /^PERF_/ ||
- $2 ~ /^SECCOMP_MODE_/ ||
+ $2 ~ /^SECCOMP_/ ||
$2 ~ /^SEEK_/ ||
+ $2 ~ /^SCHED_/ ||
$2 ~ /^SPLICE_/ ||
$2 ~ /^SYNC_FILE_RANGE_/ ||
$2 !~ /IOC_MAGIC/ &&
@@ -601,6 +605,9 @@ ccflags="$@"
$2 ~ /^FSOPT_/ ||
$2 ~ /^WDIO[CFS]_/ ||
$2 ~ /^NFN/ ||
+ $2 !~ /^NFT_META_IIFTYPE/ &&
+ $2 ~ /^NFT_/ ||
+ $2 ~ /^NF_NAT_/ ||
$2 ~ /^XDP_/ ||
$2 ~ /^RWF_/ ||
$2 ~ /^(HDIO|WIN|SMART)_/ ||
@@ -624,7 +631,7 @@ ccflags="$@"
$2 ~ /^MEM/ ||
$2 ~ /^WG/ ||
$2 ~ /^FIB_RULE_/ ||
- $2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
+ $2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE|IOMIN$|IOOPT$|ALIGNOFF$|DISCARD|ROTATIONAL$|ZEROOUT$|GETDISKSEQ$)/ {printf("\t%s = C.%s\n", $2, $2)}
$2 ~ /^__WCOREFLAG$/ {next}
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
@@ -662,7 +669,6 @@ echo '// mkerrors.sh' "$@"
echo '// Code generated by the command above; see README.md. DO NOT EDIT.'
echo
echo "//go:build ${GOARCH} && ${GOOS}"
-echo "// +build ${GOARCH},${GOOS}"
echo
go tool cgo -godefs -- "$@" _const.go >_error.out
cat _error.out | grep -vf _error.grep | grep -vf _signal.grep
@@ -741,7 +747,8 @@ main(void)
e = errors[i].num;
if(i > 0 && errors[i-1].num == e)
continue;
- strcpy(buf, strerror(e));
+ strncpy(buf, strerror(e), sizeof(buf) - 1);
+ buf[sizeof(buf) - 1] = '\0';
// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
buf[0] += a - A;
@@ -760,7 +767,8 @@ main(void)
e = signals[i].num;
if(i > 0 && signals[i-1].num == e)
continue;
- strcpy(buf, strsignal(e));
+ strncpy(buf, strsignal(e), sizeof(buf) - 1);
+ buf[sizeof(buf) - 1] = '\0';
// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
buf[0] += a - A;
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/mmap_nomremap.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/mmap_nomremap.go
new file mode 100644
index 0000000000..4b68e59780
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/mmap_nomremap.go
@@ -0,0 +1,13 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || openbsd || solaris
+
+package unix
+
+var mapper = &mmapper{
+ active: make(map[*byte][]byte),
+ mmap: mmap,
+ munmap: munmap,
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/mremap.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/mremap.go
new file mode 100644
index 0000000000..fd45fe529d
--- /dev/null
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/mremap.go
@@ -0,0 +1,52 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build linux || netbsd
+
+package unix
+
+import "unsafe"
+
+type mremapMmapper struct {
+ mmapper
+ mremap func(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error)
+}
+
+var mapper = &mremapMmapper{
+ mmapper: mmapper{
+ active: make(map[*byte][]byte),
+ mmap: mmap,
+ munmap: munmap,
+ },
+ mremap: mremap,
+}
+
+func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
+ if newLength <= 0 || len(oldData) == 0 || len(oldData) != cap(oldData) || flags&mremapFixed != 0 {
+ return nil, EINVAL
+ }
+
+ pOld := &oldData[cap(oldData)-1]
+ m.Lock()
+ defer m.Unlock()
+ bOld := m.active[pOld]
+ if bOld == nil || &bOld[0] != &oldData[0] {
+ return nil, EINVAL
+ }
+ newAddr, errno := m.mremap(uintptr(unsafe.Pointer(&bOld[0])), uintptr(len(bOld)), uintptr(newLength), flags, 0)
+ if errno != nil {
+ return nil, errno
+ }
+ bNew := unsafe.Slice((*byte)(unsafe.Pointer(newAddr)), newLength)
+ pNew := &bNew[cap(bNew)-1]
+ if flags&mremapDontunmap == 0 {
+ delete(m.active, pOld)
+ }
+ m.active[pNew] = bNew
+ return bNew, nil
+}
+
+func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
+ return mapper.Mremap(oldData, newLength, flags)
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/pagesize_unix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/pagesize_unix.go
index 53f1b4c5b8..4d0a3430ed 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/pagesize_unix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/pagesize_unix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
// For Unix, get the pagesize from the runtime.
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/pledge_openbsd.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/pledge_openbsd.go
index eb48294b27..6a09af53e6 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/pledge_openbsd.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/pledge_openbsd.go
@@ -8,54 +8,31 @@ import (
"errors"
"fmt"
"strconv"
- "syscall"
- "unsafe"
)
// Pledge implements the pledge syscall.
//
-// The pledge syscall does not accept execpromises on OpenBSD releases
-// before 6.3.
-//
-// execpromises must be empty when Pledge is called on OpenBSD
-// releases predating 6.3, otherwise an error will be returned.
+// This changes both the promises and execpromises; use PledgePromises or
+// PledgeExecpromises to only change the promises or execpromises
+// respectively.
//
// For more information see pledge(2).
func Pledge(promises, execpromises string) error {
- maj, min, err := majmin()
- if err != nil {
+ if err := pledgeAvailable(); err != nil {
return err
}
- err = pledgeAvailable(maj, min, execpromises)
+ pptr, err := BytePtrFromString(promises)
if err != nil {
return err
}
- pptr, err := syscall.BytePtrFromString(promises)
+ exptr, err := BytePtrFromString(execpromises)
if err != nil {
return err
}
- // This variable will hold either a nil unsafe.Pointer or
- // an unsafe.Pointer to a string (execpromises).
- var expr unsafe.Pointer
-
- // If we're running on OpenBSD > 6.2, pass execpromises to the syscall.
- if maj > 6 || (maj == 6 && min > 2) {
- exptr, err := syscall.BytePtrFromString(execpromises)
- if err != nil {
- return err
- }
- expr = unsafe.Pointer(exptr)
- }
-
- _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(expr), 0)
- if e != 0 {
- return e
- }
-
- return nil
+ return pledge(pptr, exptr)
}
// PledgePromises implements the pledge syscall.
@@ -64,30 +41,16 @@ func Pledge(promises, execpromises string) error {
//
// For more information see pledge(2).
func PledgePromises(promises string) error {
- maj, min, err := majmin()
- if err != nil {
- return err
- }
-
- err = pledgeAvailable(maj, min, "")
- if err != nil {
+ if err := pledgeAvailable(); err != nil {
return err
}
- // This variable holds the execpromises and is always nil.
- var expr unsafe.Pointer
-
- pptr, err := syscall.BytePtrFromString(promises)
+ pptr, err := BytePtrFromString(promises)
if err != nil {
return err
}
- _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(expr), 0)
- if e != 0 {
- return e
- }
-
- return nil
+ return pledge(pptr, nil)
}
// PledgeExecpromises implements the pledge syscall.
@@ -96,30 +59,16 @@ func PledgePromises(promises string) error {
//
// For more information see pledge(2).
func PledgeExecpromises(execpromises string) error {
- maj, min, err := majmin()
- if err != nil {
+ if err := pledgeAvailable(); err != nil {
return err
}
- err = pledgeAvailable(maj, min, execpromises)
+ exptr, err := BytePtrFromString(execpromises)
if err != nil {
return err
}
- // This variable holds the promises and is always nil.
- var pptr unsafe.Pointer
-
- exptr, err := syscall.BytePtrFromString(execpromises)
- if err != nil {
- return err
- }
-
- _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(pptr), uintptr(unsafe.Pointer(exptr)), 0)
- if e != 0 {
- return e
- }
-
- return nil
+ return pledge(nil, exptr)
}
// majmin returns major and minor version number for an OpenBSD system.
@@ -147,16 +96,15 @@ func majmin() (major int, minor int, err error) {
// pledgeAvailable checks for availability of the pledge(2) syscall
// based on the running OpenBSD version.
-func pledgeAvailable(maj, min int, execpromises string) error {
- // If OpenBSD <= 5.9, pledge is not available.
- if (maj == 5 && min != 9) || maj < 5 {
- return fmt.Errorf("pledge syscall is not available on OpenBSD %d.%d", maj, min)
+func pledgeAvailable() error {
+ maj, min, err := majmin()
+ if err != nil {
+ return err
}
- // If OpenBSD <= 6.2 and execpromises is not empty,
- // return an error - execpromises is not available before 6.3
- if (maj < 6 || (maj == 6 && min <= 2)) && execpromises != "" {
- return fmt.Errorf("cannot use execpromises on OpenBSD %d.%d", maj, min)
+ // Require OpenBSD 6.4 as a minimum.
+ if maj < 6 || (maj == 6 && min <= 3) {
+ return fmt.Errorf("cannot call Pledge on OpenBSD %d.%d", maj, min)
}
return nil
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ptrace_darwin.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ptrace_darwin.go
index 39dba6ca6a..3f0975f3de 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ptrace_darwin.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ptrace_darwin.go
@@ -3,16 +3,9 @@
// license that can be found in the LICENSE file.
//go:build darwin && !ios
-// +build darwin,!ios
package unix
-import "unsafe"
-
func ptrace(request int, pid int, addr uintptr, data uintptr) error {
return ptrace1(request, pid, addr, data)
}
-
-func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) error {
- return ptrace1Ptr(request, pid, addr, data)
-}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ptrace_ios.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ptrace_ios.go
index 9ea66330a9..a4d35db5dc 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ptrace_ios.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ptrace_ios.go
@@ -3,16 +3,9 @@
// license that can be found in the LICENSE file.
//go:build ios
-// +build ios
package unix
-import "unsafe"
-
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
return ENOTSUP
}
-
-func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {
- return ENOTSUP
-}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/race.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/race.go
index 6f6c5fec5a..714d2aae7c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/race.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/race.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (darwin && race) || (linux && race) || (freebsd && race)
-// +build darwin,race linux,race freebsd,race
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/race0.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/race0.go
index 706e1322ae..4a9f6634c9 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/race0.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/race0.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos
-// +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly zos
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/readdirent_getdents.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/readdirent_getdents.go
index 4d6257569e..dbd2b6ccb1 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/readdirent_getdents.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/readdirent_getdents.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || dragonfly || freebsd || linux || netbsd || openbsd
-// +build aix dragonfly freebsd linux netbsd openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go
index 2a4ba47c45..130398b6b7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin
-// +build darwin
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
index 3865943f6e..c3a62dbb1b 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
// Socket control messages
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
index 0840fe4a57..4a1eab37ec 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || freebsd || linux || netbsd || openbsd || solaris || zos
-// +build aix darwin freebsd linux netbsd openbsd solaris zos
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall.go
index 63e8c83831..5ea74da982 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
// Package unix contains an interface to the low-level operating system
// primitives. OS details vary depending on the underlying system, and
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_aix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_aix.go
index c406ae00f4..67ce6cef2d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_aix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_aix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix
-// +build aix
// Aix system calls.
// This file is compiled as ordinary Go code,
@@ -107,7 +106,8 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
if n > 0 {
sl += _Socklen(n) + 1
}
- if sa.raw.Path[0] == '@' {
+ if sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) {
+ // Check sl > 3 so we don't change unnamed socket behavior.
sa.raw.Path[0] = 0
// Don't count trailing NUL for abstract address.
sl--
@@ -487,8 +487,6 @@ func Fsync(fd int) error {
//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
//sys write(fd int, p []byte) (n int, err error)
-//sys readlen(fd int, p *byte, np int) (n int, err error) = read
-//sys writelen(fd int, p *byte, np int) (n int, err error) = write
//sys Dup2(oldfd int, newfd int) (err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = posix_fadvise64
@@ -535,21 +533,6 @@ func Fsync(fd int) error {
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = nsendmsg
//sys munmap(addr uintptr, length uintptr) (err error)
-
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
-
//sys Madvise(b []byte, advice int) (err error)
//sys Mprotect(b []byte, prot int) (err error)
//sys Mlock(b []byte) (err error)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
index f2871fa953..1fdaa47600 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix && ppc
-// +build aix,ppc
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
index 75718ec0f1..c87f9a9f45 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix && ppc64
-// +build aix,ppc64
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_bsd.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_bsd.go
index 7705c3270b..a00c3e5450 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_bsd.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_bsd.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || dragonfly || freebsd || netbsd || openbsd
-// +build darwin dragonfly freebsd netbsd openbsd
// BSD system call wrappers shared by *BSD based systems
// including OS X (Darwin) and FreeBSD. Like the other
@@ -317,7 +316,7 @@ func GetsockoptString(fd, level, opt int) (string, error) {
if err != nil {
return "", err
}
- return string(buf[:vallen-1]), nil
+ return ByteSliceToString(buf[:vallen]), nil
}
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
@@ -601,20 +600,6 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
// Gethostuuid(uuid *byte, timeout *Timespec) (err error)
// Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error)
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
-
//sys Madvise(b []byte, behav int) (err error)
//sys Mlock(b []byte) (err error)
//sys Mlockall(flags int) (err error)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 206921504c..59542a897d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -510,30 +510,36 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
return nil, err
}
- // Find size.
- n := uintptr(0)
- if err := sysctl(mib, nil, &n, nil, 0); err != nil {
- return nil, err
- }
- if n == 0 {
- return nil, nil
- }
- if n%SizeofKinfoProc != 0 {
- return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc)
- }
+ for {
+ // Find size.
+ n := uintptr(0)
+ if err := sysctl(mib, nil, &n, nil, 0); err != nil {
+ return nil, err
+ }
+ if n == 0 {
+ return nil, nil
+ }
+ if n%SizeofKinfoProc != 0 {
+ return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc)
+ }
- // Read into buffer of that size.
- buf := make([]KinfoProc, n/SizeofKinfoProc)
- if err := sysctl(mib, (*byte)(unsafe.Pointer(&buf[0])), &n, nil, 0); err != nil {
- return nil, err
- }
- if n%SizeofKinfoProc != 0 {
- return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc)
- }
+ // Read into buffer of that size.
+ buf := make([]KinfoProc, n/SizeofKinfoProc)
+ if err := sysctl(mib, (*byte)(unsafe.Pointer(&buf[0])), &n, nil, 0); err != nil {
+ if err == ENOMEM {
+ // Process table grew. Try again.
+ continue
+ }
+ return nil, err
+ }
+ if n%SizeofKinfoProc != 0 {
+ return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc)
+ }
- // The actual call may return less than the original reported required
- // size so ensure we deal with that.
- return buf[:n/SizeofKinfoProc], nil
+ // The actual call may return less than the original reported required
+ // size so ensure we deal with that.
+ return buf[:n/SizeofKinfoProc], nil
+ }
}
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
@@ -638,189 +644,3 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
//sys write(fd int, p []byte) (n int, err error)
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Watchevent
-// Waitevent
-// Modwatch
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// sendfile
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
index 9fa879806b..0eaecf5fc3 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build amd64 && darwin
-// +build amd64,darwin
package unix
@@ -47,6 +46,5 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
//sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
-//sys ptrace1Ptr(request int, pid int, addr unsafe.Pointer, data uintptr) (err error) = SYS_ptrace
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
index f17b8c526a..f36c6707cf 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build arm64 && darwin
-// +build arm64,darwin
package unix
@@ -47,6 +46,5 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
//sys Lstat(path string, stat *Stat_t) (err error)
//sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
-//sys ptrace1Ptr(request int, pid int, addr unsafe.Pointer, data uintptr) (err error) = SYS_ptrace
//sys Stat(path string, stat *Stat_t) (err error)
//sys Statfs(path string, stat *Statfs_t) (err error)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
index 53c96641f8..2f0fa76e4f 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build darwin && go1.12
-// +build darwin,go1.12
+//go:build darwin
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
index d4ce988e72..97cb916f2c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
@@ -343,203 +343,5 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys write(fd int, p []byte) (n int, err error)
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
-
-/*
- * Unimplemented
- * TODO(jsing): Update this list for DragonFly.
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
index 4e2d32120a..14bab6b2de 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build amd64 && dragonfly
-// +build amd64,dragonfly
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd.go
index afb10106f6..2b57e0f73b 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd.go
@@ -13,6 +13,7 @@
package unix
import (
+ "errors"
"sync"
"unsafe"
)
@@ -169,25 +170,26 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
func Uname(uname *Utsname) error {
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
n := unsafe.Sizeof(uname.Sysname)
- if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {
+ // Suppress ENOMEM errors to be compatible with the C library __xuname() implementation.
+ if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {
return err
}
mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
n = unsafe.Sizeof(uname.Nodename)
- if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {
+ if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {
return err
}
mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
n = unsafe.Sizeof(uname.Release)
- if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {
+ if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {
return err
}
mib = []_C_int{CTL_KERN, KERN_VERSION}
n = unsafe.Sizeof(uname.Version)
- if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {
+ if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {
return err
}
@@ -205,7 +207,7 @@ func Uname(uname *Utsname) error {
mib = []_C_int{CTL_HW, HW_MACHINE}
n = unsafe.Sizeof(uname.Machine)
- if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {
+ if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {
return err
}
@@ -449,197 +451,5 @@ func Dup3(oldfd, newfd, flags int) error {
//sys write(fd int, p []byte) (n int, err error)
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
-
-/*
- * Unimplemented
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdents
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Watchevent
-// Waitevent
-// Modwatch
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
index b8da510043..3967bca772 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build 386 && freebsd
-// +build 386,freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
index 47155c4839..eff19ada23 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build amd64 && freebsd
-// +build amd64,freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
index 08932093fa..4f24b517a6 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build arm && freebsd
-// +build arm,freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
index d151a0d0e5..ac30759ece 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build arm64 && freebsd
-// +build arm64,freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
index d5cd64b378..aab725ca77 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build riscv64 && freebsd
-// +build riscv64,freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_hurd.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_hurd.go
index 381fd4673b..ba46651f8e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_hurd.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_hurd.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build hurd
-// +build hurd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_hurd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_hurd_386.go
index 7cf54a3e4f..df89f9e6b4 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_hurd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_hurd_386.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build 386 && hurd
-// +build 386,hurd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_illumos.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_illumos.go
index 87db5a6a8c..a863f7052c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_illumos.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_illumos.go
@@ -5,7 +5,6 @@
// illumos system calls not present on Solaris.
//go:build amd64 && illumos
-// +build amd64,illumos
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux.go
index fbaeb5fff1..5682e2628a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -61,15 +61,23 @@ func FanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname string) (
}
//sys fchmodat(dirfd int, path string, mode uint32) (err error)
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- // Linux fchmodat doesn't support the flags parameter. Mimick glibc's behavior
- // and check the flags. Otherwise the mode would be applied to the symlink
- // destination which is not what the user expects.
- if flags&^AT_SYMLINK_NOFOLLOW != 0 {
- return EINVAL
- } else if flags&AT_SYMLINK_NOFOLLOW != 0 {
- return EOPNOTSUPP
+//sys fchmodat2(dirfd int, path string, mode uint32, flags int) (err error)
+
+func Fchmodat(dirfd int, path string, mode uint32, flags int) error {
+ // Linux fchmodat doesn't support the flags parameter, but fchmodat2 does.
+ // Try fchmodat2 if flags are specified.
+ if flags != 0 {
+ err := fchmodat2(dirfd, path, mode, flags)
+ if err == ENOSYS {
+ // fchmodat2 isn't available. If the flags are known to be valid,
+ // return EOPNOTSUPP to indicate that fchmodat doesn't support them.
+ if flags&^(AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) != 0 {
+ return EINVAL
+ } else if flags&(AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) != 0 {
+ return EOPNOTSUPP
+ }
+ }
+ return err
}
return fchmodat(dirfd, path, mode)
}
@@ -417,7 +425,8 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
if n > 0 {
sl += _Socklen(n) + 1
}
- if sa.raw.Path[0] == '@' {
+ if sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) {
+ // Check sl > 3 so we don't change unnamed socket behavior.
sa.raw.Path[0] = 0
// Don't count trailing NUL for abstract address.
sl--
@@ -693,10 +702,10 @@ type SockaddrALG struct {
func (sa *SockaddrALG) sockaddr() (unsafe.Pointer, _Socklen, error) {
// Leave room for NUL byte terminator.
- if len(sa.Type) > 13 {
+ if len(sa.Type) > len(sa.raw.Type)-1 {
return nil, 0, EINVAL
}
- if len(sa.Name) > 63 {
+ if len(sa.Name) > len(sa.raw.Name)-1 {
return nil, 0, EINVAL
}
@@ -704,17 +713,8 @@ func (sa *SockaddrALG) sockaddr() (unsafe.Pointer, _Socklen, error) {
sa.raw.Feat = sa.Feature
sa.raw.Mask = sa.Mask
- typ, err := ByteSliceFromString(sa.Type)
- if err != nil {
- return nil, 0, err
- }
- name, err := ByteSliceFromString(sa.Name)
- if err != nil {
- return nil, 0, err
- }
-
- copy(sa.raw.Type[:], typ)
- copy(sa.raw.Name[:], name)
+ copy(sa.raw.Type[:], sa.Type)
+ copy(sa.raw.Name[:], sa.Name)
return unsafe.Pointer(&sa.raw), SizeofSockaddrALG, nil
}
@@ -1310,7 +1310,7 @@ func GetsockoptString(fd, level, opt int) (string, error) {
return "", err
}
}
- return string(buf[:vallen-1]), nil
+ return ByteSliceToString(buf[:vallen]), nil
}
func GetsockoptTpacketStats(fd, level, opt int) (*TpacketStats, error) {
@@ -1699,12 +1699,23 @@ func PtracePokeUser(pid int, addr uintptr, data []byte) (count int, err error) {
return ptracePoke(PTRACE_POKEUSR, PTRACE_PEEKUSR, pid, addr, data)
}
+// elfNT_PRSTATUS is a copy of the debug/elf.NT_PRSTATUS constant so
+// x/sys/unix doesn't need to depend on debug/elf and thus
+// compress/zlib, debug/dwarf, and other packages.
+const elfNT_PRSTATUS = 1
+
func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
- return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
+ var iov Iovec
+ iov.Base = (*byte)(unsafe.Pointer(regsout))
+ iov.SetLen(int(unsafe.Sizeof(*regsout)))
+ return ptracePtr(PTRACE_GETREGSET, pid, uintptr(elfNT_PRSTATUS), unsafe.Pointer(&iov))
}
func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
- return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
+ var iov Iovec
+ iov.Base = (*byte)(unsafe.Pointer(regs))
+ iov.SetLen(int(unsafe.Sizeof(*regs)))
+ return ptracePtr(PTRACE_SETREGSET, pid, uintptr(elfNT_PRSTATUS), unsafe.Pointer(&iov))
}
func PtraceSetOptions(pid int, options int) (err error) {
@@ -1838,6 +1849,105 @@ func Dup2(oldfd, newfd int) error {
//sys Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error)
//sys Fsopen(fsName string, flags int) (fd int, err error)
//sys Fspick(dirfd int, pathName string, flags int) (fd int, err error)
+
+//sys fsconfig(fd int, cmd uint, key *byte, value *byte, aux int) (err error)
+
+func fsconfigCommon(fd int, cmd uint, key string, value *byte, aux int) (err error) {
+ var keyp *byte
+ if keyp, err = BytePtrFromString(key); err != nil {
+ return
+ }
+ return fsconfig(fd, cmd, keyp, value, aux)
+}
+
+// FsconfigSetFlag is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_SET_FLAG.
+//
+// fd is the filesystem context to act upon.
+// key the parameter key to set.
+func FsconfigSetFlag(fd int, key string) (err error) {
+ return fsconfigCommon(fd, FSCONFIG_SET_FLAG, key, nil, 0)
+}
+
+// FsconfigSetString is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_SET_STRING.
+//
+// fd is the filesystem context to act upon.
+// key the parameter key to set.
+// value is the parameter value to set.
+func FsconfigSetString(fd int, key string, value string) (err error) {
+ var valuep *byte
+ if valuep, err = BytePtrFromString(value); err != nil {
+ return
+ }
+ return fsconfigCommon(fd, FSCONFIG_SET_STRING, key, valuep, 0)
+}
+
+// FsconfigSetBinary is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_SET_BINARY.
+//
+// fd is the filesystem context to act upon.
+// key the parameter key to set.
+// value is the parameter value to set.
+func FsconfigSetBinary(fd int, key string, value []byte) (err error) {
+ if len(value) == 0 {
+ return EINVAL
+ }
+ return fsconfigCommon(fd, FSCONFIG_SET_BINARY, key, &value[0], len(value))
+}
+
+// FsconfigSetPath is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_SET_PATH.
+//
+// fd is the filesystem context to act upon.
+// key the parameter key to set.
+// path is a non-empty path for specified key.
+// atfd is a file descriptor at which to start lookup from or AT_FDCWD.
+func FsconfigSetPath(fd int, key string, path string, atfd int) (err error) {
+ var valuep *byte
+ if valuep, err = BytePtrFromString(path); err != nil {
+ return
+ }
+ return fsconfigCommon(fd, FSCONFIG_SET_PATH, key, valuep, atfd)
+}
+
+// FsconfigSetPathEmpty is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_SET_PATH_EMPTY. The same as
+// FconfigSetPath but with AT_PATH_EMPTY implied.
+func FsconfigSetPathEmpty(fd int, key string, path string, atfd int) (err error) {
+ var valuep *byte
+ if valuep, err = BytePtrFromString(path); err != nil {
+ return
+ }
+ return fsconfigCommon(fd, FSCONFIG_SET_PATH_EMPTY, key, valuep, atfd)
+}
+
+// FsconfigSetFd is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_SET_FD.
+//
+// fd is the filesystem context to act upon.
+// key the parameter key to set.
+// value is a file descriptor to be assigned to specified key.
+func FsconfigSetFd(fd int, key string, value int) (err error) {
+ return fsconfigCommon(fd, FSCONFIG_SET_FD, key, nil, value)
+}
+
+// FsconfigCreate is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_CMD_CREATE.
+//
+// fd is the filesystem context to act upon.
+func FsconfigCreate(fd int) (err error) {
+ return fsconfig(fd, FSCONFIG_CMD_CREATE, nil, nil, 0)
+}
+
+// FsconfigReconfigure is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_CMD_RECONFIGURE.
+//
+// fd is the filesystem context to act upon.
+func FsconfigReconfigure(fd int) (err error) {
+ return fsconfig(fd, FSCONFIG_CMD_RECONFIGURE, nil, nil, 0)
+}
+
//sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
//sysnb Getpgid(pid int) (pgid int, err error)
@@ -1874,7 +1984,7 @@ func Getpgrp() (pid int) {
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
-//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
+//sys pselect6(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *sigset_argpack) (n int, err error)
//sys read(fd int, p []byte) (n int, err error)
//sys Removexattr(path string, attr string) (err error)
//sys Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error)
@@ -1977,8 +2087,6 @@ func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) {
//sys Unshare(flags int) (err error)
//sys write(fd int, p []byte) (n int, err error)
//sys exitThread(code int) (err error) = SYS_EXIT
-//sys readlen(fd int, p *byte, np int) (n int, err error) = SYS_READ
-//sys writelen(fd int, p *byte, np int) (n int, err error) = SYS_WRITE
//sys readv(fd int, iovs []Iovec) (n int, err error) = SYS_READV
//sys writev(fd int, iovs []Iovec) (n int, err error) = SYS_WRITEV
//sys preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) = SYS_PREADV
@@ -2113,21 +2221,7 @@ func writevRacedetect(iovecs []Iovec, n int) {
// mmap varies by architecture; see syscall_linux_*.go.
//sys munmap(addr uintptr, length uintptr) (err error)
-
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
-
+//sys mremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error)
//sys Madvise(b []byte, advice int) (err error)
//sys Mprotect(b []byte, prot int) (err error)
//sys Mlock(b []byte) (err error)
@@ -2136,6 +2230,12 @@ func Munmap(b []byte) (err error) {
//sys Munlock(b []byte) (err error)
//sys Munlockall() (err error)
+const (
+ mremapFixed = MREMAP_FIXED
+ mremapDontunmap = MREMAP_DONTUNMAP
+ mremapMaymove = MREMAP_MAYMOVE
+)
+
// Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd,
// using the specified flags.
func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
@@ -2420,99 +2520,75 @@ func PthreadSigmask(how int, set, oldset *Sigset_t) error {
return rtSigprocmask(how, set, oldset, _C__NSIG/8)
}
-/*
- * Unimplemented
- */
-// AfsSyscall
-// ArchPrctl
-// Brk
-// ClockNanosleep
-// ClockSettime
-// Clone
-// EpollCtlOld
-// EpollPwait
-// EpollWaitOld
-// Execve
-// Fork
-// Futex
-// GetKernelSyms
-// GetMempolicy
-// GetRobustList
-// GetThreadArea
-// Getpmsg
-// IoCancel
-// IoDestroy
-// IoGetevents
-// IoSetup
-// IoSubmit
-// IoprioGet
-// IoprioSet
-// KexecLoad
-// LookupDcookie
-// Mbind
-// MigratePages
-// Mincore
-// ModifyLdt
-// Mount
-// MovePages
-// MqGetsetattr
-// MqNotify
-// MqOpen
-// MqTimedreceive
-// MqTimedsend
-// MqUnlink
-// Mremap
-// Msgctl
-// Msgget
-// Msgrcv
-// Msgsnd
-// Nfsservctl
-// Personality
-// Pselect6
-// Ptrace
-// Putpmsg
-// Quotactl
-// Readahead
-// Readv
-// RemapFilePages
-// RestartSyscall
-// RtSigaction
-// RtSigpending
-// RtSigqueueinfo
-// RtSigreturn
-// RtSigsuspend
-// RtSigtimedwait
-// SchedGetPriorityMax
-// SchedGetPriorityMin
-// SchedGetparam
-// SchedGetscheduler
-// SchedRrGetInterval
-// SchedSetparam
-// SchedYield
-// Security
-// Semctl
-// Semget
-// Semop
-// Semtimedop
-// SetMempolicy
-// SetRobustList
-// SetThreadArea
-// SetTidAddress
-// Sigaltstack
-// Swapoff
-// Swapon
-// Sysfs
-// TimerCreate
-// TimerDelete
-// TimerGetoverrun
-// TimerGettime
-// TimerSettime
-// Tkill (obsolete)
-// Tuxcall
-// Umount2
-// Uselib
-// Utimensat
-// Vfork
-// Vhangup
-// Vserver
-// _Sysctl
+//sysnb getresuid(ruid *_C_int, euid *_C_int, suid *_C_int)
+//sysnb getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int)
+
+func Getresuid() (ruid, euid, suid int) {
+ var r, e, s _C_int
+ getresuid(&r, &e, &s)
+ return int(r), int(e), int(s)
+}
+
+func Getresgid() (rgid, egid, sgid int) {
+ var r, e, s _C_int
+ getresgid(&r, &e, &s)
+ return int(r), int(e), int(s)
+}
+
+// Pselect is a wrapper around the Linux pselect6 system call.
+// This version does not modify the timeout argument.
+func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+ // Per https://man7.org/linux/man-pages/man2/select.2.html#NOTES,
+ // The Linux pselect6() system call modifies its timeout argument.
+ // [Not modifying the argument] is the behavior required by POSIX.1-2001.
+ var mutableTimeout *Timespec
+ if timeout != nil {
+ mutableTimeout = new(Timespec)
+ *mutableTimeout = *timeout
+ }
+
+ // The final argument of the pselect6() system call is not a
+ // sigset_t * pointer, but is instead a structure
+ var kernelMask *sigset_argpack
+ if sigmask != nil {
+ wordBits := 32 << (^uintptr(0) >> 63) // see math.intSize
+
+ // A sigset stores one bit per signal,
+ // offset by 1 (because signal 0 does not exist).
+ // So the number of words needed is ⌈__C_NSIG - 1 / wordBits⌉.
+ sigsetWords := (_C__NSIG - 1 + wordBits - 1) / (wordBits)
+
+ sigsetBytes := uintptr(sigsetWords * (wordBits / 8))
+ kernelMask = &sigset_argpack{
+ ss: sigmask,
+ ssLen: sigsetBytes,
+ }
+ }
+
+ return pselect6(nfd, r, w, e, mutableTimeout, kernelMask)
+}
+
+//sys schedSetattr(pid int, attr *SchedAttr, flags uint) (err error)
+//sys schedGetattr(pid int, attr *SchedAttr, size uint, flags uint) (err error)
+
+// SchedSetAttr is a wrapper for sched_setattr(2) syscall.
+// https://man7.org/linux/man-pages/man2/sched_setattr.2.html
+func SchedSetAttr(pid int, attr *SchedAttr, flags uint) error {
+ if attr == nil {
+ return EINVAL
+ }
+ attr.Size = SizeofSchedAttr
+ return schedSetattr(pid, attr, flags)
+}
+
+// SchedGetAttr is a wrapper for sched_getattr(2) syscall.
+// https://man7.org/linux/man-pages/man2/sched_getattr.2.html
+func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) {
+ attr := &SchedAttr{}
+ if err := schedGetattr(pid, attr, SizeofSchedAttr, flags); err != nil {
+ return nil, err
+ }
+ return attr, nil
+}
+
+//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_386.go
index c7d9945ea1..506dafa7b4 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_386.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build 386 && linux
-// +build 386,linux
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go
index 08086ac6a4..38d55641b5 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64)
-// +build linux
-// +build 386 amd64 mips mipsle mips64 mipsle ppc64 ppc64le ppc s390x sparc64
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
index 5b21fcfd75..d557cf8de3 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build amd64 && linux
-// +build amd64,linux
package unix
@@ -40,7 +39,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
if timeout != nil {
ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
}
- return Pselect(nfd, r, w, e, ts, nil)
+ return pselect6(nfd, r, w, e, ts, nil)
}
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
index 8b0f0f3aa5..facdb83b23 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build amd64 && linux && gc
-// +build amd64,linux,gc
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
index da2986415a..cd2dd797fd 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build arm && linux
-// +build arm,linux
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
index a81f5742b8..cf2ee6c75e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build arm64 && linux
-// +build arm64,linux
package unix
@@ -33,7 +32,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
if timeout != nil {
ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
}
- return Pselect(nfd, r, w, e, ts, nil)
+ return pselect6(nfd, r, w, e, ts, nil)
}
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gc.go
index 2b1168d7d1..ffc4c2b635 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gc.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && gc
-// +build linux,gc
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
index 9843fb4896..9ebfdcf447 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && gc && 386
-// +build linux,gc,386
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go
index a6008fccd5..5f2b57c4c2 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build arm && gc && linux
-// +build arm,gc,linux
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go
index 7740af2428..d1a3ad8263 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && gccgo && 386
-// +build linux,gccgo,386
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go
index e16a12299a..f2f67423e9 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && gccgo && arm
-// +build linux,gccgo,arm
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
index 69d2d7c3db..3d0e98451f 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build loong64 && linux
-// +build loong64,linux
package unix
@@ -28,7 +27,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
if timeout != nil {
ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
}
- return Pselect(nfd, r, w, e, ts, nil)
+ return pselect6(nfd, r, w, e, ts, nil)
}
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
index 76d564095e..70963a95ab 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && (mips64 || mips64le)
-// +build linux
-// +build mips64 mips64le
package unix
@@ -31,7 +29,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
if timeout != nil {
ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
}
- return Pselect(nfd, r, w, e, ts, nil)
+ return pselect6(nfd, r, w, e, ts, nil)
}
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
index aae7f0ffd3..c218ebd280 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && (mips || mipsle)
-// +build linux
-// +build mips mipsle
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
index 66eff19a32..e6c48500ca 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && ppc
-// +build linux,ppc
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
index 806aa2574d..7286a9aa88 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && (ppc64 || ppc64le)
-// +build linux
-// +build ppc64 ppc64le
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
index 35851ef70b..6f5a288944 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build riscv64 && linux
-// +build riscv64,linux
package unix
@@ -32,7 +31,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
if timeout != nil {
ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
}
- return Pselect(nfd, r, w, e, ts, nil)
+ return pselect6(nfd, r, w, e, ts, nil)
}
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
@@ -177,3 +176,14 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
}
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
}
+
+//sys riscvHWProbe(pairs []RISCVHWProbePairs, cpuCount uintptr, cpus *CPUSet, flags uint) (err error)
+
+func RISCVHWProbe(pairs []RISCVHWProbePairs, set *CPUSet, flags uint) (err error) {
+ var setSize uintptr
+
+ if set != nil {
+ setSize = uintptr(unsafe.Sizeof(*set))
+ }
+ return riscvHWProbe(pairs, setSize, set, flags)
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
index 2f89e8f5de..66f31210d0 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build s390x && linux
-// +build s390x,linux
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
index 7ca064ae76..11d1f16986 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build sparc64 && linux
-// +build sparc64,linux
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd.go
index 018d7d4782..88162099af 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd.go
@@ -356,266 +356,16 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
//sys write(fd int, p []byte) (n int, err error)
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
-/*
- * Unimplemented
- */
-// ____semctl13
-// __clone
-// __fhopen40
-// __fhstat40
-// __fhstatvfs140
-// __fstat30
-// __getcwd
-// __getfh30
-// __getlogin
-// __lstat30
-// __mount50
-// __msgctl13
-// __msync13
-// __ntp_gettime30
-// __posix_chown
-// __posix_fchown
-// __posix_lchown
-// __posix_rename
-// __setlogin
-// __shmctl13
-// __sigaction_sigtramp
-// __sigaltstack14
-// __sigpending14
-// __sigprocmask14
-// __sigsuspend14
-// __sigtimedwait
-// __stat30
-// __syscall
-// __vfork14
-// _ksem_close
-// _ksem_destroy
-// _ksem_getvalue
-// _ksem_init
-// _ksem_open
-// _ksem_post
-// _ksem_trywait
-// _ksem_unlink
-// _ksem_wait
-// _lwp_continue
-// _lwp_create
-// _lwp_ctl
-// _lwp_detach
-// _lwp_exit
-// _lwp_getname
-// _lwp_getprivate
-// _lwp_kill
-// _lwp_park
-// _lwp_self
-// _lwp_setname
-// _lwp_setprivate
-// _lwp_suspend
-// _lwp_unpark
-// _lwp_unpark_all
-// _lwp_wait
-// _lwp_wakeup
-// _pset_bind
-// _sched_getaffinity
-// _sched_getparam
-// _sched_setaffinity
-// _sched_setparam
-// acct
-// aio_cancel
-// aio_error
-// aio_fsync
-// aio_read
-// aio_return
-// aio_suspend
-// aio_write
-// break
-// clock_getres
-// clock_gettime
-// clock_settime
-// compat_09_ogetdomainname
-// compat_09_osetdomainname
-// compat_09_ouname
-// compat_10_omsgsys
-// compat_10_osemsys
-// compat_10_oshmsys
-// compat_12_fstat12
-// compat_12_getdirentries
-// compat_12_lstat12
-// compat_12_msync
-// compat_12_oreboot
-// compat_12_oswapon
-// compat_12_stat12
-// compat_13_sigaction13
-// compat_13_sigaltstack13
-// compat_13_sigpending13
-// compat_13_sigprocmask13
-// compat_13_sigreturn13
-// compat_13_sigsuspend13
-// compat_14___semctl
-// compat_14_msgctl
-// compat_14_shmctl
-// compat_16___sigaction14
-// compat_16___sigreturn14
-// compat_20_fhstatfs
-// compat_20_fstatfs
-// compat_20_getfsstat
-// compat_20_statfs
-// compat_30___fhstat30
-// compat_30___fstat13
-// compat_30___lstat13
-// compat_30___stat13
-// compat_30_fhopen
-// compat_30_fhstat
-// compat_30_fhstatvfs1
-// compat_30_getdents
-// compat_30_getfh
-// compat_30_ntp_gettime
-// compat_30_socket
-// compat_40_mount
-// compat_43_fstat43
-// compat_43_lstat43
-// compat_43_oaccept
-// compat_43_ocreat
-// compat_43_oftruncate
-// compat_43_ogetdirentries
-// compat_43_ogetdtablesize
-// compat_43_ogethostid
-// compat_43_ogethostname
-// compat_43_ogetkerninfo
-// compat_43_ogetpagesize
-// compat_43_ogetpeername
-// compat_43_ogetrlimit
-// compat_43_ogetsockname
-// compat_43_okillpg
-// compat_43_olseek
-// compat_43_ommap
-// compat_43_oquota
-// compat_43_orecv
-// compat_43_orecvfrom
-// compat_43_orecvmsg
-// compat_43_osend
-// compat_43_osendmsg
-// compat_43_osethostid
-// compat_43_osethostname
-// compat_43_osigblock
-// compat_43_osigsetmask
-// compat_43_osigstack
-// compat_43_osigvec
-// compat_43_otruncate
-// compat_43_owait
-// compat_43_stat43
-// execve
-// extattr_delete_fd
-// extattr_delete_file
-// extattr_delete_link
-// extattr_get_fd
-// extattr_get_file
-// extattr_get_link
-// extattr_list_fd
-// extattr_list_file
-// extattr_list_link
-// extattr_set_fd
-// extattr_set_file
-// extattr_set_link
-// extattrctl
-// fchroot
-// fdatasync
-// fgetxattr
-// fktrace
-// flistxattr
-// fork
-// fremovexattr
-// fsetxattr
-// fstatvfs1
-// fsync_range
-// getcontext
-// getitimer
-// getvfsstat
-// getxattr
-// ktrace
-// lchflags
-// lchmod
-// lfs_bmapv
-// lfs_markv
-// lfs_segclean
-// lfs_segwait
-// lgetxattr
-// lio_listio
-// listxattr
-// llistxattr
-// lremovexattr
-// lseek
-// lsetxattr
-// lutimes
-// madvise
-// mincore
-// minherit
-// modctl
-// mq_close
-// mq_getattr
-// mq_notify
-// mq_open
-// mq_receive
-// mq_send
-// mq_setattr
-// mq_timedreceive
-// mq_timedsend
-// mq_unlink
-// mremap
-// msgget
-// msgrcv
-// msgsnd
-// nfssvc
-// ntp_adjtime
-// pmc_control
-// pmc_get_info
-// pollts
-// preadv
-// profil
-// pselect
-// pset_assign
-// pset_create
-// pset_destroy
-// ptrace
-// pwritev
-// quotactl
-// rasctl
-// readv
-// reboot
-// removexattr
-// sa_enable
-// sa_preempt
-// sa_register
-// sa_setconcurrency
-// sa_stacks
-// sa_yield
-// sbrk
-// sched_yield
-// semconfig
-// semget
-// semop
-// setcontext
-// setitimer
-// setxattr
-// shmat
-// shmdt
-// shmget
-// sstk
-// statvfs1
-// swapctl
-// sysarch
-// syscall
-// timer_create
-// timer_delete
-// timer_getoverrun
-// timer_gettime
-// timer_settime
-// undelete
-// utrace
-// uuidgen
-// vadvise
-// vfork
-// writev
+const (
+ mremapFixed = MAP_FIXED
+ mremapDontunmap = 0
+ mremapMaymove = 0
+)
+
+//sys mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) = SYS_MREMAP
+
+func mremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (uintptr, error) {
+ return mremapNetBSD(oldaddr, oldlength, newaddr, newlength, flags)
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
index 5199d282fd..7a5eb57432 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build 386 && netbsd
-// +build 386,netbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
index 70a9c52e98..62d8957ae6 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build amd64 && netbsd
-// +build amd64,netbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
index 3eb5942f93..ce6a068851 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build arm && netbsd
-// +build arm,netbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
index fc6ccfd810..d46d689d1b 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build arm64 && netbsd
-// +build arm64,netbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd.go
index f9c7a9663c..b25343c71a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd.go
@@ -137,18 +137,28 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
}
func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
+ var bufptr *Statfs_t
var bufsize uintptr
if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
+ bufptr = &buf[0]
bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
}
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
+ return getfsstat(bufptr, bufsize, flags)
+}
+
+//sysnb getresuid(ruid *_C_int, euid *_C_int, suid *_C_int)
+//sysnb getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int)
+
+func Getresuid() (ruid, euid, suid int) {
+ var r, e, s _C_int
+ getresuid(&r, &e, &s)
+ return int(r), int(e), int(s)
+}
+
+func Getresgid() (rgid, egid, sgid int) {
+ var r, e, s _C_int
+ getresgid(&r, &e, &s)
+ return int(r), int(e), int(s)
}
//sys ioctl(fd int, req uint, arg uintptr) (err error)
@@ -156,6 +166,20 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
+//sys fcntl(fd int, cmd int, arg int) (n int, err error)
+//sys fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) = SYS_FCNTL
+
+// FcntlInt performs a fcntl syscall on fd with the provided command and argument.
+func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
+ return fcntl(int(fd), cmd, arg)
+}
+
+// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
+func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
+ _, err := fcntlPtr(int(fd), cmd, unsafe.Pointer(lk))
+ return err
+}
+
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
@@ -311,80 +335,7 @@ func Uname(uname *Utsname) error {
//sys write(fd int, p []byte) (n int, err error)
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
+//sys getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error)
//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
-
-/*
- * Unimplemented
- */
-// __getcwd
-// __semctl
-// __syscall
-// __sysctl
-// adjfreq
-// break
-// clock_getres
-// clock_gettime
-// clock_settime
-// closefrom
-// execve
-// fhopen
-// fhstat
-// fhstatfs
-// fork
-// futimens
-// getfh
-// getgid
-// getitimer
-// getlogin
-// getresgid
-// getresuid
-// getthrid
-// ktrace
-// lfs_bmapv
-// lfs_markv
-// lfs_segclean
-// lfs_segwait
-// mincore
-// minherit
-// mount
-// mquery
-// msgctl
-// msgget
-// msgrcv
-// msgsnd
-// nfssvc
-// nnpfspioctl
-// preadv
-// profil
-// pwritev
-// quotactl
-// readv
-// reboot
-// renameat
-// rfork
-// sched_yield
-// semget
-// semop
-// setgroups
-// setitimer
-// setsockopt
-// shmat
-// shmctl
-// shmdt
-// shmget
-// sigaction
-// sigaltstack
-// sigpending
-// sigprocmask
-// sigreturn
-// sigsuspend
-// sysarch
-// syscall
-// threxit
-// thrsigdivert
-// thrsleep
-// thrwakeup
-// vfork
-// writev
+//sys pledge(promises *byte, execpromises *byte) (err error)
+//sys unveil(path *byte, flags *byte) (err error)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
index 6baabcdcb0..9ddc89f4fc 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build 386 && openbsd
-// +build 386,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
index bab25360ea..70a3c96eea 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build amd64 && openbsd
-// +build amd64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
index 8eed3c4d4e..265caa87f7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build arm && openbsd
-// +build arm,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go
index 483dde99d4..ac4fda1715 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build arm64 && openbsd
-// +build arm64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go
index 04aa43f41b..0a451e6dd4 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build openbsd
-// +build openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go
index c2796139c0..30a308cbb4 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ppc64 && openbsd
-// +build ppc64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go
index 23199a7ff6..ea954330fa 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build riscv64 && openbsd
-// +build riscv64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_solaris.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_solaris.go
index b600a289d3..21974af064 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -128,7 +128,8 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
if n > 0 {
sl += _Socklen(n) + 1
}
- if sa.raw.Path[0] == '@' {
+ if sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) {
+ // Check sl > 3 so we don't change unnamed socket behavior.
sa.raw.Path[0] = 0
// Don't count trailing NUL for abstract address.
sl--
@@ -157,7 +158,7 @@ func GetsockoptString(fd, level, opt int) (string, error) {
if err != nil {
return "", err
}
- return string(buf[:vallen-1]), nil
+ return ByteSliceToString(buf[:vallen]), nil
}
const ImplementsGetwd = true
@@ -698,38 +699,6 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) = libsocket.setsockopt
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = libsocket.recvfrom
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
-
// Event Ports
type fileObjCookie struct {
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
index 0bd25ef81f..e02d8ceae3 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build amd64 && solaris
-// +build amd64,solaris
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_unix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_unix.go
index 8e48c29ec3..77081de8c7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_unix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
@@ -147,6 +146,14 @@ func (m *mmapper) Munmap(data []byte) (err error) {
return nil
}
+func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
+ return mapper.Mmap(fd, offset, length, prot, flags)
+}
+
+func Munmap(b []byte) (err error) {
+ return mapper.Munmap(b)
+}
+
func Read(fd int, p []byte) (n int, err error) {
n, err = read(fd, p)
if raceenabled {
@@ -541,6 +548,9 @@ func SetNonblock(fd int, nonblocking bool) (err error) {
if err != nil {
return err
}
+ if (flag&O_NONBLOCK != 0) == nonblocking {
+ return nil
+ }
if nonblocking {
flag |= O_NONBLOCK
} else {
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_unix_gc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
index b6919ca580..05c95bccfa 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
@@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc
-// +build darwin dragonfly freebsd linux,!ppc64,!ppc64le netbsd openbsd solaris
-// +build gc
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go
index f6f707acf2..23f39b7af7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go
@@ -3,9 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux && (ppc64le || ppc64) && gc
-// +build linux
-// +build ppc64le ppc64
-// +build gc
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
index d3d49ec3ed..b473038c61 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build zos && s390x
-// +build zos,s390x
package unix
@@ -192,7 +191,6 @@ func (cmsg *Cmsghdr) SetLen(length int) {
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
//sys read(fd int, p []byte) (n int, err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys write(fd int, p []byte) (n int, err error)
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = SYS___ACCEPT_A
@@ -285,25 +283,11 @@ func Close(fd int) (err error) {
return
}
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
// Dummy function: there are no semantics for Madvise on z/OS
func Madvise(b []byte, advice int) (err error) {
return
}
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
-
//sys Gethostname(buf []byte) (err error) = SYS___GETHOSTNAME_A
//sysnb Getegid() (egid int)
//sysnb Geteuid() (uid int)
@@ -1120,7 +1104,7 @@ func GetsockoptString(fd, level, opt int) (string, error) {
return "", err
}
- return string(buf[:vallen-1]), nil
+ return ByteSliceToString(buf[:vallen]), nil
}
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sysvshm_linux.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sysvshm_linux.go
index 2c3a4437f0..4fcd38de27 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sysvshm_linux.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sysvshm_linux.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build linux
-// +build linux
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sysvshm_unix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sysvshm_unix.go
index 5bb41d17bc..79a84f18b4 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sysvshm_unix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sysvshm_unix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build (darwin && !ios) || linux
-// +build darwin,!ios linux
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
index 71bddefdb8..9eb0db664c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin && !ios
-// +build darwin,!ios
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/timestruct.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/timestruct.go
index 616b1b2848..7997b19022 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/timestruct.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/timestruct.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/unveil_openbsd.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/unveil_openbsd.go
index 168d5ae779..cb7e598cef 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/unveil_openbsd.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/unveil_openbsd.go
@@ -4,39 +4,48 @@
package unix
-import (
- "syscall"
- "unsafe"
-)
+import "fmt"
// Unveil implements the unveil syscall.
// For more information see unveil(2).
// Note that the special case of blocking further
// unveil calls is handled by UnveilBlock.
func Unveil(path string, flags string) error {
- pathPtr, err := syscall.BytePtrFromString(path)
- if err != nil {
+ if err := supportsUnveil(); err != nil {
return err
}
- flagsPtr, err := syscall.BytePtrFromString(flags)
+ pathPtr, err := BytePtrFromString(path)
if err != nil {
return err
}
- _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(unsafe.Pointer(pathPtr)), uintptr(unsafe.Pointer(flagsPtr)), 0)
- if e != 0 {
- return e
+ flagsPtr, err := BytePtrFromString(flags)
+ if err != nil {
+ return err
}
- return nil
+ return unveil(pathPtr, flagsPtr)
}
// UnveilBlock blocks future unveil calls.
// For more information see unveil(2).
func UnveilBlock() error {
- // Both pointers must be nil.
- var pathUnsafe, flagsUnsafe unsafe.Pointer
- _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(pathUnsafe), uintptr(flagsUnsafe), 0)
- if e != 0 {
- return e
+ if err := supportsUnveil(); err != nil {
+ return err
}
+ return unveil(nil, nil)
+}
+
+// supportsUnveil checks for availability of the unveil(2) system call based
+// on the running OpenBSD version.
+func supportsUnveil() error {
+ maj, min, err := majmin()
+ if err != nil {
+ return err
+ }
+
+ // unveil is not available before 6.4
+ if maj < 6 || (maj == 6 && min <= 3) {
+ return fmt.Errorf("cannot call Unveil on OpenBSD %d.%d", maj, min)
+ }
+
return nil
}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/xattr_bsd.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/xattr_bsd.go
index f5f8e9f366..e168793961 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/xattr_bsd.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/xattr_bsd.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build freebsd || netbsd
-// +build freebsd netbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
index ca9799b79e..2fb219d787 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc && aix
-// +build ppc,aix
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs -- -maix32 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
index 200c8c26fe..b0e6f5c85c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64 && aix
-// +build ppc64,aix
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -maix64 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
index 1430076271..e40fa85245 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && darwin
-// +build amd64,darwin
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
index ab044a7427..bb02aa6c05 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && darwin
-// +build arm64,darwin
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
index 17bba0e44f..c0e0f8694c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && dragonfly
-// +build amd64,dragonfly
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
index f8c2c51387..6c6923906f 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build 386 && freebsd
-// +build 386,freebsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m32 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
index 96310c3be1..dd9163f8e8 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && freebsd
-// +build amd64,freebsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
index 777b69defa..493a2a793c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm && freebsd
-// +build arm,freebsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
index c557ac2db3..8b437b307d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && freebsd
-// +build arm64,freebsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go
index 341b4d9626..67c02dd579 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build riscv64 && freebsd
-// +build riscv64,freebsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux.go
index de936b677b..36bf8399f4 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux.go
@@ -1,7 +1,6 @@
// Code generated by mkmerge; DO NOT EDIT.
//go:build linux
-// +build linux
package unix
@@ -481,10 +480,13 @@ const (
BPF_FROM_BE = 0x8
BPF_FROM_LE = 0x0
BPF_FS_MAGIC = 0xcafe4a11
+ BPF_F_AFTER = 0x10
BPF_F_ALLOW_MULTI = 0x2
BPF_F_ALLOW_OVERRIDE = 0x1
BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_KPROBE_MULTI_RETURN = 0x1
+ BPF_F_BEFORE = 0x8
+ BPF_F_ID = 0x20
+ BPF_F_NETFILTER_IP_DEFRAG = 0x1
BPF_F_QUERY_EFFECTIVE = 0x1
BPF_F_REPLACE = 0x4
BPF_F_SLEEPABLE = 0x10
@@ -493,6 +495,7 @@ const (
BPF_F_TEST_RUN_ON_CPU = 0x1
BPF_F_TEST_STATE_FREQ = 0x8
BPF_F_TEST_XDP_LIVE_FRAMES = 0x2
+ BPF_F_XDP_DEV_BOUND_ONLY = 0x40
BPF_F_XDP_HAS_FRAGS = 0x20
BPF_H = 0x8
BPF_IMM = 0x0
@@ -520,6 +523,7 @@ const (
BPF_MAJOR_VERSION = 0x1
BPF_MAXINSNS = 0x1000
BPF_MEM = 0x60
+ BPF_MEMSX = 0x80
BPF_MEMWORDS = 0x10
BPF_MINOR_VERSION = 0x1
BPF_MISC = 0x7
@@ -775,6 +779,8 @@ const (
DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
DEVLINK_GENL_NAME = "devlink"
DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_PORT_FN_CAP_IPSEC_CRYPTO = 0x4
+ DEVLINK_PORT_FN_CAP_IPSEC_PACKET = 0x8
DEVLINK_PORT_FN_CAP_MIGRATABLE = 0x2
DEVLINK_PORT_FN_CAP_ROCE = 0x1
DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
@@ -826,9 +832,9 @@ const (
DM_UUID_FLAG = 0x4000
DM_UUID_LEN = 0x81
DM_VERSION = 0xc138fd00
- DM_VERSION_EXTRA = "-ioctl (2022-07-28)"
+ DM_VERSION_EXTRA = "-ioctl (2023-03-01)"
DM_VERSION_MAJOR = 0x4
- DM_VERSION_MINOR = 0x2f
+ DM_VERSION_MINOR = 0x30
DM_VERSION_PATCHLEVEL = 0x0
DT_BLK = 0x6
DT_CHR = 0x2
@@ -1197,6 +1203,7 @@ const (
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
FAN_FS_ERROR = 0x8000
+ FAN_INFO = 0x20
FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_EVICTABLE = 0x200
@@ -1233,6 +1240,8 @@ const (
FAN_REPORT_PIDFD = 0x80
FAN_REPORT_TARGET_FID = 0x1000
FAN_REPORT_TID = 0x100
+ FAN_RESPONSE_INFO_AUDIT_RULE = 0x1
+ FAN_RESPONSE_INFO_NONE = 0x0
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1
@@ -1694,6 +1703,7 @@ const (
KEXEC_ON_CRASH = 0x1
KEXEC_PRESERVE_CONTEXT = 0x2
KEXEC_SEGMENT_MAX = 0x10
+ KEXEC_UPDATE_ELFCOREHDR = 0x4
KEYCTL_ASSUME_AUTHORITY = 0x10
KEYCTL_CAPABILITIES = 0x1f
KEYCTL_CAPS0_BIG_KEY = 0x10
@@ -1775,6 +1785,8 @@ const (
LANDLOCK_ACCESS_FS_REMOVE_FILE = 0x20
LANDLOCK_ACCESS_FS_TRUNCATE = 0x4000
LANDLOCK_ACCESS_FS_WRITE_FILE = 0x2
+ LANDLOCK_ACCESS_NET_BIND_TCP = 0x1
+ LANDLOCK_ACCESS_NET_CONNECT_TCP = 0x2
LANDLOCK_CREATE_RULESET_VERSION = 0x1
LINUX_REBOOT_CMD_CAD_OFF = 0x0
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
@@ -1791,6 +1803,7 @@ const (
LOCK_SH = 0x1
LOCK_UN = 0x8
LOOP_CLR_FD = 0x4c01
+ LOOP_CONFIGURE = 0x4c0a
LOOP_CTL_ADD = 0x4c80
LOOP_CTL_GET_FREE = 0x4c82
LOOP_CTL_REMOVE = 0x4c81
@@ -1860,6 +1873,7 @@ const (
MEMWRITEOOB64 = 0xc0184d15
MFD_ALLOW_SEALING = 0x2
MFD_CLOEXEC = 0x1
+ MFD_EXEC = 0x10
MFD_HUGETLB = 0x4
MFD_HUGE_16GB = 0x88000000
MFD_HUGE_16MB = 0x60000000
@@ -1875,6 +1889,7 @@ const (
MFD_HUGE_8MB = 0x5c000000
MFD_HUGE_MASK = 0x3f
MFD_HUGE_SHIFT = 0x1a
+ MFD_NOEXEC_SEAL = 0x8
MINIX2_SUPER_MAGIC = 0x2468
MINIX2_SUPER_MAGIC2 = 0x2478
MINIX3_SUPER_MAGIC = 0x4d5a
@@ -1898,6 +1913,9 @@ const (
MOUNT_ATTR_SIZE_VER0 = 0x20
MOUNT_ATTR_STRICTATIME = 0x20
MOUNT_ATTR__ATIME = 0x70
+ MREMAP_DONTUNMAP = 0x4
+ MREMAP_FIXED = 0x2
+ MREMAP_MAYMOVE = 0x1
MSDOS_SUPER_MAGIC = 0x4d44
MSG_BATCH = 0x40000
MSG_CMSG_CLOEXEC = 0x40000000
@@ -2111,6 +2129,60 @@ const (
NFNL_SUBSYS_QUEUE = 0x3
NFNL_SUBSYS_ULOG = 0x4
NFS_SUPER_MAGIC = 0x6969
+ NFT_CHAIN_FLAGS = 0x7
+ NFT_CHAIN_MAXNAMELEN = 0x100
+ NFT_CT_MAX = 0x17
+ NFT_DATA_RESERVED_MASK = 0xffffff00
+ NFT_DATA_VALUE_MAXLEN = 0x40
+ NFT_EXTHDR_OP_MAX = 0x4
+ NFT_FIB_RESULT_MAX = 0x3
+ NFT_INNER_MASK = 0xf
+ NFT_LOGLEVEL_MAX = 0x8
+ NFT_NAME_MAXLEN = 0x100
+ NFT_NG_MAX = 0x1
+ NFT_OBJECT_CONNLIMIT = 0x5
+ NFT_OBJECT_COUNTER = 0x1
+ NFT_OBJECT_CT_EXPECT = 0x9
+ NFT_OBJECT_CT_HELPER = 0x3
+ NFT_OBJECT_CT_TIMEOUT = 0x7
+ NFT_OBJECT_LIMIT = 0x4
+ NFT_OBJECT_MAX = 0xa
+ NFT_OBJECT_QUOTA = 0x2
+ NFT_OBJECT_SECMARK = 0x8
+ NFT_OBJECT_SYNPROXY = 0xa
+ NFT_OBJECT_TUNNEL = 0x6
+ NFT_OBJECT_UNSPEC = 0x0
+ NFT_OBJ_MAXNAMELEN = 0x100
+ NFT_OSF_MAXGENRELEN = 0x10
+ NFT_QUEUE_FLAG_BYPASS = 0x1
+ NFT_QUEUE_FLAG_CPU_FANOUT = 0x2
+ NFT_QUEUE_FLAG_MASK = 0x3
+ NFT_REG32_COUNT = 0x10
+ NFT_REG32_SIZE = 0x4
+ NFT_REG_MAX = 0x4
+ NFT_REG_SIZE = 0x10
+ NFT_REJECT_ICMPX_MAX = 0x3
+ NFT_RT_MAX = 0x4
+ NFT_SECMARK_CTX_MAXLEN = 0x100
+ NFT_SET_MAXNAMELEN = 0x100
+ NFT_SOCKET_MAX = 0x3
+ NFT_TABLE_F_MASK = 0x3
+ NFT_TABLE_MAXNAMELEN = 0x100
+ NFT_TRACETYPE_MAX = 0x3
+ NFT_TUNNEL_F_MASK = 0x7
+ NFT_TUNNEL_MAX = 0x1
+ NFT_TUNNEL_MODE_MAX = 0x2
+ NFT_USERDATA_MAXLEN = 0x100
+ NFT_XFRM_KEY_MAX = 0x6
+ NF_NAT_RANGE_MAP_IPS = 0x1
+ NF_NAT_RANGE_MASK = 0x7f
+ NF_NAT_RANGE_NETMAP = 0x40
+ NF_NAT_RANGE_PERSISTENT = 0x8
+ NF_NAT_RANGE_PROTO_OFFSET = 0x20
+ NF_NAT_RANGE_PROTO_RANDOM = 0x4
+ NF_NAT_RANGE_PROTO_RANDOM_ALL = 0x14
+ NF_NAT_RANGE_PROTO_RANDOM_FULLY = 0x10
+ NF_NAT_RANGE_PROTO_SPECIFIED = 0x2
NILFS_SUPER_MAGIC = 0x3434
NL0 = 0x0
NL1 = 0x100
@@ -2204,6 +2276,7 @@ const (
PACKET_USER = 0x6
PACKET_VERSION = 0xa
PACKET_VNET_HDR = 0xf
+ PACKET_VNET_HDR_SZ = 0x18
PARITY_CRC16_PR0 = 0x2
PARITY_CRC16_PR0_CCITT = 0x4
PARITY_CRC16_PR1 = 0x3
@@ -2221,6 +2294,7 @@ const (
PERF_ATTR_SIZE_VER5 = 0x70
PERF_ATTR_SIZE_VER6 = 0x78
PERF_ATTR_SIZE_VER7 = 0x80
+ PERF_ATTR_SIZE_VER8 = 0x88
PERF_AUX_FLAG_COLLISION = 0x8
PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT = 0x0
PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW = 0x100
@@ -2264,6 +2338,7 @@ const (
PERF_MEM_LVLNUM_PMEM = 0xe
PERF_MEM_LVLNUM_RAM = 0xd
PERF_MEM_LVLNUM_SHIFT = 0x21
+ PERF_MEM_LVLNUM_UNC = 0x8
PERF_MEM_LVL_HIT = 0x2
PERF_MEM_LVL_IO = 0x1000
PERF_MEM_LVL_L1 = 0x8
@@ -2361,6 +2436,7 @@ const (
PR_FP_EXC_UND = 0x40000
PR_FP_MODE_FR = 0x1
PR_FP_MODE_FRE = 0x2
+ PR_GET_AUXV = 0x41555856
PR_GET_CHILD_SUBREAPER = 0x25
PR_GET_DUMPABLE = 0x3
PR_GET_ENDIAN = 0x13
@@ -2369,6 +2445,8 @@ const (
PR_GET_FP_MODE = 0x2e
PR_GET_IO_FLUSHER = 0x3a
PR_GET_KEEPCAPS = 0x7
+ PR_GET_MDWE = 0x42
+ PR_GET_MEMORY_MERGE = 0x44
PR_GET_NAME = 0x10
PR_GET_NO_NEW_PRIVS = 0x27
PR_GET_PDEATHSIG = 0x2
@@ -2389,6 +2467,8 @@ const (
PR_MCE_KILL_GET = 0x22
PR_MCE_KILL_LATE = 0x0
PR_MCE_KILL_SET = 0x1
+ PR_MDWE_NO_INHERIT = 0x2
+ PR_MDWE_REFUSE_EXEC_GAIN = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_MTE_TAG_MASK = 0x7fff8
@@ -2406,6 +2486,15 @@ const (
PR_PAC_GET_ENABLED_KEYS = 0x3d
PR_PAC_RESET_KEYS = 0x36
PR_PAC_SET_ENABLED_KEYS = 0x3c
+ PR_RISCV_V_GET_CONTROL = 0x46
+ PR_RISCV_V_SET_CONTROL = 0x45
+ PR_RISCV_V_VSTATE_CTRL_CUR_MASK = 0x3
+ PR_RISCV_V_VSTATE_CTRL_DEFAULT = 0x0
+ PR_RISCV_V_VSTATE_CTRL_INHERIT = 0x10
+ PR_RISCV_V_VSTATE_CTRL_MASK = 0x1f
+ PR_RISCV_V_VSTATE_CTRL_NEXT_MASK = 0xc
+ PR_RISCV_V_VSTATE_CTRL_OFF = 0x1
+ PR_RISCV_V_VSTATE_CTRL_ON = 0x2
PR_SCHED_CORE = 0x3e
PR_SCHED_CORE_CREATE = 0x1
PR_SCHED_CORE_GET = 0x0
@@ -2423,6 +2512,8 @@ const (
PR_SET_FP_MODE = 0x2d
PR_SET_IO_FLUSHER = 0x39
PR_SET_KEEPCAPS = 0x8
+ PR_SET_MDWE = 0x41
+ PR_SET_MEMORY_MERGE = 0x43
PR_SET_MM = 0x23
PR_SET_MM_ARG_END = 0x9
PR_SET_MM_ARG_START = 0x8
@@ -2506,6 +2597,7 @@ const (
PTRACE_GETSIGMASK = 0x420a
PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
PTRACE_GET_SYSCALL_INFO = 0x420e
+ PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211
PTRACE_INTERRUPT = 0x4207
PTRACE_KILL = 0x8
PTRACE_LISTEN = 0x4208
@@ -2536,6 +2628,7 @@ const (
PTRACE_SETREGSET = 0x4205
PTRACE_SETSIGINFO = 0x4203
PTRACE_SETSIGMASK = 0x420b
+ PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
PTRACE_SYSCALL_INFO_ENTRY = 0x1
@@ -2579,8 +2672,9 @@ const (
RTAX_FEATURES = 0xc
RTAX_FEATURE_ALLFRAG = 0x8
RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
+ RTAX_FEATURE_MASK = 0x1f
RTAX_FEATURE_SACK = 0x2
+ RTAX_FEATURE_TCP_USEC_TS = 0x10
RTAX_FEATURE_TIMESTAMP = 0x4
RTAX_HOPLIMIT = 0xa
RTAX_INITCWND = 0xb
@@ -2802,13 +2896,59 @@ const (
RWF_SUPPORTED = 0x1f
RWF_SYNC = 0x4
RWF_WRITE_LIFE_NOT_SET = 0x0
+ SCHED_BATCH = 0x3
+ SCHED_DEADLINE = 0x6
+ SCHED_FIFO = 0x1
+ SCHED_FLAG_ALL = 0x7f
+ SCHED_FLAG_DL_OVERRUN = 0x4
+ SCHED_FLAG_KEEP_ALL = 0x18
+ SCHED_FLAG_KEEP_PARAMS = 0x10
+ SCHED_FLAG_KEEP_POLICY = 0x8
+ SCHED_FLAG_RECLAIM = 0x2
+ SCHED_FLAG_RESET_ON_FORK = 0x1
+ SCHED_FLAG_UTIL_CLAMP = 0x60
+ SCHED_FLAG_UTIL_CLAMP_MAX = 0x40
+ SCHED_FLAG_UTIL_CLAMP_MIN = 0x20
+ SCHED_IDLE = 0x5
+ SCHED_NORMAL = 0x0
+ SCHED_RESET_ON_FORK = 0x40000000
+ SCHED_RR = 0x2
SCM_CREDENTIALS = 0x2
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x1d
SC_LOG_FLUSH = 0x100000
+ SECCOMP_ADDFD_FLAG_SEND = 0x2
+ SECCOMP_ADDFD_FLAG_SETFD = 0x1
+ SECCOMP_FILTER_FLAG_LOG = 0x2
+ SECCOMP_FILTER_FLAG_NEW_LISTENER = 0x8
+ SECCOMP_FILTER_FLAG_SPEC_ALLOW = 0x4
+ SECCOMP_FILTER_FLAG_TSYNC = 0x1
+ SECCOMP_FILTER_FLAG_TSYNC_ESRCH = 0x10
+ SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV = 0x20
+ SECCOMP_GET_ACTION_AVAIL = 0x2
+ SECCOMP_GET_NOTIF_SIZES = 0x3
+ SECCOMP_IOCTL_NOTIF_RECV = 0xc0502100
+ SECCOMP_IOCTL_NOTIF_SEND = 0xc0182101
+ SECCOMP_IOC_MAGIC = '!'
SECCOMP_MODE_DISABLED = 0x0
SECCOMP_MODE_FILTER = 0x2
SECCOMP_MODE_STRICT = 0x1
+ SECCOMP_RET_ACTION = 0x7fff0000
+ SECCOMP_RET_ACTION_FULL = 0xffff0000
+ SECCOMP_RET_ALLOW = 0x7fff0000
+ SECCOMP_RET_DATA = 0xffff
+ SECCOMP_RET_ERRNO = 0x50000
+ SECCOMP_RET_KILL = 0x0
+ SECCOMP_RET_KILL_PROCESS = 0x80000000
+ SECCOMP_RET_KILL_THREAD = 0x0
+ SECCOMP_RET_LOG = 0x7ffc0000
+ SECCOMP_RET_TRACE = 0x7ff00000
+ SECCOMP_RET_TRAP = 0x30000
+ SECCOMP_RET_USER_NOTIF = 0x7fc00000
+ SECCOMP_SET_MODE_FILTER = 0x1
+ SECCOMP_SET_MODE_STRICT = 0x0
+ SECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP = 0x1
+ SECCOMP_USER_NOTIF_FLAG_CONTINUE = 0x1
SECRETMEM_MAGIC = 0x5345434d
SECURITYFS_MAGIC = 0x73636673
SEEK_CUR = 0x1
@@ -2968,6 +3108,7 @@ const (
SOL_TIPC = 0x10f
SOL_TLS = 0x11a
SOL_UDP = 0x11
+ SOL_VSOCK = 0x11f
SOL_X25 = 0x106
SOL_XDP = 0x11b
SOMAXCONN = 0x1000
@@ -3072,7 +3213,7 @@ const (
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0xd
+ TASKSTATS_VERSION = 0xe
TCIFLUSH = 0x0
TCIOFF = 0x2
TCIOFLUSH = 0x2
@@ -3238,6 +3379,7 @@ const (
TP_STATUS_COPY = 0x2
TP_STATUS_CSUMNOTREADY = 0x8
TP_STATUS_CSUM_VALID = 0x80
+ TP_STATUS_GSO_TCP = 0x100
TP_STATUS_KERNEL = 0x0
TP_STATUS_LOSING = 0x4
TP_STATUS_SENDING = 0x2
@@ -3415,6 +3557,7 @@ const (
XDP_PACKET_HEADROOM = 0x100
XDP_PGOFF_RX_RING = 0x0
XDP_PGOFF_TX_RING = 0x80000000
+ XDP_PKT_CONTD = 0x1
XDP_RING_NEED_WAKEUP = 0x1
XDP_RX_RING = 0x2
XDP_SHARED_UMEM = 0x1
@@ -3427,6 +3570,7 @@ const (
XDP_UMEM_REG = 0x4
XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
XDP_USE_NEED_WAKEUP = 0x8
+ XDP_USE_SG = 0x10
XDP_ZEROCOPY = 0x4
XENFS_SUPER_MAGIC = 0xabba1974
XFS_SUPER_MAGIC = 0x58465342
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
index a46df0f1e5..42ff8c3c1b 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build 386 && linux
-// +build 386,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/386/include -m32 _const.go
@@ -27,22 +26,31 @@ const (
B57600 = 0x1001
B576000 = 0x1006
B921600 = 0x1007
+ BLKALIGNOFF = 0x127a
BLKBSZGET = 0x80041270
BLKBSZSET = 0x40041271
+ BLKDISCARD = 0x1277
+ BLKDISCARDZEROES = 0x127c
BLKFLSBUF = 0x1261
BLKFRAGET = 0x1265
BLKFRASET = 0x1264
+ BLKGETDISKSEQ = 0x80081280
BLKGETSIZE = 0x1260
BLKGETSIZE64 = 0x80041272
+ BLKIOMIN = 0x1278
+ BLKIOOPT = 0x1279
BLKPBSZGET = 0x127b
BLKRAGET = 0x1263
BLKRASET = 0x1262
BLKROGET = 0x125e
BLKROSET = 0x125d
+ BLKROTATIONAL = 0x127e
BLKRRPART = 0x125f
+ BLKSECDISCARD = 0x127d
BLKSECTGET = 0x1267
BLKSECTSET = 0x1266
BLKSSZGET = 0x1268
+ BLKZEROOUT = 0x127f
BOTHER = 0x1000
BS1 = 0x2000
BSDLY = 0x2000
@@ -273,6 +281,9 @@ const (
SCM_TIMESTAMPNS = 0x23
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104
SFD_CLOEXEC = 0x80000
SFD_NONBLOCK = 0x800
SIOCATMARK = 0x8905
@@ -317,10 +328,12 @@ const (
SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
+ SO_PASSPIDFD = 0x4c
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x11
SO_PEERGROUPS = 0x3b
+ SO_PEERPIDFD = 0x4d
SO_PEERSEC = 0x1f
SO_PREFER_BUSY_POLL = 0x45
SO_PROTOCOL = 0x26
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
index 6cd4a3ea9d..dca436004f 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && linux
-// +build amd64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/amd64/include -m64 _const.go
@@ -27,22 +26,31 @@ const (
B57600 = 0x1001
B576000 = 0x1006
B921600 = 0x1007
+ BLKALIGNOFF = 0x127a
BLKBSZGET = 0x80081270
BLKBSZSET = 0x40081271
+ BLKDISCARD = 0x1277
+ BLKDISCARDZEROES = 0x127c
BLKFLSBUF = 0x1261
BLKFRAGET = 0x1265
BLKFRASET = 0x1264
+ BLKGETDISKSEQ = 0x80081280
BLKGETSIZE = 0x1260
BLKGETSIZE64 = 0x80081272
+ BLKIOMIN = 0x1278
+ BLKIOOPT = 0x1279
BLKPBSZGET = 0x127b
BLKRAGET = 0x1263
BLKRASET = 0x1262
BLKROGET = 0x125e
BLKROSET = 0x125d
+ BLKROTATIONAL = 0x127e
BLKRRPART = 0x125f
+ BLKSECDISCARD = 0x127d
BLKSECTGET = 0x1267
BLKSECTSET = 0x1266
BLKSSZGET = 0x1268
+ BLKZEROOUT = 0x127f
BOTHER = 0x1000
BS1 = 0x2000
BSDLY = 0x2000
@@ -274,6 +282,9 @@ const (
SCM_TIMESTAMPNS = 0x23
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104
SFD_CLOEXEC = 0x80000
SFD_NONBLOCK = 0x800
SIOCATMARK = 0x8905
@@ -318,10 +329,12 @@ const (
SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
+ SO_PASSPIDFD = 0x4c
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x11
SO_PEERGROUPS = 0x3b
+ SO_PEERPIDFD = 0x4d
SO_PEERSEC = 0x1f
SO_PREFER_BUSY_POLL = 0x45
SO_PROTOCOL = 0x26
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
index c7ebee24df..5cca668ac3 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm && linux
-// +build arm,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/arm/include _const.go
@@ -27,22 +26,31 @@ const (
B57600 = 0x1001
B576000 = 0x1006
B921600 = 0x1007
+ BLKALIGNOFF = 0x127a
BLKBSZGET = 0x80041270
BLKBSZSET = 0x40041271
+ BLKDISCARD = 0x1277
+ BLKDISCARDZEROES = 0x127c
BLKFLSBUF = 0x1261
BLKFRAGET = 0x1265
BLKFRASET = 0x1264
+ BLKGETDISKSEQ = 0x80081280
BLKGETSIZE = 0x1260
BLKGETSIZE64 = 0x80041272
+ BLKIOMIN = 0x1278
+ BLKIOOPT = 0x1279
BLKPBSZGET = 0x127b
BLKRAGET = 0x1263
BLKRASET = 0x1262
BLKROGET = 0x125e
BLKROSET = 0x125d
+ BLKROTATIONAL = 0x127e
BLKRRPART = 0x125f
+ BLKSECDISCARD = 0x127d
BLKSECTGET = 0x1267
BLKSECTSET = 0x1266
BLKSSZGET = 0x1268
+ BLKZEROOUT = 0x127f
BOTHER = 0x1000
BS1 = 0x2000
BSDLY = 0x2000
@@ -280,6 +288,9 @@ const (
SCM_TIMESTAMPNS = 0x23
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104
SFD_CLOEXEC = 0x80000
SFD_NONBLOCK = 0x800
SIOCATMARK = 0x8905
@@ -324,10 +335,12 @@ const (
SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
+ SO_PASSPIDFD = 0x4c
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x11
SO_PEERGROUPS = 0x3b
+ SO_PEERPIDFD = 0x4d
SO_PEERSEC = 0x1f
SO_PREFER_BUSY_POLL = 0x45
SO_PROTOCOL = 0x26
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
index 9d5352c3e4..d8cae6d153 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && linux
-// +build arm64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/arm64/include -fsigned-char _const.go
@@ -27,22 +26,31 @@ const (
B57600 = 0x1001
B576000 = 0x1006
B921600 = 0x1007
+ BLKALIGNOFF = 0x127a
BLKBSZGET = 0x80081270
BLKBSZSET = 0x40081271
+ BLKDISCARD = 0x1277
+ BLKDISCARDZEROES = 0x127c
BLKFLSBUF = 0x1261
BLKFRAGET = 0x1265
BLKFRASET = 0x1264
+ BLKGETDISKSEQ = 0x80081280
BLKGETSIZE = 0x1260
BLKGETSIZE64 = 0x80081272
+ BLKIOMIN = 0x1278
+ BLKIOOPT = 0x1279
BLKPBSZGET = 0x127b
BLKRAGET = 0x1263
BLKRASET = 0x1262
BLKROGET = 0x125e
BLKROSET = 0x125d
+ BLKROTATIONAL = 0x127e
BLKRRPART = 0x125f
+ BLKSECDISCARD = 0x127d
BLKSECTGET = 0x1267
BLKSECTSET = 0x1266
BLKSSZGET = 0x1268
+ BLKZEROOUT = 0x127f
BOTHER = 0x1000
BS1 = 0x2000
BSDLY = 0x2000
@@ -270,6 +278,9 @@ const (
SCM_TIMESTAMPNS = 0x23
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104
SFD_CLOEXEC = 0x80000
SFD_NONBLOCK = 0x800
SIOCATMARK = 0x8905
@@ -314,10 +325,12 @@ const (
SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
+ SO_PASSPIDFD = 0x4c
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x11
SO_PEERGROUPS = 0x3b
+ SO_PEERPIDFD = 0x4d
SO_PEERSEC = 0x1f
SO_PREFER_BUSY_POLL = 0x45
SO_PROTOCOL = 0x26
@@ -443,6 +456,7 @@ const (
TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437
TOSTOP = 0x100
+ TPIDR2_MAGIC = 0x54504902
TUNATTACHFILTER = 0x401054d5
TUNDETACHFILTER = 0x401054d6
TUNGETDEVNETNS = 0x54e3
@@ -515,6 +529,7 @@ const (
XCASE = 0x4
XTABS = 0x1800
ZA_MAGIC = 0x54366345
+ ZT_MAGIC = 0x5a544e01
_HIDIOCGRAWNAME = 0x80804804
_HIDIOCGRAWPHYS = 0x80404805
_HIDIOCGRAWUNIQ = 0x80404808
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
index f26a164f4a..28e39afdcb 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build loong64 && linux
-// +build loong64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/loong64/include _const.go
@@ -27,22 +26,31 @@ const (
B57600 = 0x1001
B576000 = 0x1006
B921600 = 0x1007
+ BLKALIGNOFF = 0x127a
BLKBSZGET = 0x80081270
BLKBSZSET = 0x40081271
+ BLKDISCARD = 0x1277
+ BLKDISCARDZEROES = 0x127c
BLKFLSBUF = 0x1261
BLKFRAGET = 0x1265
BLKFRASET = 0x1264
+ BLKGETDISKSEQ = 0x80081280
BLKGETSIZE = 0x1260
BLKGETSIZE64 = 0x80081272
+ BLKIOMIN = 0x1278
+ BLKIOOPT = 0x1279
BLKPBSZGET = 0x127b
BLKRAGET = 0x1263
BLKRASET = 0x1262
BLKROGET = 0x125e
BLKROSET = 0x125d
+ BLKROTATIONAL = 0x127e
BLKRRPART = 0x125f
+ BLKSECDISCARD = 0x127d
BLKSECTGET = 0x1267
BLKSECTSET = 0x1266
BLKSSZGET = 0x1268
+ BLKZEROOUT = 0x127f
BOTHER = 0x1000
BS1 = 0x2000
BSDLY = 0x2000
@@ -109,6 +117,9 @@ const (
IUCLC = 0x200
IXOFF = 0x1000
IXON = 0x400
+ LASX_CTX_MAGIC = 0x41535801
+ LBT_CTX_MAGIC = 0x42540001
+ LSX_CTX_MAGIC = 0x53580001
MAP_ANON = 0x20
MAP_ANONYMOUS = 0x20
MAP_DENYWRITE = 0x800
@@ -264,6 +275,9 @@ const (
SCM_TIMESTAMPNS = 0x23
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104
SFD_CLOEXEC = 0x80000
SFD_NONBLOCK = 0x800
SIOCATMARK = 0x8905
@@ -308,10 +322,12 @@ const (
SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
+ SO_PASSPIDFD = 0x4c
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x11
SO_PEERGROUPS = 0x3b
+ SO_PEERPIDFD = 0x4d
SO_PEERSEC = 0x1f
SO_PREFER_BUSY_POLL = 0x45
SO_PROTOCOL = 0x26
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
index 890bc3c9b7..cd66e92cb4 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips && linux
-// +build mips,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/mips/include _const.go
@@ -27,22 +26,31 @@ const (
B57600 = 0x1001
B576000 = 0x1006
B921600 = 0x1007
+ BLKALIGNOFF = 0x2000127a
BLKBSZGET = 0x40041270
BLKBSZSET = 0x80041271
+ BLKDISCARD = 0x20001277
+ BLKDISCARDZEROES = 0x2000127c
BLKFLSBUF = 0x20001261
BLKFRAGET = 0x20001265
BLKFRASET = 0x20001264
+ BLKGETDISKSEQ = 0x40081280
BLKGETSIZE = 0x20001260
BLKGETSIZE64 = 0x40041272
+ BLKIOMIN = 0x20001278
+ BLKIOOPT = 0x20001279
BLKPBSZGET = 0x2000127b
BLKRAGET = 0x20001263
BLKRASET = 0x20001262
BLKROGET = 0x2000125e
BLKROSET = 0x2000125d
+ BLKROTATIONAL = 0x2000127e
BLKRRPART = 0x2000125f
+ BLKSECDISCARD = 0x2000127d
BLKSECTGET = 0x20001267
BLKSECTSET = 0x20001266
BLKSSZGET = 0x20001268
+ BLKZEROOUT = 0x2000127f
BOTHER = 0x1000
BS1 = 0x2000
BSDLY = 0x2000
@@ -273,6 +281,9 @@ const (
SCM_TIMESTAMPNS = 0x23
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104
SFD_CLOEXEC = 0x80000
SFD_NONBLOCK = 0x80
SIOCATMARK = 0x40047307
@@ -317,10 +328,12 @@ const (
SO_NOFCS = 0x2b
SO_OOBINLINE = 0x100
SO_PASSCRED = 0x11
+ SO_PASSPIDFD = 0x4c
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x12
SO_PEERGROUPS = 0x3b
+ SO_PEERPIDFD = 0x4d
SO_PEERSEC = 0x1e
SO_PREFER_BUSY_POLL = 0x45
SO_PROTOCOL = 0x1028
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
index 549f26ac64..c1595eba78 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips64 && linux
-// +build mips64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/mips64/include _const.go
@@ -27,22 +26,31 @@ const (
B57600 = 0x1001
B576000 = 0x1006
B921600 = 0x1007
+ BLKALIGNOFF = 0x2000127a
BLKBSZGET = 0x40081270
BLKBSZSET = 0x80081271
+ BLKDISCARD = 0x20001277
+ BLKDISCARDZEROES = 0x2000127c
BLKFLSBUF = 0x20001261
BLKFRAGET = 0x20001265
BLKFRASET = 0x20001264
+ BLKGETDISKSEQ = 0x40081280
BLKGETSIZE = 0x20001260
BLKGETSIZE64 = 0x40081272
+ BLKIOMIN = 0x20001278
+ BLKIOOPT = 0x20001279
BLKPBSZGET = 0x2000127b
BLKRAGET = 0x20001263
BLKRASET = 0x20001262
BLKROGET = 0x2000125e
BLKROSET = 0x2000125d
+ BLKROTATIONAL = 0x2000127e
BLKRRPART = 0x2000125f
+ BLKSECDISCARD = 0x2000127d
BLKSECTGET = 0x20001267
BLKSECTSET = 0x20001266
BLKSSZGET = 0x20001268
+ BLKZEROOUT = 0x2000127f
BOTHER = 0x1000
BS1 = 0x2000
BSDLY = 0x2000
@@ -273,6 +281,9 @@ const (
SCM_TIMESTAMPNS = 0x23
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104
SFD_CLOEXEC = 0x80000
SFD_NONBLOCK = 0x80
SIOCATMARK = 0x40047307
@@ -317,10 +328,12 @@ const (
SO_NOFCS = 0x2b
SO_OOBINLINE = 0x100
SO_PASSCRED = 0x11
+ SO_PASSPIDFD = 0x4c
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x12
SO_PEERGROUPS = 0x3b
+ SO_PEERPIDFD = 0x4d
SO_PEERSEC = 0x1e
SO_PREFER_BUSY_POLL = 0x45
SO_PROTOCOL = 0x1028
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
index e0365e32c1..ee9456b0da 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips64le && linux
-// +build mips64le,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/mips64le/include _const.go
@@ -27,22 +26,31 @@ const (
B57600 = 0x1001
B576000 = 0x1006
B921600 = 0x1007
+ BLKALIGNOFF = 0x2000127a
BLKBSZGET = 0x40081270
BLKBSZSET = 0x80081271
+ BLKDISCARD = 0x20001277
+ BLKDISCARDZEROES = 0x2000127c
BLKFLSBUF = 0x20001261
BLKFRAGET = 0x20001265
BLKFRASET = 0x20001264
+ BLKGETDISKSEQ = 0x40081280
BLKGETSIZE = 0x20001260
BLKGETSIZE64 = 0x40081272
+ BLKIOMIN = 0x20001278
+ BLKIOOPT = 0x20001279
BLKPBSZGET = 0x2000127b
BLKRAGET = 0x20001263
BLKRASET = 0x20001262
BLKROGET = 0x2000125e
BLKROSET = 0x2000125d
+ BLKROTATIONAL = 0x2000127e
BLKRRPART = 0x2000125f
+ BLKSECDISCARD = 0x2000127d
BLKSECTGET = 0x20001267
BLKSECTSET = 0x20001266
BLKSSZGET = 0x20001268
+ BLKZEROOUT = 0x2000127f
BOTHER = 0x1000
BS1 = 0x2000
BSDLY = 0x2000
@@ -273,6 +281,9 @@ const (
SCM_TIMESTAMPNS = 0x23
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104
SFD_CLOEXEC = 0x80000
SFD_NONBLOCK = 0x80
SIOCATMARK = 0x40047307
@@ -317,10 +328,12 @@ const (
SO_NOFCS = 0x2b
SO_OOBINLINE = 0x100
SO_PASSCRED = 0x11
+ SO_PASSPIDFD = 0x4c
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x12
SO_PEERGROUPS = 0x3b
+ SO_PEERPIDFD = 0x4d
SO_PEERSEC = 0x1e
SO_PREFER_BUSY_POLL = 0x45
SO_PROTOCOL = 0x1028
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
index fdccce15ca..8cfca81e1b 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mipsle && linux
-// +build mipsle,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/mipsle/include _const.go
@@ -27,22 +26,31 @@ const (
B57600 = 0x1001
B576000 = 0x1006
B921600 = 0x1007
+ BLKALIGNOFF = 0x2000127a
BLKBSZGET = 0x40041270
BLKBSZSET = 0x80041271
+ BLKDISCARD = 0x20001277
+ BLKDISCARDZEROES = 0x2000127c
BLKFLSBUF = 0x20001261
BLKFRAGET = 0x20001265
BLKFRASET = 0x20001264
+ BLKGETDISKSEQ = 0x40081280
BLKGETSIZE = 0x20001260
BLKGETSIZE64 = 0x40041272
+ BLKIOMIN = 0x20001278
+ BLKIOOPT = 0x20001279
BLKPBSZGET = 0x2000127b
BLKRAGET = 0x20001263
BLKRASET = 0x20001262
BLKROGET = 0x2000125e
BLKROSET = 0x2000125d
+ BLKROTATIONAL = 0x2000127e
BLKRRPART = 0x2000125f
+ BLKSECDISCARD = 0x2000127d
BLKSECTGET = 0x20001267
BLKSECTSET = 0x20001266
BLKSSZGET = 0x20001268
+ BLKZEROOUT = 0x2000127f
BOTHER = 0x1000
BS1 = 0x2000
BSDLY = 0x2000
@@ -273,6 +281,9 @@ const (
SCM_TIMESTAMPNS = 0x23
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104
SFD_CLOEXEC = 0x80000
SFD_NONBLOCK = 0x80
SIOCATMARK = 0x40047307
@@ -317,10 +328,12 @@ const (
SO_NOFCS = 0x2b
SO_OOBINLINE = 0x100
SO_PASSCRED = 0x11
+ SO_PASSPIDFD = 0x4c
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x12
SO_PEERGROUPS = 0x3b
+ SO_PEERPIDFD = 0x4d
SO_PEERSEC = 0x1e
SO_PREFER_BUSY_POLL = 0x45
SO_PROTOCOL = 0x1028
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
index b2205c83fa..60b0deb3af 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc && linux
-// +build ppc,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/ppc/include _const.go
@@ -27,22 +26,31 @@ const (
B57600 = 0x10
B576000 = 0x15
B921600 = 0x16
+ BLKALIGNOFF = 0x2000127a
BLKBSZGET = 0x40041270
BLKBSZSET = 0x80041271
+ BLKDISCARD = 0x20001277
+ BLKDISCARDZEROES = 0x2000127c
BLKFLSBUF = 0x20001261
BLKFRAGET = 0x20001265
BLKFRASET = 0x20001264
+ BLKGETDISKSEQ = 0x40081280
BLKGETSIZE = 0x20001260
BLKGETSIZE64 = 0x40041272
+ BLKIOMIN = 0x20001278
+ BLKIOOPT = 0x20001279
BLKPBSZGET = 0x2000127b
BLKRAGET = 0x20001263
BLKRASET = 0x20001262
BLKROGET = 0x2000125e
BLKROSET = 0x2000125d
+ BLKROTATIONAL = 0x2000127e
BLKRRPART = 0x2000125f
+ BLKSECDISCARD = 0x2000127d
BLKSECTGET = 0x20001267
BLKSECTSET = 0x20001266
BLKSSZGET = 0x20001268
+ BLKZEROOUT = 0x2000127f
BOTHER = 0x1f
BS1 = 0x8000
BSDLY = 0x8000
@@ -328,6 +336,9 @@ const (
SCM_TIMESTAMPNS = 0x23
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104
SFD_CLOEXEC = 0x80000
SFD_NONBLOCK = 0x800
SIOCATMARK = 0x8905
@@ -372,10 +383,12 @@ const (
SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x14
+ SO_PASSPIDFD = 0x4c
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x15
SO_PEERGROUPS = 0x3b
+ SO_PEERPIDFD = 0x4d
SO_PEERSEC = 0x1f
SO_PREFER_BUSY_POLL = 0x45
SO_PROTOCOL = 0x26
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
index 81aa5ad0f6..f90aa7281b 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64 && linux
-// +build ppc64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/ppc64/include _const.go
@@ -27,22 +26,31 @@ const (
B57600 = 0x10
B576000 = 0x15
B921600 = 0x16
+ BLKALIGNOFF = 0x2000127a
BLKBSZGET = 0x40081270
BLKBSZSET = 0x80081271
+ BLKDISCARD = 0x20001277
+ BLKDISCARDZEROES = 0x2000127c
BLKFLSBUF = 0x20001261
BLKFRAGET = 0x20001265
BLKFRASET = 0x20001264
+ BLKGETDISKSEQ = 0x40081280
BLKGETSIZE = 0x20001260
BLKGETSIZE64 = 0x40081272
+ BLKIOMIN = 0x20001278
+ BLKIOOPT = 0x20001279
BLKPBSZGET = 0x2000127b
BLKRAGET = 0x20001263
BLKRASET = 0x20001262
BLKROGET = 0x2000125e
BLKROSET = 0x2000125d
+ BLKROTATIONAL = 0x2000127e
BLKRRPART = 0x2000125f
+ BLKSECDISCARD = 0x2000127d
BLKSECTGET = 0x20001267
BLKSECTSET = 0x20001266
BLKSSZGET = 0x20001268
+ BLKZEROOUT = 0x2000127f
BOTHER = 0x1f
BS1 = 0x8000
BSDLY = 0x8000
@@ -332,6 +340,9 @@ const (
SCM_TIMESTAMPNS = 0x23
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104
SFD_CLOEXEC = 0x80000
SFD_NONBLOCK = 0x800
SIOCATMARK = 0x8905
@@ -376,10 +387,12 @@ const (
SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x14
+ SO_PASSPIDFD = 0x4c
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x15
SO_PEERGROUPS = 0x3b
+ SO_PEERPIDFD = 0x4d
SO_PEERSEC = 0x1f
SO_PREFER_BUSY_POLL = 0x45
SO_PROTOCOL = 0x26
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
index 76807a1fd4..ba9e015033 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64le && linux
-// +build ppc64le,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/ppc64le/include _const.go
@@ -27,22 +26,31 @@ const (
B57600 = 0x10
B576000 = 0x15
B921600 = 0x16
+ BLKALIGNOFF = 0x2000127a
BLKBSZGET = 0x40081270
BLKBSZSET = 0x80081271
+ BLKDISCARD = 0x20001277
+ BLKDISCARDZEROES = 0x2000127c
BLKFLSBUF = 0x20001261
BLKFRAGET = 0x20001265
BLKFRASET = 0x20001264
+ BLKGETDISKSEQ = 0x40081280
BLKGETSIZE = 0x20001260
BLKGETSIZE64 = 0x40081272
+ BLKIOMIN = 0x20001278
+ BLKIOOPT = 0x20001279
BLKPBSZGET = 0x2000127b
BLKRAGET = 0x20001263
BLKRASET = 0x20001262
BLKROGET = 0x2000125e
BLKROSET = 0x2000125d
+ BLKROTATIONAL = 0x2000127e
BLKRRPART = 0x2000125f
+ BLKSECDISCARD = 0x2000127d
BLKSECTGET = 0x20001267
BLKSECTSET = 0x20001266
BLKSSZGET = 0x20001268
+ BLKZEROOUT = 0x2000127f
BOTHER = 0x1f
BS1 = 0x8000
BSDLY = 0x8000
@@ -332,6 +340,9 @@ const (
SCM_TIMESTAMPNS = 0x23
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104
SFD_CLOEXEC = 0x80000
SFD_NONBLOCK = 0x800
SIOCATMARK = 0x8905
@@ -376,10 +387,12 @@ const (
SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x14
+ SO_PASSPIDFD = 0x4c
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x15
SO_PEERGROUPS = 0x3b
+ SO_PEERPIDFD = 0x4d
SO_PEERSEC = 0x1f
SO_PREFER_BUSY_POLL = 0x45
SO_PROTOCOL = 0x26
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
index d4a5ab9e4e..07cdfd6e9f 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build riscv64 && linux
-// +build riscv64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/riscv64/include _const.go
@@ -27,22 +26,31 @@ const (
B57600 = 0x1001
B576000 = 0x1006
B921600 = 0x1007
+ BLKALIGNOFF = 0x127a
BLKBSZGET = 0x80081270
BLKBSZSET = 0x40081271
+ BLKDISCARD = 0x1277
+ BLKDISCARDZEROES = 0x127c
BLKFLSBUF = 0x1261
BLKFRAGET = 0x1265
BLKFRASET = 0x1264
+ BLKGETDISKSEQ = 0x80081280
BLKGETSIZE = 0x1260
BLKGETSIZE64 = 0x80081272
+ BLKIOMIN = 0x1278
+ BLKIOOPT = 0x1279
BLKPBSZGET = 0x127b
BLKRAGET = 0x1263
BLKRASET = 0x1262
BLKROGET = 0x125e
BLKROSET = 0x125d
+ BLKROTATIONAL = 0x127e
BLKRRPART = 0x125f
+ BLKSECDISCARD = 0x127d
BLKSECTGET = 0x1267
BLKSECTSET = 0x1266
BLKSSZGET = 0x1268
+ BLKZEROOUT = 0x127f
BOTHER = 0x1000
BS1 = 0x2000
BSDLY = 0x2000
@@ -219,6 +227,9 @@ const (
PPPIOCUNBRIDGECHAN = 0x7434
PPPIOCXFERUNIT = 0x744e
PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_GETFDPIC = 0x21
+ PTRACE_GETFDPIC_EXEC = 0x0
+ PTRACE_GETFDPIC_INTERP = 0x1
RLIMIT_AS = 0x9
RLIMIT_MEMLOCK = 0x8
RLIMIT_NOFILE = 0x7
@@ -261,6 +272,9 @@ const (
SCM_TIMESTAMPNS = 0x23
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104
SFD_CLOEXEC = 0x80000
SFD_NONBLOCK = 0x800
SIOCATMARK = 0x8905
@@ -305,10 +319,12 @@ const (
SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
+ SO_PASSPIDFD = 0x4c
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x11
SO_PEERGROUPS = 0x3b
+ SO_PEERPIDFD = 0x4d
SO_PEERSEC = 0x1f
SO_PREFER_BUSY_POLL = 0x45
SO_PROTOCOL = 0x26
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
index 66e65db951..2f1dd214a7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build s390x && linux
-// +build s390x,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/s390x/include -fsigned-char _const.go
@@ -27,22 +26,31 @@ const (
B57600 = 0x1001
B576000 = 0x1006
B921600 = 0x1007
+ BLKALIGNOFF = 0x127a
BLKBSZGET = 0x80081270
BLKBSZSET = 0x40081271
+ BLKDISCARD = 0x1277
+ BLKDISCARDZEROES = 0x127c
BLKFLSBUF = 0x1261
BLKFRAGET = 0x1265
BLKFRASET = 0x1264
+ BLKGETDISKSEQ = 0x80081280
BLKGETSIZE = 0x1260
BLKGETSIZE64 = 0x80081272
+ BLKIOMIN = 0x1278
+ BLKIOOPT = 0x1279
BLKPBSZGET = 0x127b
BLKRAGET = 0x1263
BLKRASET = 0x1262
BLKROGET = 0x125e
BLKROSET = 0x125d
+ BLKROTATIONAL = 0x127e
BLKRRPART = 0x125f
+ BLKSECDISCARD = 0x127d
BLKSECTGET = 0x1267
BLKSECTSET = 0x1266
BLKSSZGET = 0x1268
+ BLKZEROOUT = 0x127f
BOTHER = 0x1000
BS1 = 0x2000
BSDLY = 0x2000
@@ -336,6 +344,9 @@ const (
SCM_TIMESTAMPNS = 0x23
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104
SFD_CLOEXEC = 0x80000
SFD_NONBLOCK = 0x800
SIOCATMARK = 0x8905
@@ -380,10 +391,12 @@ const (
SO_NOFCS = 0x2b
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
+ SO_PASSPIDFD = 0x4c
SO_PASSSEC = 0x22
SO_PEEK_OFF = 0x2a
SO_PEERCRED = 0x11
SO_PEERGROUPS = 0x3b
+ SO_PEERPIDFD = 0x4d
SO_PEERSEC = 0x1f
SO_PREFER_BUSY_POLL = 0x45
SO_PROTOCOL = 0x26
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
index f619252691..f40519d901 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build sparc64 && linux
-// +build sparc64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/sparc64/include _const.go
@@ -30,22 +29,31 @@ const (
B57600 = 0x1001
B576000 = 0x1006
B921600 = 0x1007
+ BLKALIGNOFF = 0x2000127a
BLKBSZGET = 0x40081270
BLKBSZSET = 0x80081271
+ BLKDISCARD = 0x20001277
+ BLKDISCARDZEROES = 0x2000127c
BLKFLSBUF = 0x20001261
BLKFRAGET = 0x20001265
BLKFRASET = 0x20001264
+ BLKGETDISKSEQ = 0x40081280
BLKGETSIZE = 0x20001260
BLKGETSIZE64 = 0x40081272
+ BLKIOMIN = 0x20001278
+ BLKIOOPT = 0x20001279
BLKPBSZGET = 0x2000127b
BLKRAGET = 0x20001263
BLKRASET = 0x20001262
BLKROGET = 0x2000125e
BLKROSET = 0x2000125d
+ BLKROTATIONAL = 0x2000127e
BLKRRPART = 0x2000125f
+ BLKSECDISCARD = 0x2000127d
BLKSECTGET = 0x20001267
BLKSECTSET = 0x20001266
BLKSSZGET = 0x20001268
+ BLKZEROOUT = 0x2000127f
BOTHER = 0x1000
BS1 = 0x2000
BSDLY = 0x2000
@@ -327,8 +335,59 @@ const (
SCM_TIMESTAMPNS = 0x21
SCM_TXTIME = 0x3f
SCM_WIFI_STATUS = 0x25
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104
SFD_CLOEXEC = 0x400000
SFD_NONBLOCK = 0x4000
+ SF_FP = 0x38
+ SF_I0 = 0x20
+ SF_I1 = 0x24
+ SF_I2 = 0x28
+ SF_I3 = 0x2c
+ SF_I4 = 0x30
+ SF_I5 = 0x34
+ SF_L0 = 0x0
+ SF_L1 = 0x4
+ SF_L2 = 0x8
+ SF_L3 = 0xc
+ SF_L4 = 0x10
+ SF_L5 = 0x14
+ SF_L6 = 0x18
+ SF_L7 = 0x1c
+ SF_PC = 0x3c
+ SF_RETP = 0x40
+ SF_V9_FP = 0x70
+ SF_V9_I0 = 0x40
+ SF_V9_I1 = 0x48
+ SF_V9_I2 = 0x50
+ SF_V9_I3 = 0x58
+ SF_V9_I4 = 0x60
+ SF_V9_I5 = 0x68
+ SF_V9_L0 = 0x0
+ SF_V9_L1 = 0x8
+ SF_V9_L2 = 0x10
+ SF_V9_L3 = 0x18
+ SF_V9_L4 = 0x20
+ SF_V9_L5 = 0x28
+ SF_V9_L6 = 0x30
+ SF_V9_L7 = 0x38
+ SF_V9_PC = 0x78
+ SF_V9_RETP = 0x80
+ SF_V9_XARG0 = 0x88
+ SF_V9_XARG1 = 0x90
+ SF_V9_XARG2 = 0x98
+ SF_V9_XARG3 = 0xa0
+ SF_V9_XARG4 = 0xa8
+ SF_V9_XARG5 = 0xb0
+ SF_V9_XXARG = 0xb8
+ SF_XARG0 = 0x44
+ SF_XARG1 = 0x48
+ SF_XARG2 = 0x4c
+ SF_XARG3 = 0x50
+ SF_XARG4 = 0x54
+ SF_XARG5 = 0x58
+ SF_XXARG = 0x5c
SIOCATMARK = 0x8905
SIOCGPGRP = 0x8904
SIOCGSTAMPNS_NEW = 0x40108907
@@ -371,10 +430,12 @@ const (
SO_NOFCS = 0x27
SO_OOBINLINE = 0x100
SO_PASSCRED = 0x2
+ SO_PASSPIDFD = 0x55
SO_PASSSEC = 0x1f
SO_PEEK_OFF = 0x26
SO_PEERCRED = 0x40
SO_PEERGROUPS = 0x3d
+ SO_PEERPIDFD = 0x56
SO_PEERSEC = 0x1e
SO_PREFER_BUSY_POLL = 0x48
SO_PROTOCOL = 0x1028
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
index 72f7420d20..130085df40 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build 386 && netbsd
-// +build 386,netbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m32 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
index 8d4eb0c080..84769a1a38 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && netbsd
-// +build amd64,netbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
index 9eef9749f6..602ded0033 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm && netbsd
-// +build arm,netbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -marm _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
index 3b62ba192c..efc0406ee1 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && netbsd
-// +build arm64,netbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
index af20e474b3..5a6500f837 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build 386 && openbsd
-// +build 386,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m32 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
index 6015fcb2bf..a5aeeb979d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && openbsd
-// +build amd64,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
index 8d44955e44..0e9748a722 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm && openbsd
-// +build arm,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go
index ae16fe7542..4f4449abc1 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && openbsd
-// +build arm64,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go
index 03d90fe355..76a363f0fe 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips64 && openbsd
-// +build mips64,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go
index 8e2c51b1ee..43ca0cdfdc 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64 && openbsd
-// +build ppc64,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go
index 13d403031e..b1b8bb2005 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build riscv64 && openbsd
-// +build riscv64,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
index 1afee6a089..d2ddd3176e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && solaris
-// +build amd64,solaris
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m64 _const.go
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go
index fc7d0506f6..4dfd2e051d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build zos && s390x
-// +build zos,s390x
// Hand edited based on zerrors_linux_s390x.go
// TODO: auto-generate.
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go
index 97f20ca282..586317c78e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go
@@ -1,8 +1,6 @@
// Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT.
//go:build linux && (arm || arm64)
-// +build linux
-// +build arm arm64
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go
index 0b5f794305..d7c881be77 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go
@@ -1,8 +1,6 @@
// Code generated by linux/mkall.go generatePtracePair("mips", "mips64"). DO NOT EDIT.
//go:build linux && (mips || mips64)
-// +build linux
-// +build mips mips64
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go
index 2807f7e646..2d2de5d292 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go
@@ -1,8 +1,6 @@
// Code generated by linux/mkall.go generatePtracePair("mipsle", "mips64le"). DO NOT EDIT.
//go:build linux && (mipsle || mips64le)
-// +build linux
-// +build mipsle mips64le
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
index 281ea64e34..5adc79fb5e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
@@ -1,8 +1,6 @@
// Code generated by linux/mkall.go generatePtracePair("386", "amd64"). DO NOT EDIT.
//go:build linux && (386 || amd64)
-// +build linux
-// +build 386 amd64
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
index 9a257219d7..6ea64a3c0c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build aix && ppc
-// +build aix,ppc
package unix
@@ -817,28 +816,6 @@ func write(fd int, p []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, er := C.read(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(p))), C.size_t(np))
- n = int(r0)
- if r0 == -1 && er != nil {
- err = er
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, er := C.write(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(p))), C.size_t(np))
- n = int(r0)
- if r0 == -1 && er != nil {
- err = er
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Dup2(oldfd int, newfd int) (err error) {
r0, er := C.dup2(C.int(oldfd), C.int(newfd))
if r0 == -1 && er != nil {
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
index 6de80c20cf..99ee4399a3 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build aix && ppc64
-// +build aix,ppc64
package unix
@@ -762,28 +761,6 @@ func write(fd int, p []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, e1 := callread(fd, uintptr(unsafe.Pointer(p)), np)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, e1 := callwrite(fd, uintptr(unsafe.Pointer(p)), np)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Dup2(oldfd int, newfd int) (err error) {
_, e1 := calldup2(oldfd, newfd)
if e1 != 0 {
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
index c4d50ae500..b68a78362b 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build aix && ppc64 && gc
-// +build aix,ppc64,gc
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
index 6903d3b09e..0a87450bf8 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build aix && ppc64 && gccgo
-// +build aix,ppc64,gccgo
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
index 4037ccf7a9..ccb02f240a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build darwin && amd64
-// +build darwin,amd64
package unix
@@ -725,6 +724,12 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -733,10 +738,6 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
return
}
-var libc_ioctl_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_ioctl ioctl "/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) {
@@ -2410,28 +2411,6 @@ var libc_munmap_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fstat(fd int, stat *Stat_t) (err error) {
_, _, e1 := syscall_syscall(libc_fstat64_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
@@ -2521,14 +2500,6 @@ func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {
return
}
-func ptrace1Ptr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {
- _, _, e1 := syscall_syscall6(libc_ptrace_trampoline_addr, uintptr(request), uintptr(pid), addr, uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
var libc_ptrace_trampoline_addr uintptr
//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
index 4baaed0bc1..8b8bb28402 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
@@ -5,703 +5,586 @@
TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fdopendir(SB)
-
GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getgroups(SB)
-
GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setgroups(SB)
-
GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_wait4(SB)
-
GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_accept(SB)
-
GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_bind(SB)
-
GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_connect(SB)
-
GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_socket(SB)
-
GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getsockopt(SB)
-
GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setsockopt(SB)
-
GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpeername(SB)
-
GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getsockname(SB)
-
GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shutdown(SB)
-
GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_socketpair(SB)
-
GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_recvfrom(SB)
-
GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendto(SB)
-
GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_recvmsg(SB)
-
GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendmsg(SB)
-
GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_kevent(SB)
-
GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_utimes(SB)
-
GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_futimes(SB)
-
GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_poll(SB)
-
GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_madvise(SB)
-
GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mlock(SB)
-
GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mlockall(SB)
-
GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mprotect(SB)
-
GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_msync(SB)
-
GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_munlock(SB)
-
GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_munlockall(SB)
-
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_closedir(SB)
-
GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_readdir_r(SB)
-
GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pipe(SB)
-
GLOBL ·libc_pipe_trampoline_addr(SB), RODATA, $8
DATA ·libc_pipe_trampoline_addr(SB)/8, $libc_pipe_trampoline<>(SB)
TEXT libc_getxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getxattr(SB)
-
GLOBL ·libc_getxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_getxattr_trampoline_addr(SB)/8, $libc_getxattr_trampoline<>(SB)
TEXT libc_fgetxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fgetxattr(SB)
-
GLOBL ·libc_fgetxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_fgetxattr_trampoline_addr(SB)/8, $libc_fgetxattr_trampoline<>(SB)
TEXT libc_setxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setxattr(SB)
-
GLOBL ·libc_setxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_setxattr_trampoline_addr(SB)/8, $libc_setxattr_trampoline<>(SB)
TEXT libc_fsetxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fsetxattr(SB)
-
GLOBL ·libc_fsetxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_fsetxattr_trampoline_addr(SB)/8, $libc_fsetxattr_trampoline<>(SB)
TEXT libc_removexattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_removexattr(SB)
-
GLOBL ·libc_removexattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_removexattr_trampoline_addr(SB)/8, $libc_removexattr_trampoline<>(SB)
TEXT libc_fremovexattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fremovexattr(SB)
-
GLOBL ·libc_fremovexattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_fremovexattr_trampoline_addr(SB)/8, $libc_fremovexattr_trampoline<>(SB)
TEXT libc_listxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_listxattr(SB)
-
GLOBL ·libc_listxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_listxattr_trampoline_addr(SB)/8, $libc_listxattr_trampoline<>(SB)
TEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_flistxattr(SB)
-
GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_utimensat(SB)
-
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fcntl(SB)
-
GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8
DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)
TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_kill(SB)
-
GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ioctl(SB)
-
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sysctl(SB)
-
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendfile(SB)
-
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmat(SB)
-
GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmctl(SB)
-
GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmdt(SB)
-
GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmget(SB)
-
GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_access(SB)
-
GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_adjtime(SB)
-
GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chdir(SB)
-
GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chflags(SB)
-
GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chmod(SB)
-
GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chown(SB)
-
GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chroot(SB)
-
GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_clock_gettime(SB)
-
GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8
DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB)
TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_close(SB)
-
GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
TEXT libc_clonefile_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_clonefile(SB)
-
GLOBL ·libc_clonefile_trampoline_addr(SB), RODATA, $8
DATA ·libc_clonefile_trampoline_addr(SB)/8, $libc_clonefile_trampoline<>(SB)
TEXT libc_clonefileat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_clonefileat(SB)
-
GLOBL ·libc_clonefileat_trampoline_addr(SB), RODATA, $8
DATA ·libc_clonefileat_trampoline_addr(SB)/8, $libc_clonefileat_trampoline<>(SB)
TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_dup(SB)
-
GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_dup2(SB)
-
GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
TEXT libc_exchangedata_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_exchangedata(SB)
-
GLOBL ·libc_exchangedata_trampoline_addr(SB), RODATA, $8
DATA ·libc_exchangedata_trampoline_addr(SB)/8, $libc_exchangedata_trampoline<>(SB)
TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_exit(SB)
-
GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_faccessat(SB)
-
GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchdir(SB)
-
GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchflags(SB)
-
GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchmod(SB)
-
GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchmodat(SB)
-
GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchown(SB)
-
GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchownat(SB)
-
GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
TEXT libc_fclonefileat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fclonefileat(SB)
-
GLOBL ·libc_fclonefileat_trampoline_addr(SB), RODATA, $8
DATA ·libc_fclonefileat_trampoline_addr(SB)/8, $libc_fclonefileat_trampoline<>(SB)
TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_flock(SB)
-
GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fpathconf(SB)
-
GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fsync(SB)
-
GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ftruncate(SB)
-
GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getcwd(SB)
-
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
TEXT libc_getdtablesize_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getdtablesize(SB)
-
GLOBL ·libc_getdtablesize_trampoline_addr(SB), RODATA, $8
DATA ·libc_getdtablesize_trampoline_addr(SB)/8, $libc_getdtablesize_trampoline<>(SB)
TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getegid(SB)
-
GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_geteuid(SB)
-
GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getgid(SB)
-
GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpgid(SB)
-
GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpgrp(SB)
-
GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpid(SB)
-
GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getppid(SB)
-
GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpriority(SB)
-
GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getrlimit(SB)
-
GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getrusage(SB)
-
GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getsid(SB)
-
GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_gettimeofday(SB)
-
GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getuid(SB)
-
GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_issetugid(SB)
-
GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_kqueue(SB)
-
GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_lchown(SB)
-
GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_link(SB)
-
GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_linkat(SB)
-
GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_listen(SB)
-
GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mkdir(SB)
-
GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mkdirat(SB)
-
GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mkfifo(SB)
-
GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mknod(SB)
-
GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
TEXT libc_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_open_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_open(SB)
-
GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_openat(SB)
-
GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pathconf(SB)
-
GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pread(SB)
-
GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pwrite(SB)
-
GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_read(SB)
-
GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_readlink(SB)
-
GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_readlinkat(SB)
-
GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_rename(SB)
-
GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_renameat(SB)
-
GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_revoke(SB)
-
GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_rmdir(SB)
-
GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_lseek(SB)
-
GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_select(SB)
-
GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
@@ -712,192 +595,160 @@ DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB
TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setegid(SB)
-
GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_seteuid(SB)
-
GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setgid(SB)
-
GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setlogin(SB)
-
GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setpgid(SB)
-
GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setpriority(SB)
-
GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
TEXT libc_setprivexec_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setprivexec(SB)
-
GLOBL ·libc_setprivexec_trampoline_addr(SB), RODATA, $8
DATA ·libc_setprivexec_trampoline_addr(SB)/8, $libc_setprivexec_trampoline<>(SB)
TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setregid(SB)
-
GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setreuid(SB)
-
GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setsid(SB)
-
GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_settimeofday(SB)
-
GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setuid(SB)
-
GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_symlink(SB)
-
GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_symlinkat(SB)
-
GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sync(SB)
-
GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_truncate(SB)
-
GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_umask(SB)
-
GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
TEXT libc_undelete_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_undelete(SB)
-
GLOBL ·libc_undelete_trampoline_addr(SB), RODATA, $8
DATA ·libc_undelete_trampoline_addr(SB)/8, $libc_undelete_trampoline<>(SB)
TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_unlink(SB)
-
GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_unlinkat(SB)
-
GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_unmount(SB)
-
GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_write(SB)
-
GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mmap(SB)
-
GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_munmap(SB)
-
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
TEXT libc_fstat64_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fstat64(SB)
-
GLOBL ·libc_fstat64_trampoline_addr(SB), RODATA, $8
DATA ·libc_fstat64_trampoline_addr(SB)/8, $libc_fstat64_trampoline<>(SB)
TEXT libc_fstatat64_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fstatat64(SB)
-
GLOBL ·libc_fstatat64_trampoline_addr(SB), RODATA, $8
DATA ·libc_fstatat64_trampoline_addr(SB)/8, $libc_fstatat64_trampoline<>(SB)
TEXT libc_fstatfs64_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fstatfs64(SB)
-
GLOBL ·libc_fstatfs64_trampoline_addr(SB), RODATA, $8
DATA ·libc_fstatfs64_trampoline_addr(SB)/8, $libc_fstatfs64_trampoline<>(SB)
TEXT libc_getfsstat64_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getfsstat64(SB)
-
GLOBL ·libc_getfsstat64_trampoline_addr(SB), RODATA, $8
DATA ·libc_getfsstat64_trampoline_addr(SB)/8, $libc_getfsstat64_trampoline<>(SB)
TEXT libc_lstat64_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_lstat64(SB)
-
GLOBL ·libc_lstat64_trampoline_addr(SB), RODATA, $8
DATA ·libc_lstat64_trampoline_addr(SB)/8, $libc_lstat64_trampoline<>(SB)
TEXT libc_ptrace_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ptrace(SB)
-
GLOBL ·libc_ptrace_trampoline_addr(SB), RODATA, $8
DATA ·libc_ptrace_trampoline_addr(SB)/8, $libc_ptrace_trampoline<>(SB)
TEXT libc_stat64_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_stat64(SB)
-
GLOBL ·libc_stat64_trampoline_addr(SB), RODATA, $8
DATA ·libc_stat64_trampoline_addr(SB)/8, $libc_stat64_trampoline<>(SB)
TEXT libc_statfs64_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_statfs64(SB)
-
GLOBL ·libc_statfs64_trampoline_addr(SB), RODATA, $8
DATA ·libc_statfs64_trampoline_addr(SB)/8, $libc_statfs64_trampoline<>(SB)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
index 51d6f3fb25..1b40b997b5 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build darwin && arm64
-// +build darwin,arm64
package unix
@@ -725,6 +724,12 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -733,10 +738,6 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
return
}
-var libc_ioctl_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_ioctl ioctl "/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) {
@@ -2410,28 +2411,6 @@ var libc_munmap_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fstat(fd int, stat *Stat_t) (err error) {
_, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
@@ -2521,14 +2500,6 @@ func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {
return
}
-func ptrace1Ptr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {
- _, _, e1 := syscall_syscall6(libc_ptrace_trampoline_addr, uintptr(request), uintptr(pid), addr, uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
var libc_ptrace_trampoline_addr uintptr
//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
index c3b82c0379..08362c1ab7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
@@ -5,703 +5,586 @@
TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fdopendir(SB)
-
GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getgroups(SB)
-
GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setgroups(SB)
-
GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_wait4(SB)
-
GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_accept(SB)
-
GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_bind(SB)
-
GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_connect(SB)
-
GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_socket(SB)
-
GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getsockopt(SB)
-
GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setsockopt(SB)
-
GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpeername(SB)
-
GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getsockname(SB)
-
GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shutdown(SB)
-
GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_socketpair(SB)
-
GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_recvfrom(SB)
-
GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendto(SB)
-
GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_recvmsg(SB)
-
GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendmsg(SB)
-
GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_kevent(SB)
-
GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_utimes(SB)
-
GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_futimes(SB)
-
GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_poll(SB)
-
GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_madvise(SB)
-
GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mlock(SB)
-
GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mlockall(SB)
-
GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mprotect(SB)
-
GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_msync(SB)
-
GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_munlock(SB)
-
GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_munlockall(SB)
-
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_closedir(SB)
-
GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_readdir_r(SB)
-
GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pipe(SB)
-
GLOBL ·libc_pipe_trampoline_addr(SB), RODATA, $8
DATA ·libc_pipe_trampoline_addr(SB)/8, $libc_pipe_trampoline<>(SB)
TEXT libc_getxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getxattr(SB)
-
GLOBL ·libc_getxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_getxattr_trampoline_addr(SB)/8, $libc_getxattr_trampoline<>(SB)
TEXT libc_fgetxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fgetxattr(SB)
-
GLOBL ·libc_fgetxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_fgetxattr_trampoline_addr(SB)/8, $libc_fgetxattr_trampoline<>(SB)
TEXT libc_setxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setxattr(SB)
-
GLOBL ·libc_setxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_setxattr_trampoline_addr(SB)/8, $libc_setxattr_trampoline<>(SB)
TEXT libc_fsetxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fsetxattr(SB)
-
GLOBL ·libc_fsetxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_fsetxattr_trampoline_addr(SB)/8, $libc_fsetxattr_trampoline<>(SB)
TEXT libc_removexattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_removexattr(SB)
-
GLOBL ·libc_removexattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_removexattr_trampoline_addr(SB)/8, $libc_removexattr_trampoline<>(SB)
TEXT libc_fremovexattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fremovexattr(SB)
-
GLOBL ·libc_fremovexattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_fremovexattr_trampoline_addr(SB)/8, $libc_fremovexattr_trampoline<>(SB)
TEXT libc_listxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_listxattr(SB)
-
GLOBL ·libc_listxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_listxattr_trampoline_addr(SB)/8, $libc_listxattr_trampoline<>(SB)
TEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_flistxattr(SB)
-
GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_utimensat(SB)
-
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fcntl(SB)
-
GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8
DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)
TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_kill(SB)
-
GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ioctl(SB)
-
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sysctl(SB)
-
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendfile(SB)
-
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmat(SB)
-
GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmctl(SB)
-
GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmdt(SB)
-
GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_shmget(SB)
-
GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8
DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_access(SB)
-
GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_adjtime(SB)
-
GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chdir(SB)
-
GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chflags(SB)
-
GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chmod(SB)
-
GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chown(SB)
-
GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_chroot(SB)
-
GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_clock_gettime(SB)
-
GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8
DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB)
TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_close(SB)
-
GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
TEXT libc_clonefile_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_clonefile(SB)
-
GLOBL ·libc_clonefile_trampoline_addr(SB), RODATA, $8
DATA ·libc_clonefile_trampoline_addr(SB)/8, $libc_clonefile_trampoline<>(SB)
TEXT libc_clonefileat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_clonefileat(SB)
-
GLOBL ·libc_clonefileat_trampoline_addr(SB), RODATA, $8
DATA ·libc_clonefileat_trampoline_addr(SB)/8, $libc_clonefileat_trampoline<>(SB)
TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_dup(SB)
-
GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_dup2(SB)
-
GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
TEXT libc_exchangedata_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_exchangedata(SB)
-
GLOBL ·libc_exchangedata_trampoline_addr(SB), RODATA, $8
DATA ·libc_exchangedata_trampoline_addr(SB)/8, $libc_exchangedata_trampoline<>(SB)
TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_exit(SB)
-
GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_faccessat(SB)
-
GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchdir(SB)
-
GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchflags(SB)
-
GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchmod(SB)
-
GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchmodat(SB)
-
GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchown(SB)
-
GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fchownat(SB)
-
GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
TEXT libc_fclonefileat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fclonefileat(SB)
-
GLOBL ·libc_fclonefileat_trampoline_addr(SB), RODATA, $8
DATA ·libc_fclonefileat_trampoline_addr(SB)/8, $libc_fclonefileat_trampoline<>(SB)
TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_flock(SB)
-
GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fpathconf(SB)
-
GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fsync(SB)
-
GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ftruncate(SB)
-
GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getcwd(SB)
-
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
TEXT libc_getdtablesize_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getdtablesize(SB)
-
GLOBL ·libc_getdtablesize_trampoline_addr(SB), RODATA, $8
DATA ·libc_getdtablesize_trampoline_addr(SB)/8, $libc_getdtablesize_trampoline<>(SB)
TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getegid(SB)
-
GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_geteuid(SB)
-
GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getgid(SB)
-
GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpgid(SB)
-
GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpgrp(SB)
-
GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpid(SB)
-
GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getppid(SB)
-
GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getpriority(SB)
-
GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getrlimit(SB)
-
GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getrusage(SB)
-
GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getsid(SB)
-
GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_gettimeofday(SB)
-
GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getuid(SB)
-
GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_issetugid(SB)
-
GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_kqueue(SB)
-
GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_lchown(SB)
-
GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_link(SB)
-
GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_linkat(SB)
-
GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_listen(SB)
-
GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mkdir(SB)
-
GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mkdirat(SB)
-
GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mkfifo(SB)
-
GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mknod(SB)
-
GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
TEXT libc_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_open_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_open(SB)
-
GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_openat(SB)
-
GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pathconf(SB)
-
GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pread(SB)
-
GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pwrite(SB)
-
GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_read(SB)
-
GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_readlink(SB)
-
GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_readlinkat(SB)
-
GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_rename(SB)
-
GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_renameat(SB)
-
GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_revoke(SB)
-
GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_rmdir(SB)
-
GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_lseek(SB)
-
GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_select(SB)
-
GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
@@ -712,192 +595,160 @@ DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB
TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setegid(SB)
-
GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_seteuid(SB)
-
GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setgid(SB)
-
GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setlogin(SB)
-
GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setpgid(SB)
-
GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setpriority(SB)
-
GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
TEXT libc_setprivexec_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setprivexec(SB)
-
GLOBL ·libc_setprivexec_trampoline_addr(SB), RODATA, $8
DATA ·libc_setprivexec_trampoline_addr(SB)/8, $libc_setprivexec_trampoline<>(SB)
TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setregid(SB)
-
GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setreuid(SB)
-
GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setsid(SB)
-
GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_settimeofday(SB)
-
GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setuid(SB)
-
GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_symlink(SB)
-
GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_symlinkat(SB)
-
GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sync(SB)
-
GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_truncate(SB)
-
GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_umask(SB)
-
GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
TEXT libc_undelete_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_undelete(SB)
-
GLOBL ·libc_undelete_trampoline_addr(SB), RODATA, $8
DATA ·libc_undelete_trampoline_addr(SB)/8, $libc_undelete_trampoline<>(SB)
TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_unlink(SB)
-
GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_unlinkat(SB)
-
GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_unmount(SB)
-
GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_write(SB)
-
GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_mmap(SB)
-
GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_munmap(SB)
-
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fstat(SB)
-
GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8
DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)
TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fstatat(SB)
-
GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8
DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)
TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fstatfs(SB)
-
GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8
DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)
TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getfsstat(SB)
-
GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8
DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB)
TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_lstat(SB)
-
GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8
DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)
TEXT libc_ptrace_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ptrace(SB)
-
GLOBL ·libc_ptrace_trampoline_addr(SB), RODATA, $8
DATA ·libc_ptrace_trampoline_addr(SB)/8, $libc_ptrace_trampoline<>(SB)
TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_stat(SB)
-
GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8
DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)
TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_statfs(SB)
-
GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8
DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
index 0eabac7ade..aad65fc793 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build dragonfly && amd64
-// +build dragonfly,amd64
package unix
@@ -1642,28 +1641,6 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
nfd = int(r0)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
index ee313eb007..c0096391af 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build freebsd && 386
-// +build freebsd,386
package unix
@@ -1862,28 +1861,6 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
nfd = int(r0)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
index 4c986e448e..7664df7496 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build freebsd && amd64
-// +build freebsd,amd64
package unix
@@ -1862,28 +1861,6 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
nfd = int(r0)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
index 555216944a..ae099182c9 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build freebsd && arm
-// +build freebsd,arm
package unix
@@ -1862,28 +1861,6 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
nfd = int(r0)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
index 67a226fbf5..11fd5d45bb 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build freebsd && arm64
-// +build freebsd,arm64
package unix
@@ -1862,28 +1861,6 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
nfd = int(r0)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go
index f0b9ddaaa2..c3d2d65307 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build freebsd && riscv64
-// +build freebsd,riscv64
package unix
@@ -1862,28 +1861,6 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
nfd = int(r0)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
index b57c7050d7..c698cbc01a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build illumos && amd64
-// +build illumos,amd64
package unix
@@ -40,7 +39,7 @@ func readv(fd int, iovs []Iovec) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procreadv)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -55,7 +54,7 @@ func preadv(fd int, iovs []Iovec, off int64) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpreadv)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), uintptr(off), 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -70,7 +69,7 @@ func writev(fd int, iovs []Iovec) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwritev)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -85,7 +84,7 @@ func pwritev(fd int, iovs []Iovec, off int64) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpwritev)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), uintptr(off), 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -96,7 +95,7 @@ func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int,
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept4)), 4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index da63d9d782..87d8612a1d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -1,7 +1,6 @@
// Code generated by mkmerge; DO NOT EDIT.
//go:build linux
-// +build linux
package unix
@@ -38,6 +37,21 @@ func fchmodat(dirfd int, path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func fchmodat2(dirfd int, path string, mode uint32, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_FCHMODAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -892,6 +906,16 @@ func Fspick(dirfd int, pathName string, flags int) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func fsconfig(fd int, cmd uint, key *byte, value *byte, aux int) (err error) {
+ _, _, e1 := Syscall6(SYS_FSCONFIG, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(value)), uintptr(aux), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getdents(fd int, buf []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
@@ -1356,7 +1380,7 @@ func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+func pselect6(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *sigset_argpack) (n int, err error) {
r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
n = int(r0)
if e1 != 0 {
@@ -1734,28 +1758,6 @@ func exitThread(code int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func readv(fd int, iovs []Iovec) (n int, err error) {
var _p0 unsafe.Pointer
if len(iovs) > 0 {
@@ -1868,6 +1870,17 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func mremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error) {
+ r0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldaddr), uintptr(oldlength), uintptr(newlength), uintptr(flags), uintptr(newaddr), 0)
+ xaddr = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Madvise(b []byte, advice int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
@@ -2172,3 +2185,47 @@ func rtSigprocmask(how int, set *Sigset_t, oldset *Sigset_t, sigsetsize uintptr)
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
+ RawSyscallNoError(SYS_GETRESUID, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
+ RawSyscallNoError(SYS_GETRESGID, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func schedSetattr(pid int, attr *SchedAttr, flags uint) (err error) {
+ _, _, e1 := Syscall(SYS_SCHED_SETATTR, uintptr(pid), uintptr(unsafe.Pointer(attr)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func schedGetattr(pid int, attr *SchedAttr, size uint, flags uint) (err error) {
+ _, _, e1 := Syscall6(SYS_SCHED_GETATTR, uintptr(pid), uintptr(unsafe.Pointer(attr)), uintptr(size), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error) {
+ _, _, e1 := Syscall6(SYS_CACHESTAT, uintptr(fd), uintptr(unsafe.Pointer(crange)), uintptr(unsafe.Pointer(cstat)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
index 07b549cc25..4def3e9fcb 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && 386
-// +build linux,386
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
index 5f481bf83f..fef2bc8ba9 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && amd64
-// +build linux,amd64
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
index 824cd52c7f..a9fd76a884 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && arm
-// +build linux,arm
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
index e77aecfe98..4600650280 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && arm64
-// +build linux,arm64
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go
index 806ffd1e12..c8987d2646 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && loong64
-// +build linux,loong64
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
index 961a3afb7b..921f430611 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && mips
-// +build linux,mips
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
index ed05005e91..44f067829c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && mips64
-// +build linux,mips64
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
index d365b718f3..e7fa0abf0d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && mips64le
-// +build linux,mips64le
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
index c3f1b8bbde..8c5125675e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && mipsle
-// +build linux,mipsle
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
index a6574cf98b..7392fd45e4 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && ppc
-// +build linux,ppc
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
index f40990264f..41180434e6 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && ppc64
-// +build linux,ppc64
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
index 9dfcc29974..40c6ce7ae5 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && ppc64le
-// +build linux,ppc64le
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
index 0b29239583..2cfe34adb1 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && riscv64
-// +build linux,riscv64
package unix
@@ -531,3 +530,19 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func riscvHWProbe(pairs []RISCVHWProbePairs, cpuCount uintptr, cpus *CPUSet, flags uint) (err error) {
+ var _p0 unsafe.Pointer
+ if len(pairs) > 0 {
+ _p0 = unsafe.Pointer(&pairs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_RISCV_HWPROBE, uintptr(_p0), uintptr(len(pairs)), uintptr(cpuCount), uintptr(unsafe.Pointer(cpus)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
index 6cde32237d..61e6f07097 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && s390x
-// +build linux,s390x
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
index 5253d65bf1..834b842042 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && sparc64
-// +build linux,sparc64
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
index cdb2af5ae0..e91ebc14a1 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build netbsd && 386
-// +build netbsd,386
package unix
@@ -1824,20 +1823,13 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
+ _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1846,13 +1838,9 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+func mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) {
+ r0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0)
+ xaddr = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
index 9d25f76b0b..be28babbcd 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build netbsd && amd64
-// +build netbsd,amd64
package unix
@@ -1824,20 +1823,13 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
+ _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1846,13 +1838,9 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+func mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) {
+ r0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0)
+ xaddr = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
index d3f8035169..fb587e8261 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build netbsd && arm
-// +build netbsd,arm
package unix
@@ -1824,20 +1823,13 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
+ _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1846,13 +1838,9 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+func mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) {
+ r0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0)
+ xaddr = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
index 887188a529..d576438bb0 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build netbsd && arm64
-// +build netbsd,arm64
package unix
@@ -1824,20 +1823,13 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
+ _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1846,13 +1838,9 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+func mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) {
+ r0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0)
+ xaddr = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
index 6699a783e1..9dc42410b7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build openbsd && 386
-// +build openbsd,386
package unix
@@ -519,6 +518,28 @@ var libc_getcwd_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
+ syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
+ return
+}
+
+var libc_getresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getresuid getresuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
+ syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
+ return
+}
+
+var libc_getresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getresgid getresgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -527,6 +548,12 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -535,10 +562,6 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
return
}
-var libc_ioctl_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
-
// 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) {
@@ -561,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func fcntl(fd int, cmd int, arg int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fcntl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
@@ -2189,8 +2238,8 @@ var libc_munmap_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2198,16 +2247,9 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
return
}
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+var libc_getfsstat_trampoline_addr uintptr
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
+//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2227,3 +2269,31 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
var libc_utimensat_trampoline_addr uintptr
//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pledge(promises *byte, execpromises *byte) (err error) {
+ _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pledge_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pledge pledge "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func unveil(path *byte, flags *byte) (err error) {
+ _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unveil_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unveil unveil "libc.so"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
index 04f0de34b2..41b5617316 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
@@ -158,6 +158,16 @@ TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $4
DATA ·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB)
+TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getresuid(SB)
+GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getresuid_trampoline_addr(SB)/4, $libc_getresuid_trampoline<>(SB)
+
+TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getresgid(SB)
+GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getresgid_trampoline_addr(SB)/4, $libc_getresgid_trampoline<>(SB)
+
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ioctl(SB)
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $4
@@ -168,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4
DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB)
+TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fcntl(SB)
+GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fcntl_trampoline_addr(SB)/4, $libc_fcntl_trampoline<>(SB)
+
TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ppoll(SB)
GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4
@@ -658,7 +673,22 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4
DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB)
+TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getfsstat(SB)
+GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getfsstat_trampoline_addr(SB)/4, $libc_getfsstat_trampoline<>(SB)
+
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_utimensat(SB)
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4
DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB)
+
+TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pledge(SB)
+GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pledge_trampoline_addr(SB)/4, $libc_pledge_trampoline<>(SB)
+
+TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unveil(SB)
+GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $4
+DATA ·libc_unveil_trampoline_addr(SB)/4, $libc_unveil_trampoline<>(SB)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
index 1e775fe057..0d3a0751cd 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build openbsd && amd64
-// +build openbsd,amd64
package unix
@@ -519,6 +518,28 @@ var libc_getcwd_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
+ syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
+ return
+}
+
+var libc_getresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getresuid getresuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
+ syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
+ return
+}
+
+var libc_getresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getresgid getresgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -527,6 +548,12 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -535,10 +562,6 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
return
}
-var libc_ioctl_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
-
// 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) {
@@ -561,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func fcntl(fd int, cmd int, arg int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fcntl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
@@ -2189,8 +2238,8 @@ var libc_munmap_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2198,16 +2247,9 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
return
}
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+var libc_getfsstat_trampoline_addr uintptr
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
+//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2227,3 +2269,31 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
var libc_utimensat_trampoline_addr uintptr
//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pledge(promises *byte, execpromises *byte) (err error) {
+ _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pledge_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pledge pledge "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func unveil(path *byte, flags *byte) (err error) {
+ _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unveil_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unveil unveil "libc.so"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
index 27b6f4df74..4019a656f6 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
@@ -158,6 +158,16 @@ TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
+TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getresuid(SB)
+GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB)
+
+TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getresgid(SB)
+GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB)
+
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ioctl(SB)
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
@@ -168,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fcntl(SB)
+GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)
+
TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ppoll(SB)
GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
@@ -658,7 +673,22 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
+TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getfsstat(SB)
+GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB)
+
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_utimensat(SB)
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
+
+TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pledge(SB)
+GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB)
+
+TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unveil(SB)
+GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
index 7f6427899a..c39f7776db 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build openbsd && arm
-// +build openbsd,arm
package unix
@@ -519,6 +518,28 @@ var libc_getcwd_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
+ syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
+ return
+}
+
+var libc_getresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getresuid getresuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
+ syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
+ return
+}
+
+var libc_getresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getresgid getresgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -527,6 +548,12 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -535,10 +562,6 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
return
}
-var libc_ioctl_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
-
// 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) {
@@ -561,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func fcntl(fd int, cmd int, arg int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fcntl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
@@ -2189,8 +2238,8 @@ var libc_munmap_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2198,16 +2247,9 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
return
}
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+var libc_getfsstat_trampoline_addr uintptr
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
+//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2227,3 +2269,31 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
var libc_utimensat_trampoline_addr uintptr
//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pledge(promises *byte, execpromises *byte) (err error) {
+ _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pledge_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pledge pledge "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func unveil(path *byte, flags *byte) (err error) {
+ _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unveil_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unveil unveil "libc.so"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
index b797045fd2..ac4af24f90 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
@@ -158,6 +158,16 @@ TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $4
DATA ·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB)
+TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getresuid(SB)
+GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getresuid_trampoline_addr(SB)/4, $libc_getresuid_trampoline<>(SB)
+
+TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getresgid(SB)
+GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getresgid_trampoline_addr(SB)/4, $libc_getresgid_trampoline<>(SB)
+
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ioctl(SB)
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $4
@@ -168,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4
DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB)
+TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fcntl(SB)
+GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fcntl_trampoline_addr(SB)/4, $libc_fcntl_trampoline<>(SB)
+
TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ppoll(SB)
GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4
@@ -658,7 +673,22 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4
DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB)
+TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getfsstat(SB)
+GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getfsstat_trampoline_addr(SB)/4, $libc_getfsstat_trampoline<>(SB)
+
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_utimensat(SB)
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4
DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB)
+
+TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pledge(SB)
+GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pledge_trampoline_addr(SB)/4, $libc_pledge_trampoline<>(SB)
+
+TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unveil(SB)
+GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $4
+DATA ·libc_unveil_trampoline_addr(SB)/4, $libc_unveil_trampoline<>(SB)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
index 756ef7b173..57571d072f 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build openbsd && arm64
-// +build openbsd,arm64
package unix
@@ -519,6 +518,28 @@ var libc_getcwd_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
+ syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
+ return
+}
+
+var libc_getresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getresuid getresuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
+ syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
+ return
+}
+
+var libc_getresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getresgid getresgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -527,6 +548,12 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -535,10 +562,6 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
return
}
-var libc_ioctl_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
-
// 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) {
@@ -561,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func fcntl(fd int, cmd int, arg int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fcntl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
@@ -2189,8 +2238,8 @@ var libc_munmap_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2198,16 +2247,9 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
return
}
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+var libc_getfsstat_trampoline_addr uintptr
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
+//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2227,3 +2269,31 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
var libc_utimensat_trampoline_addr uintptr
//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pledge(promises *byte, execpromises *byte) (err error) {
+ _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pledge_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pledge pledge "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func unveil(path *byte, flags *byte) (err error) {
+ _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unveil_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unveil unveil "libc.so"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
index a871266221..f77d532121 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
@@ -158,6 +158,16 @@ TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
+TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getresuid(SB)
+GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB)
+
+TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getresgid(SB)
+GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB)
+
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ioctl(SB)
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
@@ -168,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fcntl(SB)
+GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)
+
TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ppoll(SB)
GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
@@ -658,7 +673,22 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
+TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getfsstat(SB)
+GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB)
+
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_utimensat(SB)
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
+
+TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pledge(SB)
+GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB)
+
+TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unveil(SB)
+GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
index 7bc2e24eb9..e62963e67e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build openbsd && mips64
-// +build openbsd,mips64
package unix
@@ -519,6 +518,28 @@ var libc_getcwd_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
+ syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
+ return
+}
+
+var libc_getresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getresuid getresuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
+ syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
+ return
+}
+
+var libc_getresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getresgid getresgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -527,6 +548,12 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -535,10 +562,6 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
return
}
-var libc_ioctl_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
-
// 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) {
@@ -561,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func fcntl(fd int, cmd int, arg int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fcntl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
@@ -2189,8 +2238,8 @@ var libc_munmap_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2198,16 +2247,9 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
return
}
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+var libc_getfsstat_trampoline_addr uintptr
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
+//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2227,3 +2269,31 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
var libc_utimensat_trampoline_addr uintptr
//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pledge(promises *byte, execpromises *byte) (err error) {
+ _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pledge_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pledge pledge "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func unveil(path *byte, flags *byte) (err error) {
+ _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unveil_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unveil unveil "libc.so"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
index 05d4bffd79..fae140b62c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
@@ -158,6 +158,16 @@ TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
+TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getresuid(SB)
+GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB)
+
+TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getresgid(SB)
+GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB)
+
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ioctl(SB)
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
@@ -168,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fcntl(SB)
+GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)
+
TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ppoll(SB)
GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
@@ -658,7 +673,22 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
+TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getfsstat(SB)
+GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB)
+
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_utimensat(SB)
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
+
+TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pledge(SB)
+GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB)
+
+TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unveil(SB)
+GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
index 739be6217a..00831354c8 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build openbsd && ppc64
-// +build openbsd,ppc64
package unix
@@ -519,6 +518,28 @@ var libc_getcwd_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
+ syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
+ return
+}
+
+var libc_getresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getresuid getresuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
+ syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
+ return
+}
+
+var libc_getresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getresgid getresgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -527,6 +548,12 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -535,10 +562,6 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
return
}
-var libc_ioctl_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
-
// 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) {
@@ -561,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func fcntl(fd int, cmd int, arg int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fcntl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
@@ -2189,8 +2238,8 @@ var libc_munmap_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2198,16 +2247,9 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
return
}
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+var libc_getfsstat_trampoline_addr uintptr
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
+//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2227,3 +2269,31 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
var libc_utimensat_trampoline_addr uintptr
//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pledge(promises *byte, execpromises *byte) (err error) {
+ _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pledge_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pledge pledge "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func unveil(path *byte, flags *byte) (err error) {
+ _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unveil_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unveil unveil "libc.so"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
index 74a25f8d64..9d1e0ff06d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
@@ -189,6 +189,18 @@ TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
+TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getresuid(SB)
+ RET
+GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB)
+
+TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getresgid(SB)
+ RET
+GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB)
+
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
CALL libc_ioctl(SB)
RET
@@ -201,6 +213,12 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fcntl(SB)
+ RET
+GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)
+
TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
CALL libc_ppoll(SB)
RET
@@ -789,8 +807,26 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
+TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getfsstat(SB)
+ RET
+GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB)
+
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
CALL libc_utimensat(SB)
RET
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
+
+TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_pledge(SB)
+ RET
+GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB)
+
+TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_unveil(SB)
+ RET
+GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
index 7d95a19780..79029ed584 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build openbsd && riscv64
-// +build openbsd,riscv64
package unix
@@ -519,6 +518,28 @@ var libc_getcwd_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
+ syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
+ return
+}
+
+var libc_getresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getresuid getresuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
+ syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
+ return
+}
+
+var libc_getresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getresgid getresgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -527,6 +548,12 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
@@ -535,10 +562,6 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
return
}
-var libc_ioctl_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
-
// 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) {
@@ -561,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func fcntl(fd int, cmd int, arg int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fcntl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
@@ -2189,8 +2238,8 @@ var libc_munmap_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2198,16 +2247,9 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
return
}
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+var libc_getfsstat_trampoline_addr uintptr
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
+//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2227,3 +2269,31 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
var libc_utimensat_trampoline_addr uintptr
//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pledge(promises *byte, execpromises *byte) (err error) {
+ _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pledge_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pledge pledge "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func unveil(path *byte, flags *byte) (err error) {
+ _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unveil_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unveil unveil "libc.so"
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
index 990be24574..da115f9a4b 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
@@ -158,6 +158,16 @@ TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
+TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getresuid(SB)
+GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB)
+
+TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getresgid(SB)
+GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB)
+
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ioctl(SB)
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
@@ -168,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fcntl(SB)
+GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)
+
TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_ppoll(SB)
GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
@@ -658,7 +673,22 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
+TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getfsstat(SB)
+GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB)
+
TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_utimensat(SB)
GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
+
+TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pledge(SB)
+GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB)
+
+TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unveil(SB)
+GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
index 609d1c598a..829b87feb8 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build solaris && amd64
-// +build solaris,amd64
package unix
@@ -436,7 +435,7 @@ func pipe(p *[2]_C_int) (n int, err error) {
r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe)), 1, uintptr(unsafe.Pointer(p)), 0, 0, 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -446,7 +445,7 @@ func pipe(p *[2]_C_int) (n int, err error) {
func pipe2(p *[2]_C_int, flags int) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe2)), 2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -456,7 +455,7 @@ func pipe2(p *[2]_C_int, flags int) (err error) {
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -471,7 +470,7 @@ func Getcwd(buf []byte) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetcwd)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -482,7 +481,7 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -492,7 +491,7 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
func setgroups(ngid int, gid *_Gid_t) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procsetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -503,7 +502,7 @@ func wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32,
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwait4)), 4, uintptr(pid), uintptr(unsafe.Pointer(statusp)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int32(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -518,7 +517,7 @@ func gethostname(buf []byte) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -533,7 +532,7 @@ func utimes(path string, times *[2]Timeval) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimes)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -548,7 +547,7 @@ func utimensat(fd int, path string, times *[2]Timespec, flag int) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimensat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -559,7 +558,7 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)
val = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -569,7 +568,7 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
func futimesat(fildes int, path *byte, times *[2]Timeval) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfutimesat)), 3, uintptr(fildes), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -580,7 +579,7 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept)), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
fd = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -591,7 +590,7 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_recvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -602,7 +601,7 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -612,7 +611,7 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
func acct(path *byte) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procacct)), 1, uintptr(unsafe.Pointer(path)), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -647,7 +646,7 @@ func ioctlRet(fd int, req int, arg uintptr) (ret int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
ret = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -658,7 +657,7 @@ func ioctlPtrRet(fd int, req int, arg unsafe.Pointer) (ret int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
ret = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -669,7 +668,7 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpoll)), 3, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout), 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -684,7 +683,7 @@ func Access(path string, mode uint32) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAccess)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -694,7 +693,7 @@ func Access(path string, mode uint32) (err error) {
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAdjtime)), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -709,7 +708,7 @@ func Chdir(path string) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -724,7 +723,7 @@ func Chmod(path string, mode uint32) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChmod)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -739,7 +738,7 @@ func Chown(path string, uid int, gid int) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -754,7 +753,7 @@ func Chroot(path string) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChroot)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -764,7 +763,7 @@ func Chroot(path string) (err error) {
func ClockGettime(clockid int32, time *Timespec) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClockGettime)), 2, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -774,7 +773,7 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
func Close(fd int) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClose)), 1, uintptr(fd), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -790,7 +789,7 @@ func Creat(path string, mode uint32) (fd int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procCreat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -801,7 +800,7 @@ func Dup(fd int) (nfd int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup)), 1, uintptr(fd), 0, 0, 0, 0, 0)
nfd = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -811,7 +810,7 @@ func Dup(fd int) (nfd int, err error) {
func Dup2(oldfd int, newfd int) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup2)), 2, uintptr(oldfd), uintptr(newfd), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -833,7 +832,7 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFaccessat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -843,7 +842,7 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
func Fchdir(fd int) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -853,7 +852,7 @@ func Fchdir(fd int) (err error) {
func Fchmod(fd int, mode uint32) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -868,7 +867,7 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -878,7 +877,7 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -893,7 +892,7 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchownat)), 5, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -903,7 +902,7 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
func Fdatasync(fd int) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFdatasync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -913,7 +912,7 @@ func Fdatasync(fd int) (err error) {
func Flock(fd int, how int) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFlock)), 2, uintptr(fd), uintptr(how), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -924,7 +923,7 @@ func Fpathconf(fd int, name int) (val int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0)
val = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -934,7 +933,7 @@ func Fpathconf(fd int, name int) (val int, err error) {
func Fstat(fd int, stat *Stat_t) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstat)), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -949,7 +948,7 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -959,7 +958,7 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
func Fstatvfs(fd int, vfsstat *Statvfs_t) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatvfs)), 2, uintptr(fd), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -974,7 +973,7 @@ func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetdents)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1001,7 +1000,7 @@ func Getpgid(pid int) (pgid int, err error) {
r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
pgid = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1012,7 +1011,7 @@ func Getpgrp() (pgid int, err error) {
r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgrp)), 0, 0, 0, 0, 0, 0, 0)
pgid = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1047,7 +1046,7 @@ func Getpriority(which int, who int) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1057,7 +1056,7 @@ func Getpriority(which int, who int) (n int, err error) {
func Getrlimit(which int, lim *Rlimit) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1067,7 +1066,7 @@ func Getrlimit(which int, lim *Rlimit) (err error) {
func Getrusage(who int, rusage *Rusage) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrusage)), 2, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1078,7 +1077,7 @@ func Getsid(pid int) (sid int, err error) {
r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetsid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
sid = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1088,7 +1087,7 @@ func Getsid(pid int) (sid int, err error) {
func Gettimeofday(tv *Timeval) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1106,7 +1105,7 @@ func Getuid() (uid int) {
func Kill(pid int, signum syscall.Signal) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procKill)), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1121,7 +1120,7 @@ func Lchown(path string, uid int, gid int) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLchown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1141,7 +1140,7 @@ func Link(path string, link string) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1151,7 +1150,7 @@ func Link(path string, link string) (err error) {
func Listen(s int, backlog int) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_llisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1166,7 +1165,7 @@ func Lstat(path string, stat *Stat_t) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLstat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1180,7 +1179,7 @@ func Madvise(b []byte, advice int) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMadvise)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(advice), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1195,7 +1194,7 @@ func Mkdir(path string, mode uint32) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdir)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1210,7 +1209,7 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdirat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1225,7 +1224,7 @@ func Mkfifo(path string, mode uint32) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifo)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1240,7 +1239,7 @@ func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifoat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1255,7 +1254,7 @@ func Mknod(path string, mode uint32, dev int) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknod)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1270,7 +1269,7 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1284,7 +1283,7 @@ func Mlock(b []byte) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1294,7 +1293,7 @@ func Mlock(b []byte) (err error) {
func Mlockall(flags int) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlockall)), 1, uintptr(flags), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1308,7 +1307,7 @@ func Mprotect(b []byte, prot int) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMprotect)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(prot), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1322,7 +1321,7 @@ func Msync(b []byte, flags int) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMsync)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(flags), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1336,7 +1335,7 @@ func Munlock(b []byte) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1346,7 +1345,7 @@ func Munlock(b []byte) (err error) {
func Munlockall() (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlockall)), 0, 0, 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1356,7 +1355,7 @@ func Munlockall() (err error) {
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procNanosleep)), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1372,7 +1371,7 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpen)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0)
fd = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1388,7 +1387,7 @@ func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpenat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
fd = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1404,7 +1403,7 @@ func Pathconf(path string, name int) (val int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPathconf)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0)
val = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1414,7 +1413,7 @@ func Pathconf(path string, name int) (val int, err error) {
func Pause() (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPause)), 0, 0, 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1429,7 +1428,7 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1444,7 +1443,7 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1459,7 +1458,7 @@ func read(fd int, p []byte) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1479,7 +1478,7 @@ func Readlink(path string, buf []byte) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procReadlink)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1499,7 +1498,7 @@ func Rename(from string, to string) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRename)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1519,7 +1518,7 @@ func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err e
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRenameat)), 4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1534,7 +1533,7 @@ func Rmdir(path string) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRmdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1545,7 +1544,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proclseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)
newoffset = int64(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1556,7 +1555,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSelect)), 5, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1566,7 +1565,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
func Setegid(egid int) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetegid)), 1, uintptr(egid), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1576,7 +1575,7 @@ func Setegid(egid int) (err error) {
func Seteuid(euid int) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSeteuid)), 1, uintptr(euid), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1586,7 +1585,7 @@ func Seteuid(euid int) (err error) {
func Setgid(gid int) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetgid)), 1, uintptr(gid), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1600,7 +1599,7 @@ func Sethostname(p []byte) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1610,7 +1609,7 @@ func Sethostname(p []byte) (err error) {
func Setpgid(pid int, pgid int) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1620,7 +1619,7 @@ func Setpgid(pid int, pgid int) (err error) {
func Setpriority(which int, who int, prio int) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSetpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1630,7 +1629,7 @@ func Setpriority(which int, who int, prio int) (err error) {
func Setregid(rgid int, egid int) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1640,7 +1639,7 @@ func Setregid(rgid int, egid int) (err error) {
func Setreuid(ruid int, euid int) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1651,7 +1650,7 @@ func Setsid() (pid int, err error) {
r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 0, 0, 0)
pid = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1661,7 +1660,7 @@ func Setsid() (pid int, err error) {
func Setuid(uid int) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetuid)), 1, uintptr(uid), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1671,7 +1670,7 @@ func Setuid(uid int) (err error) {
func Shutdown(s int, how int) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procshutdown)), 2, uintptr(s), uintptr(how), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1686,7 +1685,7 @@ func Stat(path string, stat *Stat_t) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1701,7 +1700,7 @@ func Statvfs(path string, vfsstat *Statvfs_t) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStatvfs)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1721,7 +1720,7 @@ func Symlink(path string, link string) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSymlink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1731,7 +1730,7 @@ func Symlink(path string, link string) (err error) {
func Sync() (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSync)), 0, 0, 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1742,7 +1741,7 @@ func Sysconf(which int) (n int64, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSysconf)), 1, uintptr(which), 0, 0, 0, 0, 0)
n = int64(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1753,7 +1752,7 @@ func Times(tms *Tms) (ticks uintptr, err error) {
r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procTimes)), 1, uintptr(unsafe.Pointer(tms)), 0, 0, 0, 0, 0)
ticks = uintptr(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1768,7 +1767,7 @@ func Truncate(path string, length int64) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procTruncate)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1778,7 +1777,7 @@ func Truncate(path string, length int64) (err error) {
func Fsync(fd int) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1788,7 +1787,7 @@ func Fsync(fd int) (err error) {
func Ftruncate(fd int, length int64) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFtruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1806,7 +1805,7 @@ func Umask(mask int) (oldmask int) {
func Uname(buf *Utsname) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procUname)), 1, uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1821,7 +1820,7 @@ func Unmount(target string, flags int) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procumount)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1836,7 +1835,7 @@ func Unlink(path string) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlink)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1851,7 +1850,7 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlinkat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1861,7 +1860,7 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
func Ustat(dev int, ubuf *Ustat_t) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUstat)), 2, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1876,7 +1875,7 @@ func Utime(path string, buf *Utimbuf) (err error) {
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUtime)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1886,7 +1885,7 @@ func Utime(path string, buf *Utimbuf) (err error) {
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_bind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1896,7 +1895,7 @@ func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_connect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1907,7 +1906,7 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmmap)), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
ret = uintptr(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1917,7 +1916,7 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
func munmap(addr uintptr, length uintptr) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmunmap)), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1928,7 +1927,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsendfile)), 4, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
written = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1942,7 +1941,7 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
}
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1953,7 +1952,7 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
fd = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1963,7 +1962,7 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1978,7 +1977,7 @@ func write(fd int, p []byte) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1988,7 +1987,7 @@ func write(fd int, p []byte) (n int, err error) {
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_getsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -1998,7 +1997,7 @@ func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetpeername)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -2008,7 +2007,7 @@ func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsetsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -2023,7 +2022,7 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procrecvfrom)), 6, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -2034,7 +2033,7 @@ func port_create() (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_create)), 0, 0, 0, 0, 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -2045,7 +2044,7 @@ func port_associate(port int, source int, object uintptr, events int, user *byte
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_associate)), 5, uintptr(port), uintptr(source), uintptr(object), uintptr(events), uintptr(unsafe.Pointer(user)), 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -2056,7 +2055,7 @@ func port_dissociate(port int, source int, object uintptr) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_dissociate)), 3, uintptr(port), uintptr(source), uintptr(object), 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -2067,7 +2066,7 @@ func port_get(port int, pe *portEvent, timeout *Timespec) (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_get)), 3, uintptr(port), uintptr(unsafe.Pointer(pe)), uintptr(unsafe.Pointer(timeout)), 0, 0, 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -2078,7 +2077,7 @@ func port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Times
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_getn)), 5, uintptr(port), uintptr(unsafe.Pointer(pe)), uintptr(max), uintptr(unsafe.Pointer(nget)), uintptr(unsafe.Pointer(timeout)), 0)
n = int(r0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -2088,7 +2087,7 @@ func port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Times
func putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procputmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(flags), 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
@@ -2098,7 +2097,7 @@ func putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) {
func getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(unsafe.Pointer(flags)), 0, 0)
if e1 != 0 {
- err = e1
+ err = errnoErr(e1)
}
return
}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
index c31681743c..94f0112383 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build zos && s390x
-// +build zos,s390x
package unix
@@ -40,17 +39,6 @@ func read(fd int, p []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := syscall_syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go
index 55e0484719..3a58ae819a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; DO NOT EDIT.
//go:build 386 && openbsd
-// +build 386,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go
index d2243cf83f..dcb7a0eb72 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; DO NOT EDIT.
//go:build amd64 && openbsd
-// +build amd64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go
index 82dc51bd8b..db5a7bf13c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; DO NOT EDIT.
//go:build arm && openbsd
-// +build arm,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go
index cbdda1a4ae..7be575a777 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; DO NOT EDIT.
//go:build arm64 && openbsd
-// +build arm64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go
index f55eae1a82..d6e3174c69 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; DO NOT EDIT.
//go:build mips64 && openbsd
-// +build mips64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go
index e44054470b..ee97157d01 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; DO NOT EDIT.
//go:build ppc64 && openbsd
-// +build ppc64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go
index a0db82fce2..35c3b91d0f 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; DO NOT EDIT.
//go:build riscv64 && openbsd
-// +build riscv64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
index f8298ff9b5..5edda76870 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && darwin
-// +build amd64,darwin
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
index 5eb433bbf0..0dc9e8b4d9 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && darwin
-// +build arm64,darwin
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
index 703675c0c4..308ddf3a1f 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && dragonfly
-// +build amd64,dragonfly
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
index 4e0d96107b..418664e3dc 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build 386 && freebsd
-// +build 386,freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
index 01636b838d..34d0b86d7c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && freebsd
-// +build amd64,freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
index ad99bc106a..b71cf45e2e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm && freebsd
-// +build arm,freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go
index 89dcc42747..e32df1c1ee 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && freebsd
-// +build arm64,freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go
index ee37aaa0c9..15ad6111f3 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build riscv64 && freebsd
-// +build riscv64,freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
index c9c4ad0314..0cc3ce496e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build 386 && linux
-// +build 386,linux
package unix
@@ -447,4 +446,10 @@ const (
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
SYS_SET_MEMPOLICY_HOME_NODE = 450
+ SYS_CACHESTAT = 451
+ SYS_FCHMODAT2 = 452
+ SYS_MAP_SHADOW_STACK = 453
+ SYS_FUTEX_WAKE = 454
+ SYS_FUTEX_WAIT = 455
+ SYS_FUTEX_REQUEUE = 456
)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
index 12ff3417c5..856d92d69e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && linux
-// +build amd64,linux
package unix
@@ -369,4 +368,10 @@ const (
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
SYS_SET_MEMPOLICY_HOME_NODE = 450
+ SYS_CACHESTAT = 451
+ SYS_FCHMODAT2 = 452
+ SYS_MAP_SHADOW_STACK = 453
+ SYS_FUTEX_WAKE = 454
+ SYS_FUTEX_WAIT = 455
+ SYS_FUTEX_REQUEUE = 456
)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
index c3fb5e77ab..8d467094cf 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm && linux
-// +build arm,linux
package unix
@@ -411,4 +410,10 @@ const (
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
SYS_SET_MEMPOLICY_HOME_NODE = 450
+ SYS_CACHESTAT = 451
+ SYS_FCHMODAT2 = 452
+ SYS_MAP_SHADOW_STACK = 453
+ SYS_FUTEX_WAKE = 454
+ SYS_FUTEX_WAIT = 455
+ SYS_FUTEX_REQUEUE = 456
)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
index 358c847a40..edc173244d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && linux
-// +build arm64,linux
package unix
@@ -314,4 +313,10 @@ const (
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
SYS_SET_MEMPOLICY_HOME_NODE = 450
+ SYS_CACHESTAT = 451
+ SYS_FCHMODAT2 = 452
+ SYS_MAP_SHADOW_STACK = 453
+ SYS_FUTEX_WAKE = 454
+ SYS_FUTEX_WAIT = 455
+ SYS_FUTEX_REQUEUE = 456
)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
index 81c4849b16..445eba2061 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build loong64 && linux
-// +build loong64,linux
package unix
@@ -308,4 +307,10 @@ const (
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
SYS_SET_MEMPOLICY_HOME_NODE = 450
+ SYS_CACHESTAT = 451
+ SYS_FCHMODAT2 = 452
+ SYS_MAP_SHADOW_STACK = 453
+ SYS_FUTEX_WAKE = 454
+ SYS_FUTEX_WAIT = 455
+ SYS_FUTEX_REQUEUE = 456
)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
index 202a57e900..adba01bca7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips && linux
-// +build mips,linux
package unix
@@ -431,4 +430,10 @@ const (
SYS_PROCESS_MRELEASE = 4448
SYS_FUTEX_WAITV = 4449
SYS_SET_MEMPOLICY_HOME_NODE = 4450
+ SYS_CACHESTAT = 4451
+ SYS_FCHMODAT2 = 4452
+ SYS_MAP_SHADOW_STACK = 4453
+ SYS_FUTEX_WAKE = 4454
+ SYS_FUTEX_WAIT = 4455
+ SYS_FUTEX_REQUEUE = 4456
)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
index 1fbceb52d7..014c4e9c7a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips64 && linux
-// +build mips64,linux
package unix
@@ -361,4 +360,10 @@ const (
SYS_PROCESS_MRELEASE = 5448
SYS_FUTEX_WAITV = 5449
SYS_SET_MEMPOLICY_HOME_NODE = 5450
+ SYS_CACHESTAT = 5451
+ SYS_FCHMODAT2 = 5452
+ SYS_MAP_SHADOW_STACK = 5453
+ SYS_FUTEX_WAKE = 5454
+ SYS_FUTEX_WAIT = 5455
+ SYS_FUTEX_REQUEUE = 5456
)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
index b4ffb7a207..ccc97d74d0 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips64le && linux
-// +build mips64le,linux
package unix
@@ -361,4 +360,10 @@ const (
SYS_PROCESS_MRELEASE = 5448
SYS_FUTEX_WAITV = 5449
SYS_SET_MEMPOLICY_HOME_NODE = 5450
+ SYS_CACHESTAT = 5451
+ SYS_FCHMODAT2 = 5452
+ SYS_MAP_SHADOW_STACK = 5453
+ SYS_FUTEX_WAKE = 5454
+ SYS_FUTEX_WAIT = 5455
+ SYS_FUTEX_REQUEUE = 5456
)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
index 867985f9b4..ec2b64a95d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mipsle && linux
-// +build mipsle,linux
package unix
@@ -431,4 +430,10 @@ const (
SYS_PROCESS_MRELEASE = 4448
SYS_FUTEX_WAITV = 4449
SYS_SET_MEMPOLICY_HOME_NODE = 4450
+ SYS_CACHESTAT = 4451
+ SYS_FCHMODAT2 = 4452
+ SYS_MAP_SHADOW_STACK = 4453
+ SYS_FUTEX_WAKE = 4454
+ SYS_FUTEX_WAIT = 4455
+ SYS_FUTEX_REQUEUE = 4456
)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
index a8cce69ede..21a839e338 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc && linux
-// +build ppc,linux
package unix
@@ -438,4 +437,10 @@ const (
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
SYS_SET_MEMPOLICY_HOME_NODE = 450
+ SYS_CACHESTAT = 451
+ SYS_FCHMODAT2 = 452
+ SYS_MAP_SHADOW_STACK = 453
+ SYS_FUTEX_WAKE = 454
+ SYS_FUTEX_WAIT = 455
+ SYS_FUTEX_REQUEUE = 456
)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
index d44c5b39d7..c11121ec3b 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64 && linux
-// +build ppc64,linux
package unix
@@ -410,4 +409,10 @@ const (
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
SYS_SET_MEMPOLICY_HOME_NODE = 450
+ SYS_CACHESTAT = 451
+ SYS_FCHMODAT2 = 452
+ SYS_MAP_SHADOW_STACK = 453
+ SYS_FUTEX_WAKE = 454
+ SYS_FUTEX_WAIT = 455
+ SYS_FUTEX_REQUEUE = 456
)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
index 4214dd9c03..909b631fcb 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64le && linux
-// +build ppc64le,linux
package unix
@@ -410,4 +409,10 @@ const (
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
SYS_SET_MEMPOLICY_HOME_NODE = 450
+ SYS_CACHESTAT = 451
+ SYS_FCHMODAT2 = 452
+ SYS_MAP_SHADOW_STACK = 453
+ SYS_FUTEX_WAKE = 454
+ SYS_FUTEX_WAIT = 455
+ SYS_FUTEX_REQUEUE = 456
)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
index 3e594a8c09..e49bed16ea 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build riscv64 && linux
-// +build riscv64,linux
package unix
@@ -251,6 +250,8 @@ const (
SYS_ACCEPT4 = 242
SYS_RECVMMSG = 243
SYS_ARCH_SPECIFIC_SYSCALL = 244
+ SYS_RISCV_HWPROBE = 258
+ SYS_RISCV_FLUSH_ICACHE = 259
SYS_WAIT4 = 260
SYS_PRLIMIT64 = 261
SYS_FANOTIFY_INIT = 262
@@ -313,4 +314,10 @@ const (
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
SYS_SET_MEMPOLICY_HOME_NODE = 450
+ SYS_CACHESTAT = 451
+ SYS_FCHMODAT2 = 452
+ SYS_MAP_SHADOW_STACK = 453
+ SYS_FUTEX_WAKE = 454
+ SYS_FUTEX_WAIT = 455
+ SYS_FUTEX_REQUEUE = 456
)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
index 7ea465204b..66017d2d32 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build s390x && linux
-// +build s390x,linux
package unix
@@ -372,7 +371,14 @@ const (
SYS_LANDLOCK_CREATE_RULESET = 444
SYS_LANDLOCK_ADD_RULE = 445
SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_MEMFD_SECRET = 447
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
SYS_SET_MEMPOLICY_HOME_NODE = 450
+ SYS_CACHESTAT = 451
+ SYS_FCHMODAT2 = 452
+ SYS_MAP_SHADOW_STACK = 453
+ SYS_FUTEX_WAKE = 454
+ SYS_FUTEX_WAIT = 455
+ SYS_FUTEX_REQUEUE = 456
)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
index 92f628ef4f..47bab18dce 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build sparc64 && linux
-// +build sparc64,linux
package unix
@@ -389,4 +388,10 @@ const (
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
SYS_SET_MEMPOLICY_HOME_NODE = 450
+ SYS_CACHESTAT = 451
+ SYS_FCHMODAT2 = 452
+ SYS_MAP_SHADOW_STACK = 453
+ SYS_FUTEX_WAKE = 454
+ SYS_FUTEX_WAIT = 455
+ SYS_FUTEX_REQUEUE = 456
)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
index 3a6699eba9..b2aa8cd495 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build 386 && netbsd
-// +build 386,netbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
index 5677cd4f15..524a1b1c9a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && netbsd
-// +build amd64,netbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
index e784cb6db1..d59b943ac2 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm && netbsd
-// +build arm,netbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go
index bd4952efa5..31e771d53e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; DO NOT EDIT.
//go:build arm64 && netbsd
-// +build arm64,netbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
index 597733813e..9fd77c6cb4 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build 386 && openbsd
-// +build 386,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
index 16af291899..af10af28cb 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && openbsd
-// +build amd64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
index f59b18a977..cc2028af4b 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm && openbsd
-// +build arm,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
index 721ef59103..c06dd4415a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && openbsd
-// +build arm64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go
index 01c43a01fd..9ddbf3e08f 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips64 && openbsd
-// +build mips64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go
index f258cfa24e..19a6ee4134 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64 && openbsd
-// +build ppc64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go
index 07919e0ecc..05192a782d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build riscv64 && openbsd
-// +build riscv64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go
index 073daad43b..b2e3085819 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build zos && s390x
-// +build zos,s390x
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go
index 7a8161c1d1..3e6d57cae7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc && aix
-// +build ppc,aix
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go
index 07ed733c51..3a219bdce7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64 && aix
-// +build ppc64,aix
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
index 690cefc3d0..091d107f3a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && darwin
-// +build amd64,darwin
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
index 5bffc10eac..28ff4ef74d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && darwin
-// +build arm64,darwin
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
index d0ba8e9b86..30e405bb4c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && dragonfly
-// +build amd64,dragonfly
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
index 29dc483378..6cbd094a3a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build 386 && freebsd
-// +build 386,freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
index 0a89b28906..7c03b6ee77 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && freebsd
-// +build amd64,freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
index c8666bb152..422107ee8b 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm && freebsd
-// +build arm,freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
index 88fb48a887..505a12acfd 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && freebsd
-// +build arm64,freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
index 698dc975e9..cc986c7900 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build riscv64 && freebsd
-// +build riscv64,freebsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux.go
index ca84727cfe..eff6bcdef8 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux.go
@@ -1,7 +1,6 @@
// Code generated by mkmerge; DO NOT EDIT.
//go:build linux
-// +build linux
package unix
@@ -175,7 +174,8 @@ type FscryptPolicyV2 struct {
Contents_encryption_mode uint8
Filenames_encryption_mode uint8
Flags uint8
- _ [4]uint8
+ Log2_data_unit_size uint8
+ _ [3]uint8
Master_key_identifier [16]uint8
}
@@ -456,60 +456,63 @@ type Ucred struct {
}
type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
- Pacing_rate uint64
- Max_pacing_rate uint64
- Bytes_acked uint64
- Bytes_received uint64
- Segs_out uint32
- Segs_in uint32
- Notsent_bytes uint32
- Min_rtt uint32
- Data_segs_in uint32
- Data_segs_out uint32
- Delivery_rate uint64
- Busy_time uint64
- Rwnd_limited uint64
- Sndbuf_limited uint64
- Delivered uint32
- Delivered_ce uint32
- Bytes_sent uint64
- Bytes_retrans uint64
- Dsack_dups uint32
- Reord_seen uint32
- Rcv_ooopack uint32
- Snd_wnd uint32
- Rcv_wnd uint32
- Rehash uint32
+ State uint8
+ Ca_state uint8
+ Retransmits uint8
+ Probes uint8
+ Backoff uint8
+ Options uint8
+ Rto uint32
+ Ato uint32
+ Snd_mss uint32
+ Rcv_mss uint32
+ Unacked uint32
+ Sacked uint32
+ Lost uint32
+ Retrans uint32
+ Fackets uint32
+ Last_data_sent uint32
+ Last_ack_sent uint32
+ Last_data_recv uint32
+ Last_ack_recv uint32
+ Pmtu uint32
+ Rcv_ssthresh uint32
+ Rtt uint32
+ Rttvar uint32
+ Snd_ssthresh uint32
+ Snd_cwnd uint32
+ Advmss uint32
+ Reordering uint32
+ Rcv_rtt uint32
+ Rcv_space uint32
+ Total_retrans uint32
+ Pacing_rate uint64
+ Max_pacing_rate uint64
+ Bytes_acked uint64
+ Bytes_received uint64
+ Segs_out uint32
+ Segs_in uint32
+ Notsent_bytes uint32
+ Min_rtt uint32
+ Data_segs_in uint32
+ Data_segs_out uint32
+ Delivery_rate uint64
+ Busy_time uint64
+ Rwnd_limited uint64
+ Sndbuf_limited uint64
+ Delivered uint32
+ Delivered_ce uint32
+ Bytes_sent uint64
+ Bytes_retrans uint64
+ Dsack_dups uint32
+ Reord_seen uint32
+ Rcv_ooopack uint32
+ Snd_wnd uint32
+ Rcv_wnd uint32
+ Rehash uint32
+ Total_rto uint16
+ Total_rto_recoveries uint16
+ Total_rto_time uint32
}
type CanFilter struct {
@@ -552,7 +555,7 @@ const (
SizeofIPv6MTUInfo = 0x20
SizeofICMPv6Filter = 0x20
SizeofUcred = 0xc
- SizeofTCPInfo = 0xf0
+ SizeofTCPInfo = 0xf8
SizeofCanFilter = 0x8
SizeofTCPRepairOpt = 0x8
)
@@ -833,6 +836,15 @@ const (
FSPICK_EMPTY_PATH = 0x8
FSMOUNT_CLOEXEC = 0x1
+
+ FSCONFIG_SET_FLAG = 0x0
+ FSCONFIG_SET_STRING = 0x1
+ FSCONFIG_SET_BINARY = 0x2
+ FSCONFIG_SET_PATH = 0x3
+ FSCONFIG_SET_PATH_EMPTY = 0x4
+ FSCONFIG_SET_FD = 0x5
+ FSCONFIG_CMD_CREATE = 0x6
+ FSCONFIG_CMD_RECONFIGURE = 0x7
)
type OpenHow struct {
@@ -866,6 +878,11 @@ const (
POLLNVAL = 0x20
)
+type sigset_argpack struct {
+ ss *Sigset_t
+ ssLen uintptr
+}
+
type SignalfdSiginfo struct {
Signo uint32
Errno int32
@@ -1538,6 +1555,11 @@ const (
IFLA_GRO_MAX_SIZE = 0x3a
IFLA_TSO_MAX_SIZE = 0x3b
IFLA_TSO_MAX_SEGS = 0x3c
+ IFLA_ALLMULTI = 0x3d
+ IFLA_DEVLINK_PORT = 0x3e
+ IFLA_GSO_IPV4_MAX_SIZE = 0x3f
+ IFLA_GRO_IPV4_MAX_SIZE = 0x40
+ IFLA_DPLL_PIN = 0x41
IFLA_PROTO_DOWN_REASON_UNSPEC = 0x0
IFLA_PROTO_DOWN_REASON_MASK = 0x1
IFLA_PROTO_DOWN_REASON_VALUE = 0x2
@@ -1553,6 +1575,7 @@ const (
IFLA_INET6_ICMP6STATS = 0x6
IFLA_INET6_TOKEN = 0x7
IFLA_INET6_ADDR_GEN_MODE = 0x8
+ IFLA_INET6_RA_MTU = 0x9
IFLA_BR_UNSPEC = 0x0
IFLA_BR_FORWARD_DELAY = 0x1
IFLA_BR_HELLO_TIME = 0x2
@@ -1600,6 +1623,9 @@ const (
IFLA_BR_MCAST_MLD_VERSION = 0x2c
IFLA_BR_VLAN_STATS_PER_PORT = 0x2d
IFLA_BR_MULTI_BOOLOPT = 0x2e
+ IFLA_BR_MCAST_QUERIER_STATE = 0x2f
+ IFLA_BR_FDB_N_LEARNED = 0x30
+ IFLA_BR_FDB_MAX_LEARNED = 0x31
IFLA_BRPORT_UNSPEC = 0x0
IFLA_BRPORT_STATE = 0x1
IFLA_BRPORT_PRIORITY = 0x2
@@ -1637,6 +1663,14 @@ const (
IFLA_BRPORT_BACKUP_PORT = 0x22
IFLA_BRPORT_MRP_RING_OPEN = 0x23
IFLA_BRPORT_MRP_IN_OPEN = 0x24
+ IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT = 0x25
+ IFLA_BRPORT_MCAST_EHT_HOSTS_CNT = 0x26
+ IFLA_BRPORT_LOCKED = 0x27
+ IFLA_BRPORT_MAB = 0x28
+ IFLA_BRPORT_MCAST_N_GROUPS = 0x29
+ IFLA_BRPORT_MCAST_MAX_GROUPS = 0x2a
+ IFLA_BRPORT_NEIGH_VLAN_SUPPRESS = 0x2b
+ IFLA_BRPORT_BACKUP_NHID = 0x2c
IFLA_INFO_UNSPEC = 0x0
IFLA_INFO_KIND = 0x1
IFLA_INFO_DATA = 0x2
@@ -1658,6 +1692,9 @@ const (
IFLA_MACVLAN_MACADDR = 0x4
IFLA_MACVLAN_MACADDR_DATA = 0x5
IFLA_MACVLAN_MACADDR_COUNT = 0x6
+ IFLA_MACVLAN_BC_QUEUE_LEN = 0x7
+ IFLA_MACVLAN_BC_QUEUE_LEN_USED = 0x8
+ IFLA_MACVLAN_BC_CUTOFF = 0x9
IFLA_VRF_UNSPEC = 0x0
IFLA_VRF_TABLE = 0x1
IFLA_VRF_PORT_UNSPEC = 0x0
@@ -1681,9 +1718,22 @@ const (
IFLA_XFRM_UNSPEC = 0x0
IFLA_XFRM_LINK = 0x1
IFLA_XFRM_IF_ID = 0x2
+ IFLA_XFRM_COLLECT_METADATA = 0x3
IFLA_IPVLAN_UNSPEC = 0x0
IFLA_IPVLAN_MODE = 0x1
IFLA_IPVLAN_FLAGS = 0x2
+ NETKIT_NEXT = -0x1
+ NETKIT_PASS = 0x0
+ NETKIT_DROP = 0x2
+ NETKIT_REDIRECT = 0x7
+ NETKIT_L2 = 0x0
+ NETKIT_L3 = 0x1
+ IFLA_NETKIT_UNSPEC = 0x0
+ IFLA_NETKIT_PEER_INFO = 0x1
+ IFLA_NETKIT_PRIMARY = 0x2
+ IFLA_NETKIT_POLICY = 0x3
+ IFLA_NETKIT_PEER_POLICY = 0x4
+ IFLA_NETKIT_MODE = 0x5
IFLA_VXLAN_UNSPEC = 0x0
IFLA_VXLAN_ID = 0x1
IFLA_VXLAN_GROUP = 0x2
@@ -1714,6 +1764,8 @@ const (
IFLA_VXLAN_GPE = 0x1b
IFLA_VXLAN_TTL_INHERIT = 0x1c
IFLA_VXLAN_DF = 0x1d
+ IFLA_VXLAN_VNIFILTER = 0x1e
+ IFLA_VXLAN_LOCALBYPASS = 0x1f
IFLA_GENEVE_UNSPEC = 0x0
IFLA_GENEVE_ID = 0x1
IFLA_GENEVE_REMOTE = 0x2
@@ -1728,6 +1780,7 @@ const (
IFLA_GENEVE_LABEL = 0xb
IFLA_GENEVE_TTL_INHERIT = 0xc
IFLA_GENEVE_DF = 0xd
+ IFLA_GENEVE_INNER_PROTO_INHERIT = 0xe
IFLA_BAREUDP_UNSPEC = 0x0
IFLA_BAREUDP_PORT = 0x1
IFLA_BAREUDP_ETHERTYPE = 0x2
@@ -1740,6 +1793,8 @@ const (
IFLA_GTP_FD1 = 0x2
IFLA_GTP_PDP_HASHSIZE = 0x3
IFLA_GTP_ROLE = 0x4
+ IFLA_GTP_CREATE_SOCKETS = 0x5
+ IFLA_GTP_RESTART_COUNT = 0x6
IFLA_BOND_UNSPEC = 0x0
IFLA_BOND_MODE = 0x1
IFLA_BOND_ACTIVE_SLAVE = 0x2
@@ -1769,6 +1824,9 @@ const (
IFLA_BOND_AD_ACTOR_SYSTEM = 0x1a
IFLA_BOND_TLB_DYNAMIC_LB = 0x1b
IFLA_BOND_PEER_NOTIF_DELAY = 0x1c
+ IFLA_BOND_AD_LACP_ACTIVE = 0x1d
+ IFLA_BOND_MISSED_MAX = 0x1e
+ IFLA_BOND_NS_IP6_TARGET = 0x1f
IFLA_BOND_AD_INFO_UNSPEC = 0x0
IFLA_BOND_AD_INFO_AGGREGATOR = 0x1
IFLA_BOND_AD_INFO_NUM_PORTS = 0x2
@@ -1784,6 +1842,7 @@ const (
IFLA_BOND_SLAVE_AD_AGGREGATOR_ID = 0x6
IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE = 0x7
IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE = 0x8
+ IFLA_BOND_SLAVE_PRIO = 0x9
IFLA_VF_INFO_UNSPEC = 0x0
IFLA_VF_INFO = 0x1
IFLA_VF_UNSPEC = 0x0
@@ -1842,8 +1901,16 @@ const (
IFLA_STATS_LINK_XSTATS_SLAVE = 0x3
IFLA_STATS_LINK_OFFLOAD_XSTATS = 0x4
IFLA_STATS_AF_SPEC = 0x5
+ IFLA_STATS_GETSET_UNSPEC = 0x0
+ IFLA_STATS_GET_FILTERS = 0x1
+ IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS = 0x2
IFLA_OFFLOAD_XSTATS_UNSPEC = 0x0
IFLA_OFFLOAD_XSTATS_CPU_HIT = 0x1
+ IFLA_OFFLOAD_XSTATS_HW_S_INFO = 0x2
+ IFLA_OFFLOAD_XSTATS_L3_STATS = 0x3
+ IFLA_OFFLOAD_XSTATS_HW_S_INFO_UNSPEC = 0x0
+ IFLA_OFFLOAD_XSTATS_HW_S_INFO_REQUEST = 0x1
+ IFLA_OFFLOAD_XSTATS_HW_S_INFO_USED = 0x2
IFLA_XDP_UNSPEC = 0x0
IFLA_XDP_FD = 0x1
IFLA_XDP_ATTACHED = 0x2
@@ -1873,6 +1940,11 @@ const (
IFLA_RMNET_UNSPEC = 0x0
IFLA_RMNET_MUX_ID = 0x1
IFLA_RMNET_FLAGS = 0x2
+ IFLA_MCTP_UNSPEC = 0x0
+ IFLA_MCTP_NET = 0x1
+ IFLA_DSA_UNSPEC = 0x0
+ IFLA_DSA_CONDUIT = 0x1
+ IFLA_DSA_MASTER = 0x1
)
const (
@@ -1968,7 +2040,7 @@ const (
NFT_MSG_GETFLOWTABLE = 0x17
NFT_MSG_DELFLOWTABLE = 0x18
NFT_MSG_GETRULE_RESET = 0x19
- NFT_MSG_MAX = 0x1a
+ NFT_MSG_MAX = 0x22
NFTA_LIST_UNSPEC = 0x0
NFTA_LIST_ELEM = 0x1
NFTA_HOOK_UNSPEC = 0x0
@@ -2555,6 +2627,11 @@ const (
BPF_REG_8 = 0x8
BPF_REG_9 = 0x9
BPF_REG_10 = 0xa
+ BPF_CGROUP_ITER_ORDER_UNSPEC = 0x0
+ BPF_CGROUP_ITER_SELF_ONLY = 0x1
+ BPF_CGROUP_ITER_DESCENDANTS_PRE = 0x2
+ BPF_CGROUP_ITER_DESCENDANTS_POST = 0x3
+ BPF_CGROUP_ITER_ANCESTORS_UP = 0x4
BPF_MAP_CREATE = 0x0
BPF_MAP_LOOKUP_ELEM = 0x1
BPF_MAP_UPDATE_ELEM = 0x2
@@ -2566,6 +2643,7 @@ const (
BPF_PROG_ATTACH = 0x8
BPF_PROG_DETACH = 0x9
BPF_PROG_TEST_RUN = 0xa
+ BPF_PROG_RUN = 0xa
BPF_PROG_GET_NEXT_ID = 0xb
BPF_MAP_GET_NEXT_ID = 0xc
BPF_PROG_GET_FD_BY_ID = 0xd
@@ -2610,6 +2688,7 @@ const (
BPF_MAP_TYPE_CPUMAP = 0x10
BPF_MAP_TYPE_XSKMAP = 0x11
BPF_MAP_TYPE_SOCKHASH = 0x12
+ BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED = 0x13
BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
@@ -2620,6 +2699,10 @@ const (
BPF_MAP_TYPE_STRUCT_OPS = 0x1a
BPF_MAP_TYPE_RINGBUF = 0x1b
BPF_MAP_TYPE_INODE_STORAGE = 0x1c
+ BPF_MAP_TYPE_TASK_STORAGE = 0x1d
+ BPF_MAP_TYPE_BLOOM_FILTER = 0x1e
+ BPF_MAP_TYPE_USER_RINGBUF = 0x1f
+ BPF_MAP_TYPE_CGRP_STORAGE = 0x20
BPF_PROG_TYPE_UNSPEC = 0x0
BPF_PROG_TYPE_SOCKET_FILTER = 0x1
BPF_PROG_TYPE_KPROBE = 0x2
@@ -2651,6 +2734,8 @@ const (
BPF_PROG_TYPE_EXT = 0x1c
BPF_PROG_TYPE_LSM = 0x1d
BPF_PROG_TYPE_SK_LOOKUP = 0x1e
+ BPF_PROG_TYPE_SYSCALL = 0x1f
+ BPF_PROG_TYPE_NETFILTER = 0x20
BPF_CGROUP_INET_INGRESS = 0x0
BPF_CGROUP_INET_EGRESS = 0x1
BPF_CGROUP_INET_SOCK_CREATE = 0x2
@@ -2689,6 +2774,17 @@ const (
BPF_XDP_CPUMAP = 0x23
BPF_SK_LOOKUP = 0x24
BPF_XDP = 0x25
+ BPF_SK_SKB_VERDICT = 0x26
+ BPF_SK_REUSEPORT_SELECT = 0x27
+ BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 0x28
+ BPF_PERF_EVENT = 0x29
+ BPF_TRACE_KPROBE_MULTI = 0x2a
+ BPF_LSM_CGROUP = 0x2b
+ BPF_STRUCT_OPS = 0x2c
+ BPF_NETFILTER = 0x2d
+ BPF_TCX_INGRESS = 0x2e
+ BPF_TCX_EGRESS = 0x2f
+ BPF_TRACE_UPROBE_MULTI = 0x30
BPF_LINK_TYPE_UNSPEC = 0x0
BPF_LINK_TYPE_RAW_TRACEPOINT = 0x1
BPF_LINK_TYPE_TRACING = 0x2
@@ -2696,6 +2792,21 @@ const (
BPF_LINK_TYPE_ITER = 0x4
BPF_LINK_TYPE_NETNS = 0x5
BPF_LINK_TYPE_XDP = 0x6
+ BPF_LINK_TYPE_PERF_EVENT = 0x7
+ BPF_LINK_TYPE_KPROBE_MULTI = 0x8
+ BPF_LINK_TYPE_STRUCT_OPS = 0x9
+ BPF_LINK_TYPE_NETFILTER = 0xa
+ BPF_LINK_TYPE_TCX = 0xb
+ BPF_LINK_TYPE_UPROBE_MULTI = 0xc
+ BPF_PERF_EVENT_UNSPEC = 0x0
+ BPF_PERF_EVENT_UPROBE = 0x1
+ BPF_PERF_EVENT_URETPROBE = 0x2
+ BPF_PERF_EVENT_KPROBE = 0x3
+ BPF_PERF_EVENT_KRETPROBE = 0x4
+ BPF_PERF_EVENT_TRACEPOINT = 0x5
+ BPF_PERF_EVENT_EVENT = 0x6
+ BPF_F_KPROBE_MULTI_RETURN = 0x1
+ BPF_F_UPROBE_MULTI_RETURN = 0x1
BPF_ANY = 0x0
BPF_NOEXIST = 0x1
BPF_EXIST = 0x2
@@ -2713,6 +2824,8 @@ const (
BPF_F_MMAPABLE = 0x400
BPF_F_PRESERVE_ELEMS = 0x800
BPF_F_INNER_MAP = 0x1000
+ BPF_F_LINK = 0x2000
+ BPF_F_PATH_FD = 0x4000
BPF_STATS_RUN_TIME = 0x0
BPF_STACK_BUILD_ID_EMPTY = 0x0
BPF_STACK_BUILD_ID_VALID = 0x1
@@ -2733,6 +2846,8 @@ const (
BPF_F_ZERO_CSUM_TX = 0x2
BPF_F_DONT_FRAGMENT = 0x4
BPF_F_SEQ_NUMBER = 0x8
+ BPF_F_NO_TUNNEL_KEY = 0x10
+ BPF_F_TUNINFO_FLAGS = 0x10
BPF_F_INDEX_MASK = 0xffffffff
BPF_F_CURRENT_CPU = 0xffffffff
BPF_F_CTXLEN_MASK = 0xfffff00000000
@@ -2747,6 +2862,9 @@ const (
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
BPF_F_ADJ_ROOM_NO_CSUM_RESET = 0x20
+ BPF_F_ADJ_ROOM_ENCAP_L2_ETH = 0x40
+ BPF_F_ADJ_ROOM_DECAP_L3_IPV4 = 0x80
+ BPF_F_ADJ_ROOM_DECAP_L3_IPV6 = 0x100
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
BPF_F_SYSCTL_BASE_NAME = 0x1
@@ -2771,10 +2889,16 @@ const (
BPF_LWT_ENCAP_SEG6 = 0x0
BPF_LWT_ENCAP_SEG6_INLINE = 0x1
BPF_LWT_ENCAP_IP = 0x2
+ BPF_F_BPRM_SECUREEXEC = 0x1
+ BPF_F_BROADCAST = 0x8
+ BPF_F_EXCLUDE_INGRESS = 0x10
+ BPF_SKB_TSTAMP_UNSPEC = 0x0
+ BPF_SKB_TSTAMP_DELIVERY_MONO = 0x1
BPF_OK = 0x0
BPF_DROP = 0x2
BPF_REDIRECT = 0x7
BPF_LWT_REROUTE = 0x80
+ BPF_FLOW_DISSECTOR_CONTINUE = 0x81
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
@@ -2829,6 +2953,8 @@ const (
BPF_DEVCG_DEV_CHAR = 0x2
BPF_FIB_LOOKUP_DIRECT = 0x1
BPF_FIB_LOOKUP_OUTPUT = 0x2
+ BPF_FIB_LOOKUP_SKIP_NEIGH = 0x4
+ BPF_FIB_LOOKUP_TBID = 0x8
BPF_FIB_LKUP_RET_SUCCESS = 0x0
BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
@@ -2838,6 +2964,10 @@ const (
BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
+ BPF_MTU_CHK_SEGS = 0x1
+ BPF_MTU_CHK_RET_SUCCESS = 0x0
+ BPF_MTU_CHK_RET_FRAG_NEEDED = 0x1
+ BPF_MTU_CHK_RET_SEGS_TOOBIG = 0x2
BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
BPF_FD_TYPE_TRACEPOINT = 0x1
BPF_FD_TYPE_KPROBE = 0x2
@@ -2847,6 +2977,20 @@ const (
BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
+ BPF_CORE_FIELD_BYTE_OFFSET = 0x0
+ BPF_CORE_FIELD_BYTE_SIZE = 0x1
+ BPF_CORE_FIELD_EXISTS = 0x2
+ BPF_CORE_FIELD_SIGNED = 0x3
+ BPF_CORE_FIELD_LSHIFT_U64 = 0x4
+ BPF_CORE_FIELD_RSHIFT_U64 = 0x5
+ BPF_CORE_TYPE_ID_LOCAL = 0x6
+ BPF_CORE_TYPE_ID_TARGET = 0x7
+ BPF_CORE_TYPE_EXISTS = 0x8
+ BPF_CORE_TYPE_SIZE = 0x9
+ BPF_CORE_ENUMVAL_EXISTS = 0xa
+ BPF_CORE_ENUMVAL_VALUE = 0xb
+ BPF_CORE_TYPE_MATCHES = 0xc
+ BPF_F_TIMER_ABS = 0x1
)
const (
@@ -2925,6 +3069,12 @@ type LoopInfo64 struct {
Encrypt_key [32]uint8
Init [2]uint64
}
+type LoopConfig struct {
+ Fd uint32
+ Size uint32
+ Info LoopInfo64
+ _ [8]uint64
+}
type TIPCSocketAddr struct {
Ref uint32
@@ -3313,7 +3463,7 @@ const (
DEVLINK_PORT_FN_ATTR_STATE = 0x2
DEVLINK_PORT_FN_ATTR_OPSTATE = 0x3
DEVLINK_PORT_FN_ATTR_CAPS = 0x4
- DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x4
+ DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x5
)
type FsverityDigest struct {
@@ -3605,7 +3755,7 @@ const (
ETHTOOL_MSG_PSE_GET = 0x24
ETHTOOL_MSG_PSE_SET = 0x25
ETHTOOL_MSG_RSS_GET = 0x26
- ETHTOOL_MSG_USER_MAX = 0x26
+ ETHTOOL_MSG_USER_MAX = 0x2b
ETHTOOL_MSG_KERNEL_NONE = 0x0
ETHTOOL_MSG_STRSET_GET_REPLY = 0x1
ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2
@@ -3645,7 +3795,7 @@ const (
ETHTOOL_MSG_MODULE_NTF = 0x24
ETHTOOL_MSG_PSE_GET_REPLY = 0x25
ETHTOOL_MSG_RSS_GET_REPLY = 0x26
- ETHTOOL_MSG_KERNEL_MAX = 0x26
+ ETHTOOL_MSG_KERNEL_MAX = 0x2b
ETHTOOL_A_HEADER_UNSPEC = 0x0
ETHTOOL_A_HEADER_DEV_INDEX = 0x1
ETHTOOL_A_HEADER_DEV_NAME = 0x2
@@ -3749,7 +3899,7 @@ const (
ETHTOOL_A_RINGS_TCP_DATA_SPLIT = 0xb
ETHTOOL_A_RINGS_CQE_SIZE = 0xc
ETHTOOL_A_RINGS_TX_PUSH = 0xd
- ETHTOOL_A_RINGS_MAX = 0xd
+ ETHTOOL_A_RINGS_MAX = 0x10
ETHTOOL_A_CHANNELS_UNSPEC = 0x0
ETHTOOL_A_CHANNELS_HEADER = 0x1
ETHTOOL_A_CHANNELS_RX_MAX = 0x2
@@ -3787,14 +3937,14 @@ const (
ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL = 0x17
ETHTOOL_A_COALESCE_USE_CQE_MODE_TX = 0x18
ETHTOOL_A_COALESCE_USE_CQE_MODE_RX = 0x19
- ETHTOOL_A_COALESCE_MAX = 0x19
+ ETHTOOL_A_COALESCE_MAX = 0x1c
ETHTOOL_A_PAUSE_UNSPEC = 0x0
ETHTOOL_A_PAUSE_HEADER = 0x1
ETHTOOL_A_PAUSE_AUTONEG = 0x2
ETHTOOL_A_PAUSE_RX = 0x3
ETHTOOL_A_PAUSE_TX = 0x4
ETHTOOL_A_PAUSE_STATS = 0x5
- ETHTOOL_A_PAUSE_MAX = 0x5
+ ETHTOOL_A_PAUSE_MAX = 0x6
ETHTOOL_A_PAUSE_STAT_UNSPEC = 0x0
ETHTOOL_A_PAUSE_STAT_PAD = 0x1
ETHTOOL_A_PAUSE_STAT_TX_FRAMES = 0x2
@@ -4097,7 +4247,8 @@ const (
)
type LandlockRulesetAttr struct {
- Access_fs uint64
+ Access_fs uint64
+ Access_net uint64
}
type LandlockPathBeneathAttr struct {
@@ -4444,7 +4595,7 @@ const (
NL80211_ATTR_MAC_HINT = 0xc8
NL80211_ATTR_MAC_MASK = 0xd7
NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca
- NL80211_ATTR_MAX = 0x141
+ NL80211_ATTR_MAX = 0x146
NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4
NL80211_ATTR_MAX_CSA_COUNTERS = 0xce
NL80211_ATTR_MAX_MATCH_SETS = 0x85
@@ -4673,7 +4824,7 @@ const (
NL80211_BAND_ATTR_HT_CAPA = 0x4
NL80211_BAND_ATTR_HT_MCS_SET = 0x3
NL80211_BAND_ATTR_IFTYPE_DATA = 0x9
- NL80211_BAND_ATTR_MAX = 0xb
+ NL80211_BAND_ATTR_MAX = 0xd
NL80211_BAND_ATTR_RATES = 0x2
NL80211_BAND_ATTR_VHT_CAPA = 0x8
NL80211_BAND_ATTR_VHT_MCS_SET = 0x7
@@ -4814,7 +4965,7 @@ const (
NL80211_CMD_LEAVE_IBSS = 0x2c
NL80211_CMD_LEAVE_MESH = 0x45
NL80211_CMD_LEAVE_OCB = 0x6d
- NL80211_CMD_MAX = 0x98
+ NL80211_CMD_MAX = 0x9a
NL80211_CMD_MICHAEL_MIC_FAILURE = 0x29
NL80211_CMD_MODIFY_LINK_STA = 0x97
NL80211_CMD_NAN_MATCH = 0x78
@@ -5048,7 +5199,7 @@ const (
NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf
NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe
NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf
- NL80211_FREQUENCY_ATTR_MAX = 0x1b
+ NL80211_FREQUENCY_ATTR_MAX = 0x1c
NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6
NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11
NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc
@@ -5448,7 +5599,7 @@ const (
NL80211_RATE_INFO_HE_RU_ALLOC_52 = 0x1
NL80211_RATE_INFO_HE_RU_ALLOC_996 = 0x5
NL80211_RATE_INFO_HE_RU_ALLOC = 0x11
- NL80211_RATE_INFO_MAX = 0x16
+ NL80211_RATE_INFO_MAX = 0x1d
NL80211_RATE_INFO_MCS = 0x2
NL80211_RATE_INFO_SHORT_GI = 0x4
NL80211_RATE_INFO_VHT_MCS = 0x6
@@ -5461,7 +5612,7 @@ const (
NL80211_REGDOM_TYPE_CUSTOM_WORLD = 0x2
NL80211_REGDOM_TYPE_INTERSECTION = 0x3
NL80211_REGDOM_TYPE_WORLD = 0x1
- NL80211_REG_RULE_ATTR_MAX = 0x7
+ NL80211_REG_RULE_ATTR_MAX = 0x8
NL80211_REKEY_DATA_AKM = 0x4
NL80211_REKEY_DATA_KCK = 0x2
NL80211_REKEY_DATA_KEK = 0x1
@@ -5795,6 +5946,8 @@ const (
TUN_F_TSO6 = 0x4
TUN_F_TSO_ECN = 0x8
TUN_F_UFO = 0x10
+ TUN_F_USO4 = 0x20
+ TUN_F_USO6 = 0x40
)
const (
@@ -5804,9 +5957,37 @@ const (
)
const (
- VIRTIO_NET_HDR_GSO_NONE = 0x0
- VIRTIO_NET_HDR_GSO_TCPV4 = 0x1
- VIRTIO_NET_HDR_GSO_UDP = 0x3
- VIRTIO_NET_HDR_GSO_TCPV6 = 0x4
- VIRTIO_NET_HDR_GSO_ECN = 0x80
+ VIRTIO_NET_HDR_GSO_NONE = 0x0
+ VIRTIO_NET_HDR_GSO_TCPV4 = 0x1
+ VIRTIO_NET_HDR_GSO_UDP = 0x3
+ VIRTIO_NET_HDR_GSO_TCPV6 = 0x4
+ VIRTIO_NET_HDR_GSO_UDP_L4 = 0x5
+ VIRTIO_NET_HDR_GSO_ECN = 0x80
)
+
+type SchedAttr struct {
+ Size uint32
+ Policy uint32
+ Flags uint64
+ Nice int32
+ Priority uint32
+ Runtime uint64
+ Deadline uint64
+ Period uint64
+ Util_min uint32
+ Util_max uint32
+}
+
+const SizeofSchedAttr = 0x38
+
+type Cachestat_t struct {
+ Cache uint64
+ Dirty uint64
+ Writeback uint64
+ Evicted uint64
+ Recently_evicted uint64
+}
+type CachestatRange struct {
+ Off uint64
+ Len uint64
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
index 4ecc1495cd..438a30affa 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build 386 && linux
-// +build 386,linux
package unix
@@ -337,6 +336,8 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
+ Irq_count uint64
+ Irq_delay_total uint64
}
type cpuMask uint32
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
index 34fddff964..adceca3553 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && linux
-// +build amd64,linux
package unix
@@ -350,6 +349,8 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
+ Irq_count uint64
+ Irq_delay_total uint64
}
type cpuMask uint64
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
index 3b14a6031f..eeaa00a37d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm && linux
-// +build arm,linux
package unix
@@ -328,6 +327,8 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
+ Irq_count uint64
+ Irq_delay_total uint64
}
type cpuMask uint32
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
index 0517651ab3..6739aa91d4 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && linux
-// +build arm64,linux
package unix
@@ -329,6 +328,8 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
+ Irq_count uint64
+ Irq_delay_total uint64
}
type cpuMask uint64
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
index 3b0c518134..9920ef6317 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build loong64 && linux
-// +build loong64,linux
package unix
@@ -330,6 +329,8 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
+ Irq_count uint64
+ Irq_delay_total uint64
}
type cpuMask uint64
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
index fccdf4dd0f..2923b799a4 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips && linux
-// +build mips,linux
package unix
@@ -333,6 +332,8 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
+ Irq_count uint64
+ Irq_delay_total uint64
}
type cpuMask uint32
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
index 500de8fc07..ce2750ee41 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips64 && linux
-// +build mips64,linux
package unix
@@ -332,6 +331,8 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
+ Irq_count uint64
+ Irq_delay_total uint64
}
type cpuMask uint64
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
index d0434cd2c6..3038811d70 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips64le && linux
-// +build mips64le,linux
package unix
@@ -332,6 +331,8 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
+ Irq_count uint64
+ Irq_delay_total uint64
}
type cpuMask uint64
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
index 84206ba534..efc6fed18c 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mipsle && linux
-// +build mipsle,linux
package unix
@@ -333,6 +332,8 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
+ Irq_count uint64
+ Irq_delay_total uint64
}
type cpuMask uint32
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
index ab078cf1f5..9a654b75a9 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc && linux
-// +build ppc,linux
package unix
@@ -340,6 +339,8 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
+ Irq_count uint64
+ Irq_delay_total uint64
}
type cpuMask uint32
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
index 42eb2c4cef..40d358e33e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64 && linux
-// +build ppc64,linux
package unix
@@ -339,6 +338,8 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
+ Irq_count uint64
+ Irq_delay_total uint64
}
type cpuMask uint64
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
index 31304a4e8b..148c6ceb86 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64le && linux
-// +build ppc64le,linux
package unix
@@ -339,6 +338,8 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
+ Irq_count uint64
+ Irq_delay_total uint64
}
type cpuMask uint64
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
index c311f9612d..72ba81543e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build riscv64 && linux
-// +build riscv64,linux
package unix
@@ -357,6 +356,8 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
+ Irq_count uint64
+ Irq_delay_total uint64
}
type cpuMask uint64
@@ -716,3 +717,30 @@ type SysvShmDesc struct {
_ uint64
_ uint64
}
+
+type RISCVHWProbePairs struct {
+ Key int64
+ Value uint64
+}
+
+const (
+ RISCV_HWPROBE_KEY_MVENDORID = 0x0
+ RISCV_HWPROBE_KEY_MARCHID = 0x1
+ RISCV_HWPROBE_KEY_MIMPID = 0x2
+ RISCV_HWPROBE_KEY_BASE_BEHAVIOR = 0x3
+ RISCV_HWPROBE_BASE_BEHAVIOR_IMA = 0x1
+ RISCV_HWPROBE_KEY_IMA_EXT_0 = 0x4
+ RISCV_HWPROBE_IMA_FD = 0x1
+ RISCV_HWPROBE_IMA_C = 0x2
+ RISCV_HWPROBE_IMA_V = 0x4
+ RISCV_HWPROBE_EXT_ZBA = 0x8
+ RISCV_HWPROBE_EXT_ZBB = 0x10
+ RISCV_HWPROBE_EXT_ZBS = 0x20
+ RISCV_HWPROBE_KEY_CPUPERF_0 = 0x5
+ RISCV_HWPROBE_MISALIGNED_UNKNOWN = 0x0
+ RISCV_HWPROBE_MISALIGNED_EMULATED = 0x1
+ RISCV_HWPROBE_MISALIGNED_SLOW = 0x2
+ RISCV_HWPROBE_MISALIGNED_FAST = 0x3
+ RISCV_HWPROBE_MISALIGNED_UNSUPPORTED = 0x4
+ RISCV_HWPROBE_MISALIGNED_MASK = 0x7
+)
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
index bba3cefac1..71e765508e 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build s390x && linux
-// +build s390x,linux
package unix
@@ -352,6 +351,8 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
+ Irq_count uint64
+ Irq_delay_total uint64
}
type cpuMask uint64
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
index ad8a013804..4abbdb9de9 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build sparc64 && linux
-// +build sparc64,linux
package unix
@@ -334,6 +333,8 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
+ Irq_count uint64
+ Irq_delay_total uint64
}
type cpuMask uint64
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
index 9bc4c8f9d8..f22e7947d9 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build 386 && netbsd
-// +build 386,netbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
index bb05f655d2..066a7d83d2 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && netbsd
-// +build amd64,netbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
index db40e3a19c..439548ec9a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm && netbsd
-// +build arm,netbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go
index 11121151cc..16085d3bbc 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && netbsd
-// +build arm64,netbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
index 26eba23b72..afd13a3af7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build 386 && openbsd
-// +build 386,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
index 5a54798869..5d97f1f9b6 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && openbsd
-// +build amd64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
index be58c4e1ff..34871cdc15 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm && openbsd
-// +build arm,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
index 52338266cb..5911bceb31 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && openbsd
-// +build arm64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
index 605cfdb12b..e4f24f3bc9 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips64 && openbsd
-// +build mips64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go
index d6724c0102..ca50a79303 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64 && openbsd
-// +build ppc64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go
index ddfd27a434..d7d7f79023 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build riscv64 && openbsd
-// +build riscv64,openbsd
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
index 0400747c67..14160576d2 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
@@ -2,7 +2,6 @@
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && solaris
-// +build amd64,solaris
package unix
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go
index aec1efcb30..54f31be637 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build zos && s390x
-// +build zos,s390x
// Hand edited based on ztypes_linux_s390x.go
// TODO: auto-generate.
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/aliases.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/aliases.go
index a20ebea633..ce2d713d62 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/aliases.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/aliases.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build windows && go1.9
-// +build windows,go1.9
package windows
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/empty.s b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/empty.s
index fdbbbcd317..ba64caca5d 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/empty.s
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/empty.s
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !go1.12
-// +build !go1.12
// This file is here to allow bodyless functions with go:linkname for Go 1.11
// and earlier (see https://golang.org/issue/23311).
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/env_windows.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/env_windows.go
index b8ad192506..d4577a4238 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/env_windows.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/env_windows.go
@@ -37,14 +37,17 @@ func (token Token) Environ(inheritExisting bool) (env []string, err error) {
return nil, err
}
defer DestroyEnvironmentBlock(block)
- blockp := unsafe.Pointer(block)
- for {
- entry := UTF16PtrToString((*uint16)(blockp))
- if len(entry) == 0 {
- break
+ size := unsafe.Sizeof(*block)
+ for *block != 0 {
+ // find NUL terminator
+ end := unsafe.Pointer(block)
+ for *(*uint16)(end) != 0 {
+ end = unsafe.Add(end, size)
}
- env = append(env, entry)
- blockp = unsafe.Add(blockp, 2*(len(entry)+1))
+
+ entry := unsafe.Slice(block, (uintptr(end)-uintptr(unsafe.Pointer(block)))/size)
+ env = append(env, UTF16ToString(entry))
+ block = (*uint16)(unsafe.Add(end, size))
}
return env, nil
}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/eventlog.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/eventlog.go
index 2cd60645ee..6c366955d9 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/eventlog.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/eventlog.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build windows
-// +build windows
package windows
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/exec_windows.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/exec_windows.go
index a52e0331d8..9cabbb6941 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/exec_windows.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/exec_windows.go
@@ -22,7 +22,7 @@ import (
// but only if there is space or tab inside s.
func EscapeArg(s string) string {
if len(s) == 0 {
- return "\"\""
+ return `""`
}
n := len(s)
hasSpace := false
@@ -35,7 +35,7 @@ func EscapeArg(s string) string {
}
}
if hasSpace {
- n += 2
+ n += 2 // Reserve space for quotes.
}
if n == len(s) {
return s
@@ -82,20 +82,68 @@ func EscapeArg(s string) string {
// in CreateProcess's CommandLine argument, CreateService/ChangeServiceConfig's BinaryPathName argument,
// or any program that uses CommandLineToArgv.
func ComposeCommandLine(args []string) string {
- var commandLine string
- for i := range args {
- if i > 0 {
- commandLine += " "
+ if len(args) == 0 {
+ return ""
+ }
+
+ // Per https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-commandlinetoargvw:
+ // “This function accepts command lines that contain a program name; the
+ // program name can be enclosed in quotation marks or not.”
+ //
+ // Unfortunately, it provides no means of escaping interior quotation marks
+ // within that program name, and we have no way to report them here.
+ prog := args[0]
+ mustQuote := len(prog) == 0
+ for i := 0; i < len(prog); i++ {
+ c := prog[i]
+ if c <= ' ' || (c == '"' && i == 0) {
+ // Force quotes for not only the ASCII space and tab as described in the
+ // MSDN article, but also ASCII control characters.
+ // The documentation for CommandLineToArgvW doesn't say what happens when
+ // the first argument is not a valid program name, but it empirically
+ // seems to drop unquoted control characters.
+ mustQuote = true
+ break
+ }
+ }
+ var commandLine []byte
+ if mustQuote {
+ commandLine = make([]byte, 0, len(prog)+2)
+ commandLine = append(commandLine, '"')
+ for i := 0; i < len(prog); i++ {
+ c := prog[i]
+ if c == '"' {
+ // This quote would interfere with our surrounding quotes.
+ // We have no way to report an error, so just strip out
+ // the offending character instead.
+ continue
+ }
+ commandLine = append(commandLine, c)
}
- commandLine += EscapeArg(args[i])
+ commandLine = append(commandLine, '"')
+ } else {
+ if len(args) == 1 {
+ // args[0] is a valid command line representing itself.
+ // No need to allocate a new slice or string for it.
+ return prog
+ }
+ commandLine = []byte(prog)
}
- return commandLine
+
+ for _, arg := range args[1:] {
+ commandLine = append(commandLine, ' ')
+ // TODO(bcmills): since we're already appending to a slice, it would be nice
+ // to avoid the intermediate allocations of EscapeArg.
+ // Perhaps we can factor out an appendEscapedArg function.
+ commandLine = append(commandLine, EscapeArg(arg)...)
+ }
+ return string(commandLine)
}
// DecomposeCommandLine breaks apart its argument command line into unescaped parts using CommandLineToArgv,
// as gathered from GetCommandLine, QUERY_SERVICE_CONFIG's BinaryPathName argument, or elsewhere that
// command lines are passed around.
-// DecomposeCommandLine returns error if commandLine contains NUL.
+// DecomposeCommandLine returns an error if commandLine contains NUL.
func DecomposeCommandLine(commandLine string) ([]string, error) {
if len(commandLine) == 0 {
return []string{}, nil
@@ -105,18 +153,35 @@ func DecomposeCommandLine(commandLine string) ([]string, error) {
return nil, errorspkg.New("string with NUL passed to DecomposeCommandLine")
}
var argc int32
- argv, err := CommandLineToArgv(&utf16CommandLine[0], &argc)
+ argv, err := commandLineToArgv(&utf16CommandLine[0], &argc)
if err != nil {
return nil, err
}
defer LocalFree(Handle(unsafe.Pointer(argv)))
+
var args []string
- for _, v := range (*argv)[:argc] {
- args = append(args, UTF16ToString((*v)[:]))
+ for _, p := range unsafe.Slice(argv, argc) {
+ args = append(args, UTF16PtrToString(p))
}
return args, nil
}
+// CommandLineToArgv parses a Unicode command line string and sets
+// argc to the number of parsed arguments.
+//
+// The returned memory should be freed using a single call to LocalFree.
+//
+// Note that although the return type of CommandLineToArgv indicates 8192
+// entries of up to 8192 characters each, the actual count of parsed arguments
+// may exceed 8192, and the documentation for CommandLineToArgvW does not mention
+// any bound on the lengths of the individual argument strings.
+// (See https://go.dev/issue/63236.)
+func CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) {
+ argp, err := commandLineToArgv(cmd, argc)
+ argv = (*[8192]*[8192]uint16)(unsafe.Pointer(argp))
+ return argv, err
+}
+
func CloseOnExec(fd Handle) {
SetHandleInformation(Handle(fd), HANDLE_FLAG_INHERIT, 0)
}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/mksyscall.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/mksyscall.go
index 8563f79c57..dbcdb090c0 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/mksyscall.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/mksyscall.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build generate
-// +build generate
package windows
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/race.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/race.go
index 9196b089ca..0f1bdc3860 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/race.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/race.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build windows && race
-// +build windows,race
package windows
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/race0.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/race0.go
index 7bae4817a0..0c78da78b1 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/race0.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/race0.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build windows && !race
-// +build windows,!race
package windows
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/security_windows.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/security_windows.go
index d414ef13be..26be94a8a7 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/security_windows.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/security_windows.go
@@ -7,8 +7,6 @@ package windows
import (
"syscall"
"unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
)
const (
@@ -1341,21 +1339,14 @@ func (selfRelativeSD *SECURITY_DESCRIPTOR) copySelfRelativeSecurityDescriptor()
sdLen = min
}
- var src []byte
- h := (*unsafeheader.Slice)(unsafe.Pointer(&src))
- h.Data = unsafe.Pointer(selfRelativeSD)
- h.Len = sdLen
- h.Cap = sdLen
-
+ src := unsafe.Slice((*byte)(unsafe.Pointer(selfRelativeSD)), sdLen)
+ // SECURITY_DESCRIPTOR has pointers in it, which means checkptr expects for it to
+ // be aligned properly. When we're copying a Windows-allocated struct to a
+ // Go-allocated one, make sure that the Go allocation is aligned to the
+ // pointer size.
const psize = int(unsafe.Sizeof(uintptr(0)))
-
- var dst []byte
- h = (*unsafeheader.Slice)(unsafe.Pointer(&dst))
alloc := make([]uintptr, (sdLen+psize-1)/psize)
- h.Data = (*unsafeheader.Slice)(unsafe.Pointer(&alloc)).Data
- h.Len = sdLen
- h.Cap = sdLen
-
+ dst := unsafe.Slice((*byte)(unsafe.Pointer(&alloc[0])), sdLen)
copy(dst, src)
return (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&dst[0]))
}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/service.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/service.go
index c964b6848d..a9dc6308d6 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/service.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/service.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build windows
-// +build windows
package windows
@@ -218,6 +217,10 @@ type SERVICE_FAILURE_ACTIONS struct {
Actions *SC_ACTION
}
+type SERVICE_FAILURE_ACTIONS_FLAG struct {
+ FailureActionsOnNonCrashFailures int32
+}
+
type SC_ACTION struct {
Type uint32
Delay uint32
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/str.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/str.go
index 4fc01434e4..6a4f9ce6aa 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/str.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/str.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build windows
-// +build windows
package windows
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/syscall.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/syscall.go
index 8732cdb957..e85ed6b9c8 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/syscall.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/syscall.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build windows
-// +build windows
// Package windows contains an interface to the low-level operating system
// primitives. OS details vary depending on the underlying system, and
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/syscall_windows.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/syscall_windows.go
index 3723b2c224..6395a031d4 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -15,8 +15,6 @@ import (
"time"
"unicode/utf16"
"unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
)
type Handle uintptr
@@ -127,22 +125,21 @@ func UTF16PtrToString(p *uint16) string {
for ptr := unsafe.Pointer(p); *(*uint16)(ptr) != 0; n++ {
ptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p))
}
-
- return string(utf16.Decode(unsafe.Slice(p, n)))
+ return UTF16ToString(unsafe.Slice(p, n))
}
func Getpagesize() int { return 4096 }
// NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention.
// This is useful when interoperating with Windows code requiring callbacks.
-// The argument is expected to be a function with with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr.
+// The argument is expected to be a function with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr.
func NewCallback(fn interface{}) uintptr {
return syscall.NewCallback(fn)
}
// NewCallbackCDecl converts a Go function to a function pointer conforming to the cdecl calling convention.
// This is useful when interoperating with Windows code requiring callbacks.
-// The argument is expected to be a function with with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr.
+// The argument is expected to be a function with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr.
func NewCallbackCDecl(fn interface{}) uintptr {
return syscall.NewCallbackCDecl(fn)
}
@@ -157,6 +154,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) = kernel32.GetModuleFileNameW
//sys GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) = kernel32.GetModuleHandleExW
//sys SetDefaultDllDirectories(directoryFlags uint32) (err error)
+//sys AddDllDirectory(path *uint16) (cookie uintptr, err error) = kernel32.AddDllDirectory
+//sys RemoveDllDirectory(cookie uintptr) (err error) = kernel32.RemoveDllDirectory
//sys SetDllDirectory(path string) (err error) = kernel32.SetDllDirectoryW
//sys GetVersion() (ver uint32, err error)
//sys FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) = FormatMessageW
@@ -194,6 +193,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys GetComputerName(buf *uint16, n *uint32) (err error) = GetComputerNameW
//sys GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) = GetComputerNameExW
//sys SetEndOfFile(handle Handle) (err error)
+//sys SetFileValidData(handle Handle, validDataLength int64) (err error)
//sys GetSystemTimeAsFileTime(time *Filetime)
//sys GetSystemTimePreciseAsFileTime(time *Filetime)
//sys GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) [failretval==0xffffffff]
@@ -216,7 +216,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) = shell32.SHGetKnownFolderPath
//sys TerminateProcess(handle Handle, exitcode uint32) (err error)
//sys GetExitCodeProcess(handle Handle, exitcode *uint32) (err error)
-//sys GetStartupInfo(startupInfo *StartupInfo) (err error) = GetStartupInfoW
+//sys getStartupInfo(startupInfo *StartupInfo) = GetStartupInfoW
//sys GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error)
//sys DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error)
//sys WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) [failretval==0xffffffff]
@@ -235,12 +235,13 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) = userenv.CreateEnvironmentBlock
//sys DestroyEnvironmentBlock(block *uint16) (err error) = userenv.DestroyEnvironmentBlock
//sys getTickCount64() (ms uint64) = kernel32.GetTickCount64
+//sys GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error)
//sys SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error)
//sys GetFileAttributes(name *uint16) (attrs uint32, err error) [failretval==INVALID_FILE_ATTRIBUTES] = kernel32.GetFileAttributesW
//sys SetFileAttributes(name *uint16, attrs uint32) (err error) = kernel32.SetFileAttributesW
//sys GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) = kernel32.GetFileAttributesExW
//sys GetCommandLine() (cmd *uint16) = kernel32.GetCommandLineW
-//sys CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) [failretval==nil] = shell32.CommandLineToArgvW
+//sys commandLineToArgv(cmd *uint16, argc *int32) (argv **uint16, err error) [failretval==nil] = shell32.CommandLineToArgvW
//sys LocalFree(hmem Handle) (handle Handle, err error) [failretval!=0]
//sys LocalAlloc(flags uint32, length uint32) (ptr uintptr, err error)
//sys SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error)
@@ -299,12 +300,15 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys RegNotifyChangeKeyValue(key Handle, watchSubtree bool, notifyFilter uint32, event Handle, asynchronous bool) (regerrno error) = advapi32.RegNotifyChangeKeyValue
//sys GetCurrentProcessId() (pid uint32) = kernel32.GetCurrentProcessId
//sys ProcessIdToSessionId(pid uint32, sessionid *uint32) (err error) = kernel32.ProcessIdToSessionId
+//sys ClosePseudoConsole(console Handle) = kernel32.ClosePseudoConsole
+//sys createPseudoConsole(size uint32, in Handle, out Handle, flags uint32, pconsole *Handle) (hr error) = kernel32.CreatePseudoConsole
//sys GetConsoleMode(console Handle, mode *uint32) (err error) = kernel32.GetConsoleMode
//sys SetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode
//sys GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo
//sys setConsoleCursorPosition(console Handle, position uint32) (err error) = kernel32.SetConsoleCursorPosition
//sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW
//sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW
+//sys resizePseudoConsole(pconsole Handle, size uint32) (hr error) = kernel32.ResizePseudoConsole
//sys CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot
//sys Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32FirstW
//sys Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32NextW
@@ -405,7 +409,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) = version.VerQueryValueW
// Process Status API (PSAPI)
-//sys EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
+//sys enumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
//sys EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) = psapi.EnumProcessModules
//sys EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) = psapi.EnumProcessModulesEx
//sys GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) = psapi.GetModuleInformation
@@ -437,6 +441,10 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmGetWindowAttribute
//sys DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmSetWindowAttribute
+// Windows Multimedia API
+//sys TimeBeginPeriod (period uint32) (err error) [failretval != 0] = winmm.timeBeginPeriod
+//sys TimeEndPeriod (period uint32) (err error) [failretval != 0] = winmm.timeEndPeriod
+
// syscall interface implementation for other packages
// GetCurrentProcess returns the handle for the current process.
@@ -964,7 +972,8 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, int32, error) {
if n > 0 {
sl += int32(n) + 1
}
- if sa.raw.Path[0] == '@' {
+ if sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) {
+ // Check sl > 3 so we don't change unnamed socket behavior.
sa.raw.Path[0] = 0
// Don't count trailing NUL for abstract address.
sl--
@@ -1354,6 +1363,17 @@ func SetsockoptIPv6Mreq(fd Handle, level, opt int, mreq *IPv6Mreq) (err error) {
return syscall.EWINDOWS
}
+func EnumProcesses(processIds []uint32, bytesReturned *uint32) error {
+ // EnumProcesses syscall expects the size parameter to be in bytes, but the code generated with mksyscall uses
+ // the length of the processIds slice instead. Hence, this wrapper function is added to fix the discrepancy.
+ var p *uint32
+ if len(processIds) > 0 {
+ p = &processIds[0]
+ }
+ size := uint32(len(processIds) * 4)
+ return enumProcesses(p, size, bytesReturned)
+}
+
func Getpid() (pid int) { return int(GetCurrentProcessId()) }
func FindFirstFile(name *uint16, data *Win32finddata) (handle Handle, err error) {
@@ -1613,6 +1633,11 @@ func SetConsoleCursorPosition(console Handle, position Coord) error {
return setConsoleCursorPosition(console, *((*uint32)(unsafe.Pointer(&position))))
}
+func GetStartupInfo(startupInfo *StartupInfo) error {
+ getStartupInfo(startupInfo)
+ return nil
+}
+
func (s NTStatus) Errno() syscall.Errno {
return rtlNtStatusToDosErrorNoTeb(s)
}
@@ -1647,12 +1672,8 @@ func NewNTUnicodeString(s string) (*NTUnicodeString, error) {
// Slice returns a uint16 slice that aliases the data in the NTUnicodeString.
func (s *NTUnicodeString) Slice() []uint16 {
- var slice []uint16
- hdr := (*unsafeheader.Slice)(unsafe.Pointer(&slice))
- hdr.Data = unsafe.Pointer(s.Buffer)
- hdr.Len = int(s.Length)
- hdr.Cap = int(s.MaximumLength)
- return slice
+ slice := unsafe.Slice(s.Buffer, s.MaximumLength)
+ return slice[:s.Length]
}
func (s *NTUnicodeString) String() string {
@@ -1675,12 +1696,8 @@ func NewNTString(s string) (*NTString, error) {
// Slice returns a byte slice that aliases the data in the NTString.
func (s *NTString) Slice() []byte {
- var slice []byte
- hdr := (*unsafeheader.Slice)(unsafe.Pointer(&slice))
- hdr.Data = unsafe.Pointer(s.Buffer)
- hdr.Len = int(s.Length)
- hdr.Cap = int(s.MaximumLength)
- return slice
+ slice := unsafe.Slice(s.Buffer, s.MaximumLength)
+ return slice[:s.Length]
}
func (s *NTString) String() string {
@@ -1732,10 +1749,7 @@ func LoadResourceData(module, resInfo Handle) (data []byte, err error) {
if err != nil {
return
}
- h := (*unsafeheader.Slice)(unsafe.Pointer(&data))
- h.Data = unsafe.Pointer(ptr)
- h.Len = int(size)
- h.Cap = int(size)
+ data = unsafe.Slice((*byte)(unsafe.Pointer(ptr)), size)
return
}
@@ -1806,3 +1820,17 @@ type PSAPI_WORKING_SET_EX_INFORMATION struct {
// A PSAPI_WORKING_SET_EX_BLOCK union that indicates the attributes of the page at VirtualAddress.
VirtualAttributes PSAPI_WORKING_SET_EX_BLOCK
}
+
+// CreatePseudoConsole creates a windows pseudo console.
+func CreatePseudoConsole(size Coord, in Handle, out Handle, flags uint32, pconsole *Handle) error {
+ // We need this wrapper to manually cast Coord to uint32. The autogenerated wrappers only
+ // accept arguments that can be casted to uintptr, and Coord can't.
+ return createPseudoConsole(*((*uint32)(unsafe.Pointer(&size))), in, out, flags, pconsole)
+}
+
+// ResizePseudoConsole resizes the internal buffers of the pseudo console to the width and height specified in `size`.
+func ResizePseudoConsole(pconsole Handle, size Coord) error {
+ // We need this wrapper to manually cast Coord to uint32. The autogenerated wrappers only
+ // accept arguments that can be casted to uintptr, and Coord can't.
+ return resizePseudoConsole(pconsole, *((*uint32)(unsafe.Pointer(&size))))
+}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/types_windows.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/types_windows.go
index 88e62a6385..359780f6ac 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/types_windows.go
@@ -247,6 +247,7 @@ const (
PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY = 0x00020007
PROC_THREAD_ATTRIBUTE_UMS_THREAD = 0x00030006
PROC_THREAD_ATTRIBUTE_PROTECTION_LEVEL = 0x0002000b
+ PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE = 0x00020016
)
const (
@@ -1093,7 +1094,33 @@ const (
SOMAXCONN = 0x7fffffff
- TCP_NODELAY = 1
+ TCP_NODELAY = 1
+ TCP_EXPEDITED_1122 = 2
+ TCP_KEEPALIVE = 3
+ TCP_MAXSEG = 4
+ TCP_MAXRT = 5
+ TCP_STDURG = 6
+ TCP_NOURG = 7
+ TCP_ATMARK = 8
+ TCP_NOSYNRETRIES = 9
+ TCP_TIMESTAMPS = 10
+ TCP_OFFLOAD_PREFERENCE = 11
+ TCP_CONGESTION_ALGORITHM = 12
+ TCP_DELAY_FIN_ACK = 13
+ TCP_MAXRTMS = 14
+ TCP_FASTOPEN = 15
+ TCP_KEEPCNT = 16
+ TCP_KEEPIDLE = TCP_KEEPALIVE
+ TCP_KEEPINTVL = 17
+ TCP_FAIL_CONNECT_ON_ICMP_ERROR = 18
+ TCP_ICMP_ERROR_INFO = 19
+
+ UDP_NOCHECKSUM = 1
+ UDP_SEND_MSG_SIZE = 2
+ UDP_RECV_MAX_COALESCED_SIZE = 3
+ UDP_CHECKSUM_COVERAGE = 20
+
+ UDP_COALESCED_INFO = 3
SHUT_RD = 0
SHUT_WR = 1
@@ -2139,6 +2166,12 @@ const (
ENABLE_LVB_GRID_WORLDWIDE = 0x10
)
+// Pseudo console related constants used for the flags parameter to
+// CreatePseudoConsole. See: https://learn.microsoft.com/en-us/windows/console/createpseudoconsole
+const (
+ PSEUDOCONSOLE_INHERIT_CURSOR = 0x1
+)
+
type Coord struct {
X int16
Y int16
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index a81ea2c700..e8791c82c3 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -55,6 +55,7 @@ var (
moduser32 = NewLazySystemDLL("user32.dll")
moduserenv = NewLazySystemDLL("userenv.dll")
modversion = NewLazySystemDLL("version.dll")
+ modwinmm = NewLazySystemDLL("winmm.dll")
modwintrust = NewLazySystemDLL("wintrust.dll")
modws2_32 = NewLazySystemDLL("ws2_32.dll")
modwtsapi32 = NewLazySystemDLL("wtsapi32.dll")
@@ -183,10 +184,12 @@ var (
procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx")
procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
+ procAddDllDirectory = modkernel32.NewProc("AddDllDirectory")
procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject")
procCancelIo = modkernel32.NewProc("CancelIo")
procCancelIoEx = modkernel32.NewProc("CancelIoEx")
procCloseHandle = modkernel32.NewProc("CloseHandle")
+ procClosePseudoConsole = modkernel32.NewProc("ClosePseudoConsole")
procConnectNamedPipe = modkernel32.NewProc("ConnectNamedPipe")
procCreateDirectoryW = modkernel32.NewProc("CreateDirectoryW")
procCreateEventExW = modkernel32.NewProc("CreateEventExW")
@@ -201,6 +204,7 @@ var (
procCreateNamedPipeW = modkernel32.NewProc("CreateNamedPipeW")
procCreatePipe = modkernel32.NewProc("CreatePipe")
procCreateProcessW = modkernel32.NewProc("CreateProcessW")
+ procCreatePseudoConsole = modkernel32.NewProc("CreatePseudoConsole")
procCreateSymbolicLinkW = modkernel32.NewProc("CreateSymbolicLinkW")
procCreateToolhelp32Snapshot = modkernel32.NewProc("CreateToolhelp32Snapshot")
procDefineDosDeviceW = modkernel32.NewProc("DefineDosDeviceW")
@@ -250,6 +254,7 @@ var (
procGetFileAttributesW = modkernel32.NewProc("GetFileAttributesW")
procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle")
procGetFileInformationByHandleEx = modkernel32.NewProc("GetFileInformationByHandleEx")
+ procGetFileTime = modkernel32.NewProc("GetFileTime")
procGetFileType = modkernel32.NewProc("GetFileType")
procGetFinalPathNameByHandleW = modkernel32.NewProc("GetFinalPathNameByHandleW")
procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW")
@@ -326,7 +331,9 @@ var (
procReadProcessMemory = modkernel32.NewProc("ReadProcessMemory")
procReleaseMutex = modkernel32.NewProc("ReleaseMutex")
procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW")
+ procRemoveDllDirectory = modkernel32.NewProc("RemoveDllDirectory")
procResetEvent = modkernel32.NewProc("ResetEvent")
+ procResizePseudoConsole = modkernel32.NewProc("ResizePseudoConsole")
procResumeThread = modkernel32.NewProc("ResumeThread")
procSetCommTimeouts = modkernel32.NewProc("SetCommTimeouts")
procSetConsoleCursorPosition = modkernel32.NewProc("SetConsoleCursorPosition")
@@ -335,6 +342,7 @@ var (
procSetDefaultDllDirectories = modkernel32.NewProc("SetDefaultDllDirectories")
procSetDllDirectoryW = modkernel32.NewProc("SetDllDirectoryW")
procSetEndOfFile = modkernel32.NewProc("SetEndOfFile")
+ procSetFileValidData = modkernel32.NewProc("SetFileValidData")
procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW")
procSetErrorMode = modkernel32.NewProc("SetErrorMode")
procSetEvent = modkernel32.NewProc("SetEvent")
@@ -468,6 +476,8 @@ var (
procGetFileVersionInfoSizeW = modversion.NewProc("GetFileVersionInfoSizeW")
procGetFileVersionInfoW = modversion.NewProc("GetFileVersionInfoW")
procVerQueryValueW = modversion.NewProc("VerQueryValueW")
+ proctimeBeginPeriod = modwinmm.NewProc("timeBeginPeriod")
+ proctimeEndPeriod = modwinmm.NewProc("timeEndPeriod")
procWinVerifyTrustEx = modwintrust.NewProc("WinVerifyTrustEx")
procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW")
procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW")
@@ -1598,6 +1608,15 @@ func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
return
}
+func AddDllDirectory(path *uint16) (cookie uintptr, err error) {
+ r0, _, e1 := syscall.Syscall(procAddDllDirectory.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
+ cookie = uintptr(r0)
+ if cookie == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func AssignProcessToJobObject(job Handle, process Handle) (err error) {
r1, _, e1 := syscall.Syscall(procAssignProcessToJobObject.Addr(), 2, uintptr(job), uintptr(process), 0)
if r1 == 0 {
@@ -1630,6 +1649,11 @@ func CloseHandle(handle Handle) (err error) {
return
}
+func ClosePseudoConsole(console Handle) {
+ syscall.Syscall(procClosePseudoConsole.Addr(), 1, uintptr(console), 0, 0)
+ return
+}
+
func ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) {
r1, _, e1 := syscall.Syscall(procConnectNamedPipe.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(overlapped)), 0)
if r1 == 0 {
@@ -1759,6 +1783,14 @@ func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityA
return
}
+func createPseudoConsole(size uint32, in Handle, out Handle, flags uint32, pconsole *Handle) (hr error) {
+ r0, _, _ := syscall.Syscall6(procCreatePseudoConsole.Addr(), 5, uintptr(size), uintptr(in), uintptr(out), uintptr(flags), uintptr(unsafe.Pointer(pconsole)), 0)
+ if r0 != 0 {
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
func CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) {
r1, _, e1 := syscall.Syscall(procCreateSymbolicLinkW.Addr(), 3, uintptr(unsafe.Pointer(symlinkfilename)), uintptr(unsafe.Pointer(targetfilename)), uintptr(flags))
if r1&0xff == 0 {
@@ -2166,6 +2198,14 @@ func GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte,
return
}
+func GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func GetFileType(filehandle Handle) (n uint32, err error) {
r0, _, e1 := syscall.Syscall(procGetFileType.Addr(), 1, uintptr(filehandle), 0, 0)
n = uint32(r0)
@@ -2367,11 +2407,8 @@ func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uin
return
}
-func GetStartupInfo(startupInfo *StartupInfo) (err error) {
- r1, _, e1 := syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0)
- if r1 == 0 {
- err = errnoErr(e1)
- }
+func getStartupInfo(startupInfo *StartupInfo) {
+ syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0)
return
}
@@ -2854,6 +2891,14 @@ func RemoveDirectory(path *uint16) (err error) {
return
}
+func RemoveDllDirectory(cookie uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall(procRemoveDllDirectory.Addr(), 1, uintptr(cookie), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func ResetEvent(event Handle) (err error) {
r1, _, e1 := syscall.Syscall(procResetEvent.Addr(), 1, uintptr(event), 0, 0)
if r1 == 0 {
@@ -2862,6 +2907,14 @@ func ResetEvent(event Handle) (err error) {
return
}
+func resizePseudoConsole(pconsole Handle, size uint32) (hr error) {
+ r0, _, _ := syscall.Syscall(procResizePseudoConsole.Addr(), 2, uintptr(pconsole), uintptr(size), 0)
+ if r0 != 0 {
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
func ResumeThread(thread Handle) (ret uint32, err error) {
r0, _, e1 := syscall.Syscall(procResumeThread.Addr(), 1, uintptr(thread), 0, 0)
ret = uint32(r0)
@@ -2936,6 +2989,14 @@ func SetEndOfFile(handle Handle) (err error) {
return
}
+func SetFileValidData(handle Handle, validDataLength int64) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetFileValidData.Addr(), 2, uintptr(handle), uintptr(validDataLength), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func SetEnvironmentVariable(name *uint16, value *uint16) (err error) {
r1, _, e1 := syscall.Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0)
if r1 == 0 {
@@ -3516,12 +3577,8 @@ func EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *u
return
}
-func EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) {
- var _p0 *uint32
- if len(processIds) > 0 {
- _p0 = &processIds[0]
- }
- r1, _, e1 := syscall.Syscall(procEnumProcesses.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(processIds)), uintptr(unsafe.Pointer(bytesReturned)))
+func enumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procEnumProcesses.Addr(), 3, uintptr(unsafe.Pointer(processIds)), uintptr(nSize), uintptr(unsafe.Pointer(bytesReturned)))
if r1 == 0 {
err = errnoErr(e1)
}
@@ -3824,9 +3881,9 @@ func setupUninstallOEMInf(infFileName *uint16, flags SUOI, reserved uintptr) (er
return
}
-func CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) {
+func commandLineToArgv(cmd *uint16, argc *int32) (argv **uint16, err error) {
r0, _, e1 := syscall.Syscall(procCommandLineToArgvW.Addr(), 2, uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)), 0)
- argv = (*[8192]*[8192]uint16)(unsafe.Pointer(r0))
+ argv = (**uint16)(unsafe.Pointer(r0))
if argv == nil {
err = errnoErr(e1)
}
@@ -4021,6 +4078,22 @@ func _VerQueryValue(block unsafe.Pointer, subBlock *uint16, pointerToBufferPoint
return
}
+func TimeBeginPeriod(period uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(proctimeBeginPeriod.Addr(), 1, uintptr(period), 0, 0)
+ if r1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func TimeEndPeriod(period uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(proctimeEndPeriod.Addr(), 1, uintptr(period), 0, 0)
+ if r1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) {
r0, _, _ := syscall.Syscall(procWinVerifyTrustEx.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(actionId)), uintptr(unsafe.Pointer(data)))
if r0 != 0 {
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unix.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unix.go
index a4e31ab1b2..1ad0ddfe30 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unix.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package term
@@ -60,7 +59,7 @@ func restore(fd int, state *State) error {
func getSize(fd int) (width, height int, err error) {
ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
if err != nil {
- return -1, -1, err
+ return 0, 0, err
}
return int(ws.Col), int(ws.Row), nil
}
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unix_bsd.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unix_bsd.go
index 853b3d6986..9dbf546298 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unix_bsd.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unix_bsd.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || dragonfly || freebsd || netbsd || openbsd
-// +build darwin dragonfly freebsd netbsd openbsd
package term
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unix_other.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unix_other.go
index 1e8955c934..1b36de799a 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unix_other.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unix_other.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || linux || solaris || zos
-// +build aix linux solaris zos
package term
diff --git a/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unsupported.go b/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unsupported.go
index f1df850651..3c409e5885 100644
--- a/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unsupported.go
+++ b/trunk/3rdparty/srs-bench/vendor/golang.org/x/term/term_unsupported.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !zos && !windows && !solaris && !plan9
-// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!zos,!windows,!solaris,!plan9
package term
diff --git a/trunk/3rdparty/srs-bench/vendor/modules.txt b/trunk/3rdparty/srs-bench/vendor/modules.txt
index 5c2db51abe..6bc1276680 100644
--- a/trunk/3rdparty/srs-bench/vendor/modules.txt
+++ b/trunk/3rdparty/srs-bench/vendor/modules.txt
@@ -30,6 +30,9 @@ github.com/google/gopacket/pcapgo
# github.com/google/uuid v1.3.0
## explicit
github.com/google/uuid
+# github.com/haivision/srtgo v0.0.0-20230627061225-a70d53fcd618
+## explicit; go 1.12
+github.com/haivision/srtgo
# github.com/konsorten/go-windows-terminal-sequences v1.0.2
## explicit
github.com/konsorten/go-windows-terminal-sequences
@@ -39,6 +42,9 @@ github.com/mattn/go-colorable
# github.com/mattn/go-isatty v0.0.8
## explicit
github.com/mattn/go-isatty
+# github.com/mattn/go-pointer v0.0.1
+## explicit
+github.com/mattn/go-pointer
# github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
## explicit
github.com/mgutz/ansi
@@ -164,8 +170,8 @@ github.com/satori/go.uuid
# github.com/sirupsen/logrus v1.4.2
## explicit
github.com/sirupsen/logrus
-# github.com/stretchr/testify v1.8.4
-## explicit; go 1.20
+# github.com/stretchr/testify v1.9.0
+## explicit; go 1.17
github.com/stretchr/testify/assert
github.com/stretchr/testify/require
# github.com/tevino/abool v0.0.0-20170917061928-9b9efcf221b5
@@ -180,15 +186,15 @@ github.com/yapingcat/gomedia/codec
# github.com/yapingcat/gomedia/mpeg2 v0.0.0-20220617074658-94762898dc25
## explicit; go 1.16
github.com/yapingcat/gomedia/mpeg2
-# golang.org/x/crypto v0.9.0
-## explicit; go 1.17
+# golang.org/x/crypto v0.21.0
+## explicit; go 1.18
golang.org/x/crypto/cryptobyte
golang.org/x/crypto/cryptobyte/asn1
golang.org/x/crypto/curve25519
golang.org/x/crypto/curve25519/internal/field
golang.org/x/crypto/ssh/terminal
-# golang.org/x/net v0.10.0
-## explicit; go 1.17
+# golang.org/x/net v0.21.0
+## explicit; go 1.18
golang.org/x/net/bpf
golang.org/x/net/dns/dnsmessage
golang.org/x/net/internal/iana
@@ -196,15 +202,14 @@ golang.org/x/net/internal/socket
golang.org/x/net/internal/socks
golang.org/x/net/ipv4
golang.org/x/net/proxy
-# golang.org/x/sys v0.8.0
-## explicit; go 1.17
+# golang.org/x/sys v0.18.0
+## explicit; go 1.18
golang.org/x/sys/cpu
-golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/plan9
golang.org/x/sys/unix
golang.org/x/sys/windows
-# golang.org/x/term v0.8.0
-## explicit; go 1.17
+# golang.org/x/term v0.18.0
+## explicit; go 1.18
golang.org/x/term
# gopkg.in/yaml.v3 v3.0.1
## explicit
diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf
index 1d0df76207..7e68466480 100644
--- a/trunk/conf/full.conf
+++ b/trunk/conf/full.conf
@@ -1758,6 +1758,21 @@ vhost dash.srs.com {
# Overwrite by env SRS_VHOST_DASH_DASH_MPD_FILE for all vhosts.
# Default: [app]/[stream].mpd
dash_mpd_file [app]/[stream].mpd;
+ # The dash windows size in seconds.
+ # Overwrite by env SRS_VHOST_DASH_DASH_WINDOW_SIZE for all vhosts.
+ # Default: 5
+ dash_window_size 5;
+ # whether cleanup the old expired dash files.
+ # Overwrite by env SRS_VHOST_DASH_DASH_CLEANUP for all vhosts.
+ # default: on
+ dash_cleanup on;
+ # If there is no incoming packets, dispose DASH in this timeout in seconds,
+ # which removes all DASH files including m3u8 and ts files.
+ # @remark 0 to disable dispose for publisher.
+ # @remark apply for publisher timeout only, while "etc/init.d/srs stop" always dispose DASH.
+ # Overwrite by env SRS_VHOST_DASH_DASH_DISPOSE for all vhosts.
+ # default: 120
+ dash_dispose 120;
}
}
diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md
index d60e25bcc4..8e5f2d4e7b 100644
--- a/trunk/doc/CHANGELOG.md
+++ b/trunk/doc/CHANGELOG.md
@@ -7,6 +7,7 @@ The changelog for SRS.
## SRS 6.0 Changelog
+* v6.0, 2024-06-21, Merge [#4097](https://github.com/ossrs/srs/pull/4097): SmartPtr: Support load test for source by srs-bench. v6.0.130 (#4097)
* v6.0, 2024-06-15, Merge [#4089](https://github.com/ossrs/srs/pull/4089): SmartPtr: Support shared ptr for live source. v6.0.129 (#4089)
* v6.0, 2024-06-14, Merge [#4085](https://github.com/ossrs/srs/pull/4085): SmartPtr: Support shared ptr for RTC source. v6.0.128 (#4085)
* v6.0, 2024-06-13, Merge [#4083](https://github.com/ossrs/srs/pull/4083): SmartPtr: Use shared ptr in RTC TCP connection. v6.0.127 (#4083)
diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp
index 6b0bdb2a4c..36a9007ed5 100644
--- a/trunk/src/app/srs_app_config.cpp
+++ b/trunk/src/app/srs_app_config.cpp
@@ -6863,7 +6863,7 @@ srs_utime_t SrsConfig::get_dash_dispose(std::string vhost)
{
SRS_OVERWRITE_BY_ENV_SECONDS("srs.vhost.dash.dash_dispose"); // SRS_VHOST_DASH_DASH_DISPOSE
- static srs_utime_t DEFAULT = 0;
+ static srs_utime_t DEFAULT = 120;
SrsConfDirective* conf = get_dash(vhost);
if (!conf) {
diff --git a/trunk/src/app/srs_app_dash.cpp b/trunk/src/app/srs_app_dash.cpp
index 7c350dd9ac..29bf527eee 100644
--- a/trunk/src/app/srs_app_dash.cpp
+++ b/trunk/src/app/srs_app_dash.cpp
@@ -705,6 +705,10 @@ void SrsDash::dispose()
srs_error_t SrsDash::cycle()
{
srs_error_t err = srs_success;
+
+ if (!enabled) {
+ return err;
+ }
if (last_update_time_ <= 0) {
last_update_time_ = srs_get_system_time();
@@ -734,6 +738,16 @@ srs_error_t SrsDash::cycle()
return err;
}
+srs_utime_t SrsDash::cleanup_delay()
+{
+ if (!enabled) {
+ return 0;
+ }
+
+ // We use larger timeout to cleanup the HLS, after disposed it if required.
+ return _srs_config->get_dash_dispose(req->vhost) * 1.1;
+}
+
srs_error_t SrsDash::initialize(SrsOriginHub* h, SrsRequest* r)
{
srs_error_t err = srs_success;
diff --git a/trunk/src/app/srs_app_dash.hpp b/trunk/src/app/srs_app_dash.hpp
index b74c46fcc1..ab2fee93f7 100644
--- a/trunk/src/app/srs_app_dash.hpp
+++ b/trunk/src/app/srs_app_dash.hpp
@@ -162,6 +162,7 @@ class SrsDash
public:
virtual void dispose();
virtual srs_error_t cycle();
+ srs_utime_t cleanup_delay();
public:
// Initalize the encoder.
virtual srs_error_t initialize(SrsOriginHub* h, SrsRequest* r);
diff --git a/trunk/src/app/srs_app_hls.cpp b/trunk/src/app/srs_app_hls.cpp
index 21d163a163..5c261d18d7 100644
--- a/trunk/src/app/srs_app_hls.cpp
+++ b/trunk/src/app/srs_app_hls.cpp
@@ -1237,6 +1237,10 @@ srs_error_t SrsHls::cycle()
{
srs_error_t err = srs_success;
+ if (!enabled) {
+ return err;
+ }
+
if (last_update_time <= 0) {
last_update_time = srs_get_system_time();
}
@@ -1272,6 +1276,16 @@ srs_error_t SrsHls::cycle()
return err;
}
+srs_utime_t SrsHls::cleanup_delay()
+{
+ if (!enabled) {
+ return 0;
+ }
+
+ // We use larger timeout to cleanup the HLS, after disposed it if required.
+ return _srs_config->get_hls_dispose(req->vhost) * 1.1;
+}
+
srs_error_t SrsHls::initialize(SrsOriginHub* h, SrsRequest* r)
{
srs_error_t err = srs_success;
diff --git a/trunk/src/app/srs_app_hls.hpp b/trunk/src/app/srs_app_hls.hpp
index 77187d6823..e0866da252 100644
--- a/trunk/src/app/srs_app_hls.hpp
+++ b/trunk/src/app/srs_app_hls.hpp
@@ -313,6 +313,7 @@ class SrsHls
public:
virtual void dispose();
virtual srs_error_t cycle();
+ srs_utime_t cleanup_delay();
public:
// Initialize the hls by handler and source.
virtual srs_error_t initialize(SrsOriginHub* h, SrsRequest* r);
diff --git a/trunk/src/app/srs_app_http_stream.cpp b/trunk/src/app/srs_app_http_stream.cpp
index 914cefd5c6..03e8064c7f 100755
--- a/trunk/src/app/srs_app_http_stream.cpp
+++ b/trunk/src/app/srs_app_http_stream.cpp
@@ -77,6 +77,22 @@ srs_error_t SrsBufferCache::start()
return err;
}
+void SrsBufferCache::stop()
+{
+ trd->stop();
+}
+
+bool SrsBufferCache::alive()
+{
+ srs_error_t err = trd->pull();
+ if (err == srs_success) {
+ return true;
+ }
+
+ srs_freep(err);
+ return false;
+}
+
srs_error_t SrsBufferCache::dump_cache(SrsLiveConsumer* consumer, SrsRtmpJitterAlgorithm jitter)
{
srs_error_t err = srs_success;
@@ -561,6 +577,7 @@ SrsLiveStream::SrsLiveStream(SrsRequest* r, SrsBufferCache* c)
cache = c;
req = r->copy()->as_http();
security_ = new SrsSecurity();
+ alive_ = false;
}
SrsLiveStream::~SrsLiveStream()
@@ -610,14 +627,21 @@ srs_error_t SrsLiveStream::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage
if ((err = http_hooks_on_play(r)) != srs_success) {
return srs_error_wrap(err, "http hook");
}
-
+
+ alive_ = true;
err = do_serve_http(w, r);
+ alive_ = false;
http_hooks_on_stop(r);
return err;
}
+bool SrsLiveStream::alive()
+{
+ return alive_;
+}
+
srs_error_t SrsLiveStream::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
{
srs_error_t err = srs_success;
@@ -929,19 +953,19 @@ SrsHttpStreamServer::~SrsHttpStreamServer()
if (true) {
std::map::iterator it;
- for (it = tflvs.begin(); it != tflvs.end(); ++it) {
+ for (it = templateHandlers.begin(); it != templateHandlers.end(); ++it) {
SrsLiveEntry* entry = it->second;
srs_freep(entry);
}
- tflvs.clear();
+ templateHandlers.clear();
}
if (true) {
std::map::iterator it;
- for (it = sflvs.begin(); it != sflvs.end(); ++it) {
+ for (it = streamHandlers.begin(); it != streamHandlers.end(); ++it) {
SrsLiveEntry* entry = it->second;
srs_freep(entry);
}
- sflvs.clear();
+ streamHandlers.clear();
}
}
@@ -967,12 +991,12 @@ srs_error_t SrsHttpStreamServer::http_mount(SrsRequest* r)
SrsLiveEntry* entry = NULL;
// create stream from template when not found.
- if (sflvs.find(sid) == sflvs.end()) {
- if (tflvs.find(r->vhost) == tflvs.end()) {
+ if (streamHandlers.find(sid) == streamHandlers.end()) {
+ if (templateHandlers.find(r->vhost) == templateHandlers.end()) {
return err;
}
- SrsLiveEntry* tmpl = tflvs[r->vhost];
+ SrsLiveEntry* tmpl = templateHandlers[r->vhost];
std::string mount = tmpl->mount;
@@ -999,16 +1023,16 @@ srs_error_t SrsHttpStreamServer::http_mount(SrsRequest* r)
srs_freep(tmpl->req);
tmpl->req = r->copy()->as_http();
-
- sflvs[sid] = entry;
-
+
+ streamHandlers[sid] = entry;
+
// mount the http flv stream.
// we must register the handler, then start the thread,
// for the thread will cause thread switch context.
if ((err = mux.handle(mount, entry->stream)) != srs_success) {
return srs_error_wrap(err, "http: mount flv stream for vhost=%s failed", sid.c_str());
}
-
+
// start http stream cache thread
if ((err = entry->cache->start()) != srs_success) {
return srs_error_wrap(err, "http: start stream cache failed");
@@ -1016,7 +1040,7 @@ srs_error_t SrsHttpStreamServer::http_mount(SrsRequest* r)
srs_trace("http: mount flv stream for sid=%s, mount=%s", sid.c_str(), mount.c_str());
} else {
// The entry exists, we reuse it and update the request of stream and cache.
- entry = sflvs[sid];
+ entry = streamHandlers[sid];
entry->stream->update_auth(r);
entry->cache->update_auth(r);
}
@@ -1032,13 +1056,40 @@ srs_error_t SrsHttpStreamServer::http_mount(SrsRequest* r)
void SrsHttpStreamServer::http_unmount(SrsRequest* r)
{
std::string sid = r->get_stream_url();
-
- if (sflvs.find(sid) == sflvs.end()) {
+
+ std::map::iterator it = streamHandlers.find(sid);
+ if (it == streamHandlers.end()) {
return;
}
-
- SrsLiveEntry* entry = sflvs[sid];
- entry->stream->entry->enabled = false;
+
+ // Free all HTTP resources.
+ SrsLiveEntry* entry = it->second;
+ SrsAutoFree(SrsLiveEntry, entry);
+ streamHandlers.erase(it);
+
+ SrsLiveStream* stream = entry->stream;
+ SrsAutoFree(SrsLiveStream, stream);
+
+ SrsBufferCache* cache = entry->cache;
+ SrsAutoFree(SrsBufferCache, cache);
+
+ // Unmount the HTTP handler.
+ mux.unhandle(entry->mount, stream);
+
+ // Notify cache and stream to stop.
+ if (stream->entry) stream->entry->enabled = false;
+ cache->stop();
+
+ // Wait for cache and stream to stop.
+ int i = 0;
+ for (; i < 1024; i++) {
+ if (!cache->alive() && !stream->alive()) {
+ break;
+ }
+ srs_usleep(100 * SRS_UTIME_MILLISECONDS);
+ }
+
+ srs_trace("http: unmount flv stream for sid=%s, i=%d", sid.c_str(), i);
}
srs_error_t SrsHttpStreamServer::hijack(ISrsHttpMessage* request, ISrsHttpHandler** ph)
@@ -1067,8 +1118,8 @@ srs_error_t SrsHttpStreamServer::hijack(ISrsHttpMessage* request, ISrsHttpHandle
SrsLiveEntry* entry = NULL;
if (true) {
// no http streaming on vhost, ignore.
- std::map::iterator it = tflvs.find(vhost->arg0());
- if (it == tflvs.end()) {
+ std::map::iterator it = templateHandlers.find(vhost->arg0());
+ if (it == templateHandlers.end()) {
return err;
}
@@ -1124,8 +1175,8 @@ srs_error_t SrsHttpStreamServer::hijack(ISrsHttpMessage* request, ISrsHttpHandle
std::string sid = r->get_stream_url();
// check whether the http remux is enabled,
// for example, user disable the http flv then reload.
- if (sflvs.find(sid) != sflvs.end()) {
- SrsLiveEntry* s_entry = sflvs[sid];
+ if (streamHandlers.find(sid) != streamHandlers.end()) {
+ SrsLiveEntry* s_entry = streamHandlers[sid];
if (!s_entry->stream->entry->enabled) {
// only when the http entry is disabled, check the config whether http flv disable,
// for the http flv edge use hijack to trigger the edge ingester, we always mount it
@@ -1154,8 +1205,8 @@ srs_error_t SrsHttpStreamServer::hijack(ISrsHttpMessage* request, ISrsHttpHandle
// use the handler if exists.
if (ph) {
- if (sflvs.find(sid) != sflvs.end()) {
- entry = sflvs[sid];
+ if (streamHandlers.find(sid) != streamHandlers.end()) {
+ entry = streamHandlers[sid];
*ph = entry->stream;
}
}
@@ -1198,8 +1249,8 @@ srs_error_t SrsHttpStreamServer::initialize_flv_entry(std::string vhost)
}
SrsLiveEntry* entry = new SrsLiveEntry(_srs_config->get_vhost_http_remux_mount(vhost));
-
- tflvs[vhost] = entry;
+
+ templateHandlers[vhost] = entry;
srs_trace("http flv live stream, vhost=%s, mount=%s", vhost.c_str(), entry->mount.c_str());
return err;
diff --git a/trunk/src/app/srs_app_http_stream.hpp b/trunk/src/app/srs_app_http_stream.hpp
index b3962d072c..272c3b1bda 100755
--- a/trunk/src/app/srs_app_http_stream.hpp
+++ b/trunk/src/app/srs_app_http_stream.hpp
@@ -31,6 +31,8 @@ class SrsBufferCache : public ISrsCoroutineHandler
virtual srs_error_t update_auth(SrsRequest* r);
public:
virtual srs_error_t start();
+ virtual void stop();
+ virtual bool alive();
virtual srs_error_t dump_cache(SrsLiveConsumer* consumer, SrsRtmpJitterAlgorithm jitter);
// Interface ISrsEndlessThreadHandler.
public:
@@ -179,12 +181,14 @@ class SrsLiveStream : public ISrsHttpHandler
SrsRequest* req;
SrsBufferCache* cache;
SrsSecurity* security_;
+ bool alive_;
public:
SrsLiveStream(SrsRequest* r, SrsBufferCache* c);
virtual ~SrsLiveStream();
virtual srs_error_t update_auth(SrsRequest* r);
public:
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
+ virtual bool alive();
private:
virtual srs_error_t do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
virtual srs_error_t http_hooks_on_play(ISrsHttpMessage* r);
@@ -230,9 +234,9 @@ class SrsHttpStreamServer : public ISrsReloadHandler
public:
SrsHttpServeMux mux;
// The http live streaming template, to create streams.
- std::map tflvs;
- // The http live streaming streams, crote by template.
- std::map sflvs;
+ std::map templateHandlers;
+ // The http live streaming streams, created by template.
+ std::map streamHandlers;
public:
SrsHttpStreamServer(SrsServer* svr);
virtual ~SrsHttpStreamServer();
diff --git a/trunk/src/app/srs_app_rtc_source.cpp b/trunk/src/app/srs_app_rtc_source.cpp
index 7957903d99..21e53c1751 100644
--- a/trunk/src/app/srs_app_rtc_source.cpp
+++ b/trunk/src/app/srs_app_rtc_source.cpp
@@ -71,6 +71,9 @@ using namespace std;
const int kRtpMaxPayloadSize = kRtpPacketSize - 300;
#endif
+// the time to cleanup source.
+#define SRS_RTC_SOURCE_CLEANUP (3 * SRS_UTIME_SECONDS)
+
// TODO: Add this function into SrsRtpMux class.
srs_error_t aac_raw_append_adts_header(SrsSharedPtrMessage* shared_audio, SrsFormat* format, char** pbuf, int* pnn_buf)
{
@@ -244,11 +247,56 @@ void SrsRtcConsumer::on_stream_change(SrsRtcSourceDescription* desc)
SrsRtcSourceManager::SrsRtcSourceManager()
{
lock = srs_mutex_new();
+ timer_ = new SrsHourGlass("sources", this, 1 * SRS_UTIME_SECONDS);
}
SrsRtcSourceManager::~SrsRtcSourceManager()
{
srs_mutex_destroy(lock);
+ srs_freep(timer_);
+}
+
+srs_error_t SrsRtcSourceManager::initialize()
+{
+ return setup_ticks();
+}
+
+srs_error_t SrsRtcSourceManager::setup_ticks()
+{
+ srs_error_t err = srs_success;
+
+ if ((err = timer_->tick(1, 3 * SRS_UTIME_SECONDS)) != srs_success) {
+ return srs_error_wrap(err, "tick");
+ }
+
+ if ((err = timer_->start()) != srs_success) {
+ return srs_error_wrap(err, "timer");
+ }
+
+ return err;
+}
+
+srs_error_t SrsRtcSourceManager::notify(int event, srs_utime_t interval, srs_utime_t tick)
+{
+ srs_error_t err = srs_success;
+
+ std::map< std::string, SrsSharedPtr >::iterator it;
+ for (it = pool.begin(); it != pool.end();) {
+ SrsSharedPtr& source = it->second;
+
+ // When source expired, remove it.
+ // @see https://github.com/ossrs/srs/issues/713
+ if (source->stream_is_dead()) {
+ SrsContextId cid = source->source_id();
+ if (cid.empty()) cid = source->pre_source_id();
+ srs_trace("RTC: cleanup die source, id=[%s], total=%d", cid.c_str(), (int)pool.size());
+ pool.erase(it++);
+ } else {
+ ++it;
+ }
+ }
+
+ return err;
}
srs_error_t SrsRtcSourceManager::fetch_or_create(SrsRequest* r, SrsSharedPtr& pps)
@@ -305,19 +353,6 @@ SrsSharedPtr SrsRtcSourceManager::fetch(SrsRequest* r)
return source;
}
-void SrsRtcSourceManager::eliminate(SrsRequest* r)
-{
- // Use lock to protect coroutine switch.
- // @bug https://github.com/ossrs/srs/issues/1230
- SrsLocker(lock);
-
- string stream_url = r->get_stream_url();
- std::map< std::string, SrsSharedPtr >::iterator it = pool.find(stream_url);
- if (it != pool.end()) {
- pool.erase(it);
- }
-}
-
SrsRtcSourceManager* _srs_rtc_sources = NULL;
ISrsRtcPublishStream::ISrsRtcPublishStream()
@@ -351,6 +386,7 @@ SrsRtcSource::SrsRtcSource()
#endif
pli_for_rtmp_ = pli_elapsed_ = 0;
+ stream_die_at_ = 0;
}
SrsRtcSource::~SrsRtcSource()
@@ -365,6 +401,10 @@ SrsRtcSource::~SrsRtcSource()
srs_freep(bridge_);
srs_freep(req);
srs_freep(stream_desc_);
+
+ SrsContextId cid = _source_id;
+ if (cid.empty()) cid = _pre_source_id;
+ srs_trace("free rtc source id=[%s]", cid.c_str());
}
srs_error_t SrsRtcSource::initialize(SrsRequest* r)
@@ -380,6 +420,27 @@ srs_error_t SrsRtcSource::initialize(SrsRequest* r)
return err;
}
+bool SrsRtcSource::stream_is_dead()
+{
+ // still publishing?
+ if (is_created_) {
+ return false;
+ }
+
+ // has any consumers?
+ if (!consumers.empty()) {
+ return false;
+ }
+
+ // Delay cleanup source.
+ srs_utime_t now = srs_get_system_time();
+ if (now < stream_die_at_ + SRS_RTC_SOURCE_CLEANUP) {
+ return false;
+ }
+
+ return true;
+}
+
void SrsRtcSource::init_for_play_before_publishing()
{
// If the stream description has already been setup by RTC publisher,
@@ -493,6 +554,8 @@ srs_error_t SrsRtcSource::create_consumer(SrsRtcConsumer*& consumer)
consumer = new SrsRtcConsumer(this);
consumers.push_back(consumer);
+ stream_die_at_ = 0;
+
// TODO: FIXME: Implements edge cluster.
return err;
@@ -526,7 +589,7 @@ void SrsRtcSource::on_consumer_destroy(SrsRtcConsumer* consumer)
// Destroy and cleanup source when no publishers and consumers.
if (!is_created_ && consumers.empty()) {
- _srs_rtc_sources->eliminate(req);
+ stream_die_at_ = srs_get_system_time();
}
}
@@ -629,8 +692,8 @@ void SrsRtcSource::on_unpublish()
stat->on_stream_close(req);
// Destroy and cleanup source when no publishers and consumers.
- if (!is_created_ && consumers.empty()) {
- _srs_rtc_sources->eliminate(req);
+ if (consumers.empty()) {
+ stream_die_at_ = srs_get_system_time();
}
}
diff --git a/trunk/src/app/srs_app_rtc_source.hpp b/trunk/src/app/srs_app_rtc_source.hpp
index 00328527b0..e917316d59 100644
--- a/trunk/src/app/srs_app_rtc_source.hpp
+++ b/trunk/src/app/srs_app_rtc_source.hpp
@@ -111,14 +111,21 @@ class SrsRtcConsumer
void on_stream_change(SrsRtcSourceDescription* desc);
};
-class SrsRtcSourceManager
+class SrsRtcSourceManager : public ISrsHourGlass
{
private:
srs_mutex_t lock;
std::map< std::string, SrsSharedPtr > pool;
+ SrsHourGlass* timer_;
public:
SrsRtcSourceManager();
virtual ~SrsRtcSourceManager();
+public:
+ virtual srs_error_t initialize();
+// interface ISrsHourGlass
+private:
+ virtual srs_error_t setup_ticks();
+ virtual srs_error_t notify(int event, srs_utime_t interval, srs_utime_t tick);
public:
// create source when fetch from cache failed.
// @param r the client request.
@@ -127,9 +134,6 @@ class SrsRtcSourceManager
public:
// Get the exists source, NULL when not exists.
virtual SrsSharedPtr fetch(SrsRequest* r);
-public:
- // Dispose and destroy the source.
- virtual void eliminate(SrsRequest* r);
};
// Global singleton instance.
@@ -195,11 +199,17 @@ class SrsRtcSource : public ISrsFastTimer
// The PLI for RTC2RTMP.
srs_utime_t pli_for_rtmp_;
srs_utime_t pli_elapsed_;
+private:
+ // The last die time, while die means neither publishers nor players.
+ srs_utime_t stream_die_at_;
public:
SrsRtcSource();
virtual ~SrsRtcSource();
public:
virtual srs_error_t initialize(SrsRequest* r);
+public:
+ // Whether stream is dead, which is no publisher or player.
+ virtual bool stream_is_dead();
private:
void init_for_play_before_publishing();
public:
diff --git a/trunk/src/app/srs_app_server.cpp b/trunk/src/app/srs_app_server.cpp
index 2db8738f88..472b7114b3 100644
--- a/trunk/src/app/srs_app_server.cpp
+++ b/trunk/src/app/srs_app_server.cpp
@@ -40,10 +40,14 @@ using namespace std;
#ifdef SRS_RTC
#include
#include
+#include
#endif
#ifdef SRS_GB28181
#include
#endif
+#ifdef SRS_SRT
+#include
+#endif
SrsSignalManager* SrsSignalManager::instance = NULL;
@@ -806,8 +810,20 @@ srs_error_t SrsServer::start(SrsWaitGroup* wg)
srs_error_t err = srs_success;
if ((err = _srs_sources->initialize()) != srs_success) {
- return srs_error_wrap(err, "sources");
+ return srs_error_wrap(err, "live sources");
+ }
+
+#ifdef SRS_SRT
+ if ((err = _srs_srt_sources->initialize()) != srs_success) {
+ return srs_error_wrap(err, "srt sources");
+ }
+#endif
+
+#ifdef SRS_RTC
+ if ((err = _srs_rtc_sources->initialize()) != srs_success) {
+ return srs_error_wrap(err, "rtc sources");
}
+#endif
if ((err = trd_->start()) != srs_success) {
return srs_error_wrap(err, "start");
diff --git a/trunk/src/app/srs_app_source.cpp b/trunk/src/app/srs_app_source.cpp
index 8e84d24aab..03fc657f62 100755
--- a/trunk/src/app/srs_app_source.cpp
+++ b/trunk/src/app/srs_app_source.cpp
@@ -48,7 +48,7 @@ using namespace std;
#define SRS_MIX_CORRECT_PURE_AV 10
// the time to cleanup source.
-#define SRS_SOURCE_CLEANUP (30 * SRS_UTIME_SECONDS)
+#define SRS_SOURCE_CLEANUP (3 * SRS_UTIME_SECONDS)
int srs_time_jitter_string2int(std::string time_jitter)
{
@@ -910,6 +910,13 @@ bool SrsOriginHub::active()
return is_active;
}
+srs_utime_t SrsOriginHub::cleanup_delay()
+{
+ srs_utime_t hls_delay = hls->cleanup_delay();
+ srs_utime_t dash_delay = dash->cleanup_delay();
+ return srs_max(hls_delay, dash_delay);
+}
+
srs_error_t SrsOriginHub::on_meta_data(SrsSharedPtrMessage* shared_metadata, SrsOnMetaDataPacket* packet)
{
srs_error_t err = srs_success;
@@ -1827,7 +1834,7 @@ srs_error_t SrsLiveSourceManager::setup_ticks()
{
srs_error_t err = srs_success;
- if ((err = timer_->tick(1, 1 * SRS_UTIME_SECONDS)) != srs_success) {
+ if ((err = timer_->tick(1, 3 * SRS_UTIME_SECONDS)) != srs_success) {
return srs_error_wrap(err, "tick");
}
@@ -1848,24 +1855,21 @@ srs_error_t SrsLiveSourceManager::notify(int event, srs_utime_t interval, srs_ut
// Do cycle source to cleanup components, such as hls dispose.
if ((err = source->cycle()) != srs_success) {
- return srs_error_wrap(err, "source=%s/%s cycle", source->source_id().c_str(), source->pre_source_id().c_str());
+ SrsContextId cid = source->source_id();
+ if (cid.empty()) cid = source->pre_source_id();
+ return srs_error_wrap(err, "source cycle, id=[%s]", cid.c_str());
}
- // See SrsSrtSource::on_consumer_destroy
- // TODO: FIXME: support source cleanup.
- // @see https://github.com/ossrs/srs/issues/713
-#if 1
// When source expired, remove it.
+ // @see https://github.com/ossrs/srs/issues/713
if (source->stream_is_dead()) {
- const SrsContextId& cid = source->source_id();
- srs_trace("cleanup die source, id=[%s], total=%d", cid.c_str(), (int)pool.size());
+ SrsContextId cid = source->source_id();
+ if (cid.empty()) cid = source->pre_source_id();
+ srs_trace("Live: cleanup die source, id=[%s], total=%d", cid.c_str(), (int)pool.size());
pool.erase(it++);
} else {
++it;
}
-#else
- ++it;
-#endif
}
return err;
@@ -1923,6 +1927,10 @@ SrsLiveSource::~SrsLiveSource()
srs_freep(req);
srs_freep(bridge_);
+
+ SrsContextId cid = _source_id;
+ if (cid.empty()) cid = _pre_source_id;
+ srs_trace("free live source id=[%s]", cid.c_str());
}
void SrsLiveSource::dispose()
@@ -1944,11 +1952,6 @@ srs_error_t SrsLiveSource::cycle()
bool SrsLiveSource::stream_is_dead()
{
- // unknown state?
- if (stream_die_at_ == 0) {
- return false;
- }
-
// still publishing?
if (!_can_publish || !publish_edge->can_publish()) {
return false;
@@ -1958,13 +1961,19 @@ bool SrsLiveSource::stream_is_dead()
if (!consumers.empty()) {
return false;
}
-
+
+ // Delay cleanup source.
srs_utime_t now = srs_get_system_time();
- if (now > stream_die_at_ + SRS_SOURCE_CLEANUP) {
- return true;
+ if (now < stream_die_at_ + SRS_SOURCE_CLEANUP) {
+ return false;
+ }
+
+ // Origin hub delay cleanup.
+ if (now < stream_die_at_ + hub->cleanup_delay()) {
+ return false;
}
- return false;
+ return true;
}
bool SrsLiveSource::publisher_is_idle_for(srs_utime_t timeout)
@@ -2726,6 +2735,11 @@ void SrsLiveSource::on_consumer_destroy(SrsLiveConsumer* consumer)
if (consumers.empty()) {
play_edge->on_all_client_stop();
+ // If no publishers, the stream is die.
+ if (_can_publish) {
+ stream_die_at_ = srs_get_system_time();
+ }
+
// For edge server, the stream die when the last player quit, because the edge stream is created by player
// activities, so it should die when all players quit.
if (_srs_config->get_vhost_is_edge(req->vhost)) {
diff --git a/trunk/src/app/srs_app_source.hpp b/trunk/src/app/srs_app_source.hpp
index 802c2cb202..67d0a48fac 100644
--- a/trunk/src/app/srs_app_source.hpp
+++ b/trunk/src/app/srs_app_source.hpp
@@ -355,6 +355,8 @@ class SrsOriginHub : public ISrsReloadHandler
virtual srs_error_t cycle();
// Whether the stream hub is active, or stream is publishing.
virtual bool active();
+ // The delay cleanup time.
+ srs_utime_t cleanup_delay();
public:
// When got a parsed metadata.
virtual srs_error_t on_meta_data(SrsSharedPtrMessage* shared_metadata, SrsOnMetaDataPacket* packet);
diff --git a/trunk/src/app/srs_app_srt_source.cpp b/trunk/src/app/srs_app_srt_source.cpp
index 6b65c34773..990cb2c133 100644
--- a/trunk/src/app/srs_app_srt_source.cpp
+++ b/trunk/src/app/srs_app_srt_source.cpp
@@ -20,6 +20,9 @@ using namespace std;
#include
#include
+// the time to cleanup source.
+#define SRS_SRT_SOURCE_CLEANUP (3 * SRS_UTIME_SECONDS)
+
SrsSrtPacket::SrsSrtPacket()
{
shared_buffer_ = NULL;
@@ -95,11 +98,56 @@ int SrsSrtPacket::size()
SrsSrtSourceManager::SrsSrtSourceManager()
{
lock = srs_mutex_new();
+ timer_ = new SrsHourGlass("sources", this, 1 * SRS_UTIME_SECONDS);
}
SrsSrtSourceManager::~SrsSrtSourceManager()
{
srs_mutex_destroy(lock);
+ srs_freep(timer_);
+}
+
+srs_error_t SrsSrtSourceManager::initialize()
+{
+ return setup_ticks();
+}
+
+srs_error_t SrsSrtSourceManager::setup_ticks()
+{
+ srs_error_t err = srs_success;
+
+ if ((err = timer_->tick(1, 3 * SRS_UTIME_SECONDS)) != srs_success) {
+ return srs_error_wrap(err, "tick");
+ }
+
+ if ((err = timer_->start()) != srs_success) {
+ return srs_error_wrap(err, "timer");
+ }
+
+ return err;
+}
+
+srs_error_t SrsSrtSourceManager::notify(int event, srs_utime_t interval, srs_utime_t tick)
+{
+ srs_error_t err = srs_success;
+
+ std::map< std::string, SrsSharedPtr >::iterator it;
+ for (it = pool.begin(); it != pool.end();) {
+ SrsSharedPtr& source = it->second;
+
+ // When source expired, remove it.
+ // @see https://github.com/ossrs/srs/issues/713
+ if (source->stream_is_dead()) {
+ SrsContextId cid = source->source_id();
+ if (cid.empty()) cid = source->pre_source_id();
+ srs_trace("SRT: cleanup die source, id=[%s], total=%d", cid.c_str(), (int)pool.size());
+ pool.erase(it++);
+ } else {
+ ++it;
+ }
+ }
+
+ return err;
}
srs_error_t SrsSrtSourceManager::fetch_or_create(SrsRequest* r, SrsSharedPtr& pps)
@@ -137,19 +185,6 @@ srs_error_t SrsSrtSourceManager::fetch_or_create(SrsRequest* r, SrsSharedPtrget_stream_url();
- std::map< std::string, SrsSharedPtr >::iterator it = pool.find(stream_url);
- if (it != pool.end()) {
- pool.erase(it);
- }
-}
-
SrsSrtSourceManager* _srs_srt_sources = NULL;
SrsSrtConsumer::SrsSrtConsumer(SrsSrtSource* s)
@@ -873,6 +908,7 @@ SrsSrtSource::SrsSrtSource()
can_publish_ = true;
frame_builder_ = NULL;
bridge_ = NULL;
+ stream_die_at_ = 0;
}
SrsSrtSource::~SrsSrtSource()
@@ -884,6 +920,10 @@ SrsSrtSource::~SrsSrtSource()
srs_freep(frame_builder_);
srs_freep(bridge_);
srs_freep(req);
+
+ SrsContextId cid = _source_id;
+ if (cid.empty()) cid = _pre_source_id;
+ srs_trace("free srt source id=[%s]", cid.c_str());
}
srs_error_t SrsSrtSource::initialize(SrsRequest* r)
@@ -895,6 +935,27 @@ srs_error_t SrsSrtSource::initialize(SrsRequest* r)
return err;
}
+bool SrsSrtSource::stream_is_dead()
+{
+ // still publishing?
+ if (!can_publish_) {
+ return false;
+ }
+
+ // has any consumers?
+ if (!consumers.empty()) {
+ return false;
+ }
+
+ // Delay cleanup source.
+ srs_utime_t now = srs_get_system_time();
+ if (now < stream_die_at_ + SRS_SRT_SOURCE_CLEANUP) {
+ return false;
+ }
+
+ return true;
+}
+
srs_error_t SrsSrtSource::on_source_id_changed(SrsContextId id)
{
srs_error_t err = srs_success;
@@ -949,6 +1010,8 @@ srs_error_t SrsSrtSource::create_consumer(SrsSrtConsumer*& consumer)
consumer = new SrsSrtConsumer(this);
consumers.push_back(consumer);
+ stream_die_at_ = 0;
+
return err;
}
@@ -972,7 +1035,7 @@ void SrsSrtSource::on_consumer_destroy(SrsSrtConsumer* consumer)
// Destroy and cleanup source when no publishers and consumers.
if (can_publish_ && consumers.empty()) {
- _srs_srt_sources->eliminate(req);
+ stream_die_at_ = srs_get_system_time();
}
}
@@ -1029,8 +1092,8 @@ void SrsSrtSource::on_unpublish()
}
// Destroy and cleanup source when no publishers and consumers.
- if (can_publish_ && consumers.empty()) {
- _srs_srt_sources->eliminate(req);
+ if (consumers.empty()) {
+ stream_die_at_ = srs_get_system_time();
}
}
diff --git a/trunk/src/app/srs_app_srt_source.hpp b/trunk/src/app/srs_app_srt_source.hpp
index 4bb3a014bb..a1c53c0df4 100644
--- a/trunk/src/app/srs_app_srt_source.hpp
+++ b/trunk/src/app/srs_app_srt_source.hpp
@@ -16,6 +16,7 @@
#include
#include
#include
+#include
class SrsSharedPtrMessage;
class SrsRequest;
@@ -47,21 +48,26 @@ class SrsSrtPacket
int actual_buffer_size_;
};
-class SrsSrtSourceManager
+class SrsSrtSourceManager : public ISrsHourGlass
{
private:
srs_mutex_t lock;
std::map< std::string, SrsSharedPtr > pool;
+ SrsHourGlass* timer_;
public:
SrsSrtSourceManager();
virtual ~SrsSrtSourceManager();
+public:
+ virtual srs_error_t initialize();
+// interface ISrsHourGlass
+private:
+ virtual srs_error_t setup_ticks();
+ virtual srs_error_t notify(int event, srs_utime_t interval, srs_utime_t tick);
public:
// create source when fetch from cache failed.
// @param r the client request.
// @param pps the matched source, if success never be NULL.
virtual srs_error_t fetch_or_create(SrsRequest* r, SrsSharedPtr& pps);
- // Dispose and destroy the source.
- virtual void eliminate(SrsRequest* r);
};
// Global singleton instance.
@@ -156,6 +162,9 @@ class SrsSrtSource
virtual ~SrsSrtSource();
public:
virtual srs_error_t initialize(SrsRequest* r);
+public:
+ // Whether stream is dead, which is no publisher or player.
+ virtual bool stream_is_dead();
public:
// The source id changed.
virtual srs_error_t on_source_id_changed(SrsContextId id);
@@ -190,6 +199,8 @@ class SrsSrtSource
// To delivery packets to clients.
std::vector consumers;
bool can_publish_;
+ // The last die time, while die means neither publishers nor players.
+ srs_utime_t stream_die_at_;
private:
SrsSrtFrameBuilder* frame_builder_;
ISrsStreamBridge* bridge_;
diff --git a/trunk/src/core/srs_core_version6.hpp b/trunk/src/core/srs_core_version6.hpp
index 50ebfc6477..3ff7d6edd4 100644
--- a/trunk/src/core/srs_core_version6.hpp
+++ b/trunk/src/core/srs_core_version6.hpp
@@ -9,6 +9,6 @@
#define VERSION_MAJOR 6
#define VERSION_MINOR 0
-#define VERSION_REVISION 129
+#define VERSION_REVISION 130
#endif
diff --git a/trunk/src/protocol/srs_protocol_http_stack.cpp b/trunk/src/protocol/srs_protocol_http_stack.cpp
index 8b02a3175a..375ab3d860 100644
--- a/trunk/src/protocol/srs_protocol_http_stack.cpp
+++ b/trunk/src/protocol/srs_protocol_http_stack.cpp
@@ -691,14 +691,12 @@ srs_error_t SrsHttpServeMux::handle(std::string pattern, ISrsHttpHandler* handle
srs_assert(handler);
if (pattern.empty()) {
- srs_freep(handler);
return srs_error_new(ERROR_HTTP_PATTERN_EMPTY, "empty pattern");
}
if (entries.find(pattern) != entries.end()) {
SrsHttpMuxEntry* exists = entries[pattern];
if (exists->explicit_match) {
- srs_freep(handler);
return srs_error_new(ERROR_HTTP_PATTERN_DUPLICATED, "pattern=%s exists", pattern.c_str());
}
}
@@ -754,6 +752,32 @@ srs_error_t SrsHttpServeMux::handle(std::string pattern, ISrsHttpHandler* handle
return srs_success;
}
+void SrsHttpServeMux::unhandle(std::string pattern, ISrsHttpHandler* handler)
+{
+ if (true) {
+ std::map::iterator it = entries.find(pattern);
+ if (it != entries.end()) {
+ SrsHttpMuxEntry* entry = it->second;
+ entries.erase(it);
+
+ // We don't free the handler, because user should free it.
+ if (entry->handler != handler) {
+ srs_freep(entry);
+ }
+ }
+ }
+
+ std::string vhost = pattern;
+ if (pattern.at(0) != '/') {
+ if (pattern.find("/") != string::npos) {
+ vhost = pattern.substr(0, pattern.find("/"));
+ }
+
+ std::map::iterator it = vhosts.find(vhost);
+ if (it != vhosts.end()) vhosts.erase(it);
+ }
+}
+
srs_error_t SrsHttpServeMux::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
{
srs_error_t err = srs_success;
diff --git a/trunk/src/protocol/srs_protocol_http_stack.hpp b/trunk/src/protocol/srs_protocol_http_stack.hpp
index 9cafb1ba91..fcef24401d 100644
--- a/trunk/src/protocol/srs_protocol_http_stack.hpp
+++ b/trunk/src/protocol/srs_protocol_http_stack.hpp
@@ -470,6 +470,8 @@ class SrsHttpServeMux : public ISrsHttpServeMux
// Handle registers the handler for the given pattern.
// If a handler already exists for pattern, Handle panics.
virtual srs_error_t handle(std::string pattern, ISrsHttpHandler* handler);
+ // Remove the handler for pattern. Note that this will not free the handler.
+ void unhandle(std::string pattern, ISrsHttpHandler* handler);
// Interface ISrsHttpServeMux
public:
virtual srs_error_t serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r);
diff --git a/trunk/src/utest/srs_utest_http.cpp b/trunk/src/utest/srs_utest_http.cpp
index c8a839f0fc..77a42c6e0e 100644
--- a/trunk/src/utest/srs_utest_http.cpp
+++ b/trunk/src/utest/srs_utest_http.cpp
@@ -748,6 +748,7 @@ VOID TEST(ProtocolHTTPTest, HTTPServerMuxerImplicitHandler)
HELPER_ASSERT_SUCCESS(s.handle("/api/", h0));
MockHttpHandler* h1 = new MockHttpHandler("Done");
+ SrsAutoFree(MockHttpHandler, h1);
HELPER_EXPECT_FAILED(s.handle("/api/", h1));
}
@@ -892,6 +893,7 @@ VOID TEST(ProtocolHTTPTest, HTTPServerMuxerBasic)
HELPER_ASSERT_SUCCESS(s.initialize());
MockHttpHandler* h0 = new MockHttpHandler("Hello, world!");
+ SrsAutoFree(MockHttpHandler, h0);
HELPER_EXPECT_FAILED(s.handle("", h0));
}