From nobody Wed Nov 17 20:22:20 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F27441854B22; Wed, 17 Nov 2021 20:22:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvZ994VCVz4qrc; Wed, 17 Nov 2021 20:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 73865276C5; Wed, 17 Nov 2021 20:22:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AHKMKVX059589; Wed, 17 Nov 2021 20:22:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMKcW059588; Wed, 17 Nov 2021 20:22:20 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:20 GMT Message-Id: <202111172022.1AHKMKcW059588@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 465b80c04a77 - main - freebsd32: thread IDs are int32_t List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 465b80c04a7765a5ccccafddc8eec5f9444f62cf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=465b80c04a7765a5ccccafddc8eec5f9444f62cf commit 465b80c04a7765a5ccccafddc8eec5f9444f62cf Author: Brooks Davis AuthorDate: 2021-11-17 20:12:23 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:23 +0000 freebsd32: thread IDs are int32_t Thread IDs are of type long which means int32_t on 32-bit systems. While this detail is handled without compat functions, expose it here as code to generate prototypes from the default syscalls.master will do so. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_systrace_args.c | 24 ++++++++++++------------ sys/compat/freebsd32/syscalls.master | 12 ++++++------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 5532ba1b942e..0315b0b3f142 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -2028,21 +2028,21 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* thr_exit */ case 431: { struct thr_exit_args *p = params; - uarg[0] = (intptr_t)p->state; /* long * */ + uarg[0] = (intptr_t)p->state; /* int32_t * */ *n_args = 1; break; } /* thr_self */ case 432: { struct thr_self_args *p = params; - uarg[0] = (intptr_t)p->id; /* long * */ + uarg[0] = (intptr_t)p->id; /* int32_t * */ *n_args = 1; break; } /* thr_kill */ case 433: { struct thr_kill_args *p = params; - iarg[0] = p->id; /* long */ + iarg[0] = p->id; /* int32_t */ iarg[1] = p->sig; /* int */ *n_args = 2; break; @@ -2102,7 +2102,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* thr_wake */ case 443: { struct thr_wake_args *p = params; - iarg[0] = p->id; /* long */ + iarg[0] = p->id; /* int32_t */ *n_args = 1; break; } @@ -2278,7 +2278,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* thr_set_name */ case 464: { struct thr_set_name_args *p = params; - iarg[0] = p->id; /* long */ + iarg[0] = p->id; /* int32_t */ uarg[1] = (intptr_t)p->name; /* const char * */ *n_args = 2; break; @@ -2486,7 +2486,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 481: { struct thr_kill2_args *p = params; iarg[0] = p->pid; /* pid_t */ - iarg[1] = p->id; /* long */ + iarg[1] = p->id; /* int32_t */ iarg[2] = p->sig; /* int */ *n_args = 3; break; @@ -6690,7 +6690,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 431: switch (ndx) { case 0: - p = "userland long *"; + p = "userland int32_t *"; break; default: break; @@ -6700,7 +6700,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 432: switch (ndx) { case 0: - p = "userland long *"; + p = "userland int32_t *"; break; default: break; @@ -6710,7 +6710,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 433: switch (ndx) { case 0: - p = "long"; + p = "int32_t"; break; case 1: p = "int"; @@ -6813,7 +6813,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 443: switch (ndx) { case 0: - p = "long"; + p = "int32_t"; break; default: break; @@ -7110,7 +7110,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 464: switch (ndx) { case 0: - p = "long"; + p = "int32_t"; break; case 1: p = "userland const char *"; @@ -7519,7 +7519,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "pid_t"; break; case 1: - p = "long"; + p = "int32_t"; break; case 2: p = "int"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index bc836ae676c4..ac0ece71ef5b 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -786,9 +786,9 @@ 429 AUE_SIGWAIT NOPROTO { int sigwait(const sigset_t *set, \ int *sig); } 430 AUE_THR_CREATE UNIMPL thr_create; -431 AUE_THR_EXIT NOPROTO { void thr_exit(long *state); } -432 AUE_NULL NOPROTO { int thr_self(long *id); } -433 AUE_THR_KILL NOPROTO { int thr_kill(long id, int sig); } +431 AUE_THR_EXIT NOPROTO { void thr_exit(int32_t *state); } +432 AUE_NULL NOPROTO { int thr_self(int32_t *id); } +433 AUE_THR_KILL NOPROTO { int thr_kill(int32_t id, int sig); } 434 AUE_NULL COMPAT10 { int freebsd32_umtx_lock( \ struct umtx *umtx); } 435 AUE_NULL COMPAT10 { int freebsd32_umtx_unlock( \ @@ -808,7 +808,7 @@ const struct timespec32 *abstime); } 442 AUE_NULL STD { int freebsd32_thr_suspend( \ const struct timespec32 *timeout); } -443 AUE_NULL NOPROTO { int thr_wake(long id); } +443 AUE_NULL NOPROTO { int thr_wake(int32_t id); } 444 AUE_MODUNLOAD NOPROTO { int kldunloadf(int fileid, int flags); } 445 AUE_AUDIT NOPROTO { int audit(const void *record, \ u_int length); } @@ -851,7 +851,7 @@ const struct sigevent32 *sigev); } 462 AUE_MQ_UNLINK NOPROTO|NOSTD { int kmq_unlink(const char *path); } 463 AUE_NULL NOPROTO { int abort2(const char *why, int nargs, void **args); } -464 AUE_NULL NOPROTO { int thr_set_name(long id, const char *name); } +464 AUE_NULL NOPROTO { int thr_set_name(int32_t id, const char *name); } 465 AUE_AIO_FSYNC STD { int freebsd32_aio_fsync(int op, \ struct aiocb32 *aiocbp); } 466 AUE_RTPRIO NOPROTO { int rtprio_thread(int function, \ @@ -912,7 +912,7 @@ 480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ uint32_t length1, uint32_t length2); } #endif -481 AUE_THR_KILL2 NOPROTO { int thr_kill2(pid_t pid, long id, int sig); } +481 AUE_THR_KILL2 NOPROTO { int thr_kill2(pid_t pid, int32_t id, int sig); } 482 AUE_SHMOPEN COMPAT12|NOPROTO { int shm_open( \ const char *path, int flags, mode_t mode); } 483 AUE_SHMUNLINK NOPROTO { int shm_unlink(const char *path); }