From nobody Wed Nov 17 20:22:52 2021 X-Original-To: dev-commits-src-all@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 19D1E18557E1; Wed, 17 Nov 2021 20:22:57 +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 4HvZ9q4Lb7z4rHG; Wed, 17 Nov 2021 20:22:54 +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 5FF4127278; Wed, 17 Nov 2021 20:22:52 +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 1AHKMqU0060291; Wed, 17 Nov 2021 20:22:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AHKMqra060290; Wed, 17 Nov 2021 20:22:52 GMT (envelope-from git) Date: Wed, 17 Nov 2021 20:22:52 GMT Message-Id: <202111172022.1AHKMqra060290@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: 265a4b8341ab - main - freebsd32: semid_t -> int32_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 265a4b8341abbabd43b3a293c76dc5209fa9f7da Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=265a4b8341abbabd43b3a293c76dc5209fa9f7da commit 265a4b8341abbabd43b3a293c76dc5209fa9f7da Author: Brooks Davis AuthorDate: 2021-11-17 20:12:26 +0000 Commit: Brooks Davis CommitDate: 2021-11-17 20:12:26 +0000 freebsd32: semid_t -> int32_t semid_t is historically an intptr_t so it should be an int32_t. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 6 ++--- sys/compat/freebsd32/freebsd32_systrace_args.c | 36 +++++++++++++------------- sys/compat/freebsd32/syscalls.master | 18 ++++++------- sys/kern/uipc_sem.c | 4 +-- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index a7a38e39dccc..50a71a28c607 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -335,11 +335,11 @@ struct freebsd32_sendfile_args { char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; struct freebsd32_ksem_init_args { - char idp_l_[PADL_(semid_t *)]; semid_t * idp; char idp_r_[PADR_(semid_t *)]; + char idp_l_[PADL_(int32_t *)]; int32_t * idp; char idp_r_[PADR_(int32_t *)]; char value_l_[PADL_(unsigned int)]; unsigned int value; char value_r_[PADR_(unsigned int)]; }; struct freebsd32_ksem_open_args { - char idp_l_[PADL_(semid_t *)]; semid_t * idp; char idp_r_[PADR_(semid_t *)]; + char idp_l_[PADL_(int32_t *)]; int32_t * idp; char idp_r_[PADR_(int32_t *)]; char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; char oflag_l_[PADL_(int)]; int oflag; char oflag_r_[PADR_(int)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; @@ -364,7 +364,7 @@ struct freebsd32_swapcontext_args { char ucp_l_[PADL_(const struct __ucontext32 *)]; const struct __ucontext32 * ucp; char ucp_r_[PADR_(const struct __ucontext32 *)]; }; struct freebsd32_ksem_timedwait_args { - char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; + char id_l_[PADL_(int32_t)]; int32_t id; char id_r_[PADR_(int32_t)]; char abstime_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * abstime; char abstime_r_[PADR_(const struct timespec32 *)]; }; struct freebsd32_thr_suspend_args { diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 1d39fc026802..c7221993837a 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -1872,35 +1872,35 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* ksem_close */ case 400: { struct ksem_close_args *p = params; - iarg[0] = p->id; /* semid_t */ + iarg[0] = p->id; /* int32_t */ *n_args = 1; break; } /* ksem_post */ case 401: { struct ksem_post_args *p = params; - iarg[0] = p->id; /* semid_t */ + iarg[0] = p->id; /* int32_t */ *n_args = 1; break; } /* ksem_wait */ case 402: { struct ksem_wait_args *p = params; - iarg[0] = p->id; /* semid_t */ + iarg[0] = p->id; /* int32_t */ *n_args = 1; break; } /* ksem_trywait */ case 403: { struct ksem_trywait_args *p = params; - iarg[0] = p->id; /* semid_t */ + iarg[0] = p->id; /* int32_t */ *n_args = 1; break; } /* freebsd32_ksem_init */ case 404: { struct freebsd32_ksem_init_args *p = params; - uarg[0] = (intptr_t)p->idp; /* semid_t * */ + uarg[0] = (intptr_t)p->idp; /* int32_t * */ uarg[1] = p->value; /* unsigned int */ *n_args = 2; break; @@ -1908,7 +1908,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_ksem_open */ case 405: { struct freebsd32_ksem_open_args *p = params; - uarg[0] = (intptr_t)p->idp; /* semid_t * */ + uarg[0] = (intptr_t)p->idp; /* int32_t * */ uarg[1] = (intptr_t)p->name; /* const char * */ iarg[2] = p->oflag; /* int */ iarg[3] = p->mode; /* mode_t */ @@ -1926,7 +1926,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* ksem_getvalue */ case 407: { struct ksem_getvalue_args *p = params; - iarg[0] = p->id; /* semid_t */ + iarg[0] = p->id; /* int32_t */ uarg[1] = (intptr_t)p->val; /* int * */ *n_args = 2; break; @@ -1934,7 +1934,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* ksem_destroy */ case 408: { struct ksem_destroy_args *p = params; - iarg[0] = p->id; /* semid_t */ + iarg[0] = p->id; /* int32_t */ *n_args = 1; break; } @@ -2119,7 +2119,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_ksem_timedwait */ case 441: { struct freebsd32_ksem_timedwait_args *p = params; - iarg[0] = p->id; /* semid_t */ + iarg[0] = p->id; /* int32_t */ uarg[1] = (intptr_t)p->abstime; /* const struct timespec32 * */ *n_args = 2; break; @@ -6468,7 +6468,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 400: switch (ndx) { case 0: - p = "semid_t"; + p = "int32_t"; break; default: break; @@ -6478,7 +6478,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 401: switch (ndx) { case 0: - p = "semid_t"; + p = "int32_t"; break; default: break; @@ -6488,7 +6488,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 402: switch (ndx) { case 0: - p = "semid_t"; + p = "int32_t"; break; default: break; @@ -6498,7 +6498,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 403: switch (ndx) { case 0: - p = "semid_t"; + p = "int32_t"; break; default: break; @@ -6508,7 +6508,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 404: switch (ndx) { case 0: - p = "userland semid_t *"; + p = "userland int32_t *"; break; case 1: p = "unsigned int"; @@ -6521,7 +6521,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 405: switch (ndx) { case 0: - p = "userland semid_t *"; + p = "userland int32_t *"; break; case 1: p = "userland const char *"; @@ -6553,7 +6553,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 407: switch (ndx) { case 0: - p = "semid_t"; + p = "int32_t"; break; case 1: p = "userland int *"; @@ -6566,7 +6566,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 408: switch (ndx) { case 0: - p = "semid_t"; + p = "int32_t"; break; default: break; @@ -6879,7 +6879,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 441: switch (ndx) { case 0: - p = "semid_t"; + p = "int32_t"; break; case 1: p = "userland const struct timespec32 *"; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index f4b71ab1f3c4..b5b63b37bfbc 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -753,19 +753,19 @@ const struct fhandle *u_fhp, \ struct freebsd11_statfs *buf); } 399 AUE_NULL RESERVED -400 AUE_SEMCLOSE NOSTD|NOPROTO { int ksem_close(semid_t id); } -401 AUE_SEMPOST NOSTD|NOPROTO { int ksem_post(semid_t id); } -402 AUE_SEMWAIT NOSTD|NOPROTO { int ksem_wait(semid_t id); } -403 AUE_SEMTRYWAIT NOSTD|NOPROTO { int ksem_trywait(semid_t id); } -404 AUE_SEMINIT NOSTD { int freebsd32_ksem_init(semid_t *idp, \ +400 AUE_SEMCLOSE NOSTD|NOPROTO { int ksem_close(int32_t id); } +401 AUE_SEMPOST NOSTD|NOPROTO { int ksem_post(int32_t id); } +402 AUE_SEMWAIT NOSTD|NOPROTO { int ksem_wait(int32_t id); } +403 AUE_SEMTRYWAIT NOSTD|NOPROTO { int ksem_trywait(int32_t id); } +404 AUE_SEMINIT NOSTD { int freebsd32_ksem_init(int32_t *idp, \ unsigned int value); } -405 AUE_SEMOPEN NOSTD { int freebsd32_ksem_open(semid_t *idp, \ +405 AUE_SEMOPEN NOSTD { int freebsd32_ksem_open(int32_t *idp, \ const char *name, int oflag, \ mode_t mode, unsigned int value); } 406 AUE_SEMUNLINK NOSTD|NOPROTO { int ksem_unlink(const char *name); } -407 AUE_SEMGETVALUE NOSTD|NOPROTO { int ksem_getvalue(semid_t id, \ +407 AUE_SEMGETVALUE NOSTD|NOPROTO { int ksem_getvalue(int32_t id, \ int *val); } -408 AUE_SEMDESTROY NOSTD|NOPROTO { int ksem_destroy(semid_t id); } +408 AUE_SEMDESTROY NOSTD|NOPROTO { int ksem_destroy(int32_t id); } 409 AUE_NULL UNIMPL __mac_get_pid 410 AUE_NULL UNIMPL __mac_get_link 411 AUE_NULL UNIMPL __mac_set_link @@ -826,7 +826,7 @@ const char *path, int attrnamespace, \ void *data, size_t nbytes); } 440 AUE_NULL OBSOL kse_switchin -441 AUE_SEMWAIT NOSTD { int freebsd32_ksem_timedwait(semid_t id, \ +441 AUE_SEMWAIT NOSTD { int freebsd32_ksem_timedwait(int32_t id, \ const struct timespec32 *abstime); } 442 AUE_NULL STD { int freebsd32_thr_suspend( \ const struct timespec32 *timeout); } diff --git a/sys/kern/uipc_sem.c b/sys/kern/uipc_sem.c index e7c7a04f5c54..22930834f330 100644 --- a/sys/kern/uipc_sem.c +++ b/sys/kern/uipc_sem.c @@ -970,7 +970,7 @@ int freebsd32_ksem_init(struct thread *td, struct freebsd32_ksem_init_args *uap) { - return (ksem_create(td, NULL, uap->idp, S_IRWXU | S_IRWXG, uap->value, + return (ksem_create(td, NULL, (semid_t *)uap->idp, S_IRWXU | S_IRWXG, uap->value, 0, 1)); } @@ -980,7 +980,7 @@ freebsd32_ksem_open(struct thread *td, struct freebsd32_ksem_open_args *uap) if ((uap->oflag & ~(O_CREAT | O_EXCL)) != 0) return (EINVAL); - return (ksem_create(td, uap->name, uap->idp, uap->mode, uap->value, + return (ksem_create(td, uap->name, (semid_t *)uap->idp, uap->mode, uap->value, uap->oflag, 1)); }