aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/sysv_msg.c
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2017-05-17 00:34:34 +0000
committerEd Maste <emaste@FreeBSD.org>2017-05-17 00:34:34 +0000
commit3e85b721d653d65a5b6ff655ed1551113f0e0d5b (patch)
tree9f2b92961a0e2680de78b6f1c653a05926cbf817 /sys/kern/sysv_msg.c
parent00f6cd3f568295e501deae63e38b34d1137a6eb9 (diff)
Remove register keyword from sys/ and ANSIfy prototypes
A long long time ago the register keyword told the compiler to store the corresponding variable in a CPU register, but it is not relevant for any compiler used in the FreeBSD world today. ANSIfy related prototypes while here. Reviewed by: cem, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10193
Notes
svn path=/head/; revision=318389
Diffstat (limited to 'sys/kern/sysv_msg.c')
-rw-r--r--sys/kern/sysv_msg.c76
1 files changed, 28 insertions, 48 deletions
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c
index 80102fa25742..207fb1f5d7bc 100644
--- a/sys/kern/sysv_msg.c
+++ b/sys/kern/sysv_msg.c
@@ -480,9 +480,7 @@ struct msgctl_args {
};
#endif
int
-sys_msgctl(td, uap)
- struct thread *td;
- register struct msgctl_args *uap;
+sys_msgctl(struct thread *td, struct msgctl_args *uap)
{
int msqid = uap->msqid;
int cmd = uap->cmd;
@@ -507,7 +505,7 @@ kern_msgctl(td, msqid, cmd, msqbuf)
struct msqid_ds *msqbuf;
{
int rval, error, msqix;
- register struct msqid_kernel *msqkptr;
+ struct msqid_kernel *msqkptr;
struct prison *rpr;
rpr = msg_find_prison(td->td_ucred);
@@ -644,15 +642,13 @@ struct msgget_args {
#endif
int
-sys_msgget(td, uap)
- struct thread *td;
- register struct msgget_args *uap;
+sys_msgget(struct thread *td, struct msgget_args *uap)
{
int msqid, error = 0;
int key = uap->key;
int msgflg = uap->msgflg;
struct ucred *cred = td->td_ucred;
- register struct msqid_kernel *msqkptr = NULL;
+ struct msqid_kernel *msqkptr = NULL;
DPRINTF(("msgget(0x%x, 0%o)\n", key, msgflg));
@@ -764,23 +760,18 @@ done2:
#ifndef _SYS_SYSPROTO_H_
struct msgsnd_args {
int msqid;
- const void *msgp;
+ const void *msgp; /* XXX msgp is actually mtext. */
size_t msgsz;
int msgflg;
};
#endif
int
-kern_msgsnd(td, msqid, msgp, msgsz, msgflg, mtype)
- struct thread *td;
- int msqid;
- const void *msgp; /* XXX msgp is actually mtext. */
- size_t msgsz;
- int msgflg;
- long mtype;
+kern_msgsnd(struct thread *td, int msqid, const void *msgp,
+ size_t msgsz, int msgflg, long mtype)
{
int msqix, segs_needed, error = 0;
- register struct msqid_kernel *msqkptr;
- register struct msg *msghdr;
+ struct msqid_kernel *msqkptr;
+ struct msg *msghdr;
struct prison *rpr;
short next;
#ifdef RACCT
@@ -1117,9 +1108,7 @@ done2:
}
int
-sys_msgsnd(td, uap)
- struct thread *td;
- register struct msgsnd_args *uap;
+sys_msgsnd(struct thread *td, struct msgsnd_args *uap)
{
int error;
long mtype;
@@ -1145,19 +1134,14 @@ struct msgrcv_args {
int msgflg;
};
#endif
+/* XXX msgp is actually mtext. */
int
-kern_msgrcv(td, msqid, msgp, msgsz, msgtyp, msgflg, mtype)
- struct thread *td;
- int msqid;
- void *msgp; /* XXX msgp is actually mtext. */
- size_t msgsz;
- long msgtyp;
- int msgflg;
- long *mtype;
+kern_msgrcv(struct thread *td, int msqid, void *msgp, size_t msgsz, long msgtyp,
+ int msgflg, long *mtype)
{
size_t len;
- register struct msqid_kernel *msqkptr;
- register struct msg *msghdr;
+ struct msqid_kernel *msqkptr;
+ struct msg *msghdr;
struct prison *rpr;
int msqix, error = 0;
short next;
@@ -1411,9 +1395,7 @@ done2:
}
int
-sys_msgrcv(td, uap)
- struct thread *td;
- register struct msgrcv_args *uap;
+sys_msgrcv(struct thread *td, struct msgrcv_args *uap)
{
int error;
long mtype;
@@ -1812,19 +1794,19 @@ static sy_call_t *msgcalls[] = {
/*
* Entry point for all MSG calls.
+ *
+ * XXX actually varargs.
+ * struct msgsys_args {
+ * int which;
+ * int a2;
+ * int a3;
+ * int a4;
+ * int a5;
+ * int a6;
+ * } *uap;
*/
int
-sys_msgsys(td, uap)
- struct thread *td;
- /* XXX actually varargs. */
- struct msgsys_args /* {
- int which;
- int a2;
- int a3;
- int a4;
- int a5;
- int a6;
- } */ *uap;
+sys_msgsys(struct thread *td, struct msgsys_args *uap)
{
int error;
@@ -1847,9 +1829,7 @@ struct freebsd7_msgctl_args {
};
#endif
int
-freebsd7_msgctl(td, uap)
- struct thread *td;
- struct freebsd7_msgctl_args *uap;
+freebsd7_msgctl(struct thread *td, struct freebsd7_msgctl_args *uap)
{
struct msqid_ds_old msqold;
struct msqid_ds msqbuf;