sys/netbsd: adding lwp syscalls (#1654)

This commit is contained in:
Ayushi Sharma 2020-03-31 17:44:00 +05:30 committed by GitHub
parent c8d1cc20df
commit 46105100bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 30 additions and 10 deletions

16
executor/defs.h generated
View File

@ -20,7 +20,7 @@
#if GOARCH_386
#define GOARCH "386"
#define SYZ_REVISION "d737bca3a95d7c1527152553af5fd06ed07e0240"
#define SYZ_REVISION "5f26711960673de44fd31f907a28d31ee0961cfd"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -70,7 +70,7 @@
#if GOARCH_386
#define GOARCH "386"
#define SYZ_REVISION "873172817a75c81835969c440f232721601a7e13"
#define SYZ_REVISION "75e98c93608f41659c3d7252029fc6e39e7a7ead"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -80,7 +80,7 @@
#if GOARCH_amd64
#define GOARCH "amd64"
#define SYZ_REVISION "670a1e865c0bc7d60e9886acf4666ee3677e346e"
#define SYZ_REVISION "f787d115f9efa49fdd59261850f5c05f43fbe327"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -90,7 +90,7 @@
#if GOARCH_arm
#define GOARCH "arm"
#define SYZ_REVISION "2acbffd4e98df57974fbda9a9c4c9430f308ca4b"
#define SYZ_REVISION "b0c8cefbe08d7cd934dbaf9fe40658f598df8182"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -100,7 +100,7 @@
#if GOARCH_arm64
#define GOARCH "arm64"
#define SYZ_REVISION "1cd77b584307efb2405e0d88b55e10dce8803d4b"
#define SYZ_REVISION "959bb3c00fa0ad1179ddcbeecd12a9677d877ac6"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -110,7 +110,7 @@
#if GOARCH_mips64le
#define GOARCH "mips64le"
#define SYZ_REVISION "27db5f8e0ad7e7466d8fee26159a8361a0e6366f"
#define SYZ_REVISION "46efe6d91b9f65afa502f9ec4e36c1c3b6c75399"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -120,7 +120,7 @@
#if GOARCH_ppc64le
#define GOARCH "ppc64le"
#define SYZ_REVISION "2efe0bc0e3fe08437712654ac1ed750ccb17190f"
#define SYZ_REVISION "f44aca874a4396900cf431e0ac6e5d13b57b0f87"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -135,7 +135,7 @@
#if GOARCH_amd64
#define GOARCH "amd64"
#define SYZ_REVISION "d3d1420e857d9c56cae851245e2205da52b99f68"
#define SYZ_REVISION "a99885ca1ee8b334947a9227591964a15f788ff0"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096

1
executor/syscalls.h generated
View File

@ -21920,6 +21920,7 @@ const call_t syscalls[] = {
{"clock_settime", 428},
{"close", 6},
{"compat_50__lwp_park", 320},
{"compat_60__lwp_park", 434},
{"connect", 98},
{"connect$inet", 98},
{"connect$inet6", 98},

View File

@ -402,6 +402,11 @@ var structDescs_amd64 = []*KeyedStruct{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "sec", TypeSize: 8, ArgDir: 1}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "nsec", TypeSize: 8, ArgDir: 1}}},
}}},
{StructKey{Name: "timespec50"}, &StructDesc{TypeCommon: TypeCommon{TypeName: "timespec50", TypeSize: 16}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "sec", TypeSize: 4}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "nsec", TypeSize: 8}}},
}}},
{StructKey{Name: "timeval"}, &StructDesc{TypeCommon: TypeCommon{TypeName: "timeval", TypeSize: 16}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "sec", TypeSize: 8}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "usec", TypeSize: 8}}},
@ -574,6 +579,12 @@ var syscalls_amd64 = []*Syscall{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
}},
{NR: 320, Name: "compat_50__lwp_park", CallName: "compat_50__lwp_park", Args: []Type{
&PtrType{TypeCommon{TypeName: "ptr", FldName: "ts", TypeSize: 8}, &StructType{Key: StructKey{Name: "timespec50"}}},
&ResourceType{TypeCommon: TypeCommon{TypeName: "lwpid", FldName: "unpark", TypeSize: 4}},
&PtrType{TypeCommon{TypeName: "ptr", FldName: "hint", TypeSize: 8, IsOptional: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", TypeSize: 8}}}},
&PtrType{TypeCommon{TypeName: "ptr", FldName: "unparkhint", TypeSize: 8, IsOptional: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", TypeSize: 8}}}},
}},
{NR: 434, Name: "compat_60__lwp_park", CallName: "compat_60__lwp_park", Args: []Type{
&PtrType{TypeCommon{TypeName: "ptr", FldName: "ts", TypeSize: 8}, &StructType{Key: StructKey{Name: "timespec"}}},
&ResourceType{TypeCommon: TypeCommon{TypeName: "lwpid", FldName: "unpark", TypeSize: 4}},
&PtrType{TypeCommon{TypeName: "ptr", FldName: "hint", TypeSize: 8, IsOptional: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", TypeSize: 8}}}},
@ -1735,6 +1746,7 @@ var consts_amd64 = []ConstValue{
{"SYS_clock_settime", 428},
{"SYS_close", 6},
{"SYS_compat_50__lwp_park", 320},
{"SYS_compat_60__lwp_park", 434},
{"SYS_connect", 98},
{"SYS_dup", 41},
{"SYS_dup2", 90},
@ -1882,4 +1894,4 @@ var consts_amd64 = []ConstValue{
{"_UC_STACK", 2},
}
const revision_amd64 = "d3d1420e857d9c56cae851245e2205da52b99f68"
const revision_amd64 = "a99885ca1ee8b334947a9227591964a15f788ff0"

View File

@ -20,7 +20,8 @@ _lwp_getprivate()
_lwp_setprivate(data ptr[in, intptr])
_lwp_kill(target lwpid, sig int32)
_lwp_detach(target lwpid)
compat_50__lwp_park(ts ptr[in, timespec], unpark lwpid, hint ptr[in, intptr, opt], unparkhint ptr[in, intptr, opt])
compat_50__lwp_park(ts ptr[in, timespec50], unpark lwpid, hint ptr[in, intptr, opt], unparkhint ptr[in, intptr, opt])
compat_60__lwp_park(ts ptr[in, timespec], unpark lwpid, hint ptr[in, intptr, opt], unparkhint ptr[in, intptr, opt])
_lwp_unpark(target lwpid, hint ptr[in, intptr, opt])
_lwp_unpark_all(targets ptr[in, array[lwpid]], ntargets len[targets], hint ptr[in, intptr, opt])
_lwp_setname(target lwpid, name ptr[in, string])

View File

@ -20,6 +20,7 @@ SYS__lwp_unpark_all = 322
SYS__lwp_wait = 312
SYS__lwp_wakeup = 315
SYS_compat_50__lwp_park = 320
SYS_compat_60__lwp_park = 434
_UC_CPU = 4
_UC_FPU = 8
_UC_MD = 1074724896

View File

@ -131,6 +131,11 @@ timespec {
nsec intptr
}
timespec50 {
sec int32
nsec intptr
}
timeval {
sec intptr
usec intptr