From 873fbcd776b5c6e0b7caa1f1f87cc91a12d339db Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Mon, 5 Mar 2007 13:10:58 +0000 Subject: [PATCH] Further system call comment cleanup: - Remove also "MP SAFE" after prior "MPSAFE" pass. (suggested by bde) - Remove extra blank lines in some cases. - Add extra blank lines in some cases. - Remove no-op comments consisting solely of the function name, the word "syscall", or the system call name. - Add punctuation. - Re-wrap some comments. --- sys/kern/kern_acl.c | 4 ++-- sys/kern/kern_context.c | 6 +++--- sys/kern/kern_descrip.c | 6 +++--- sys/kern/kern_environment.c | 3 +-- sys/kern/kern_exec.c | 20 +++++++++--------- sys/kern/kern_exit.c | 9 ++++---- sys/kern/kern_ktrace.c | 6 ------ sys/kern/kern_ntptime.c | 12 +++++------ sys/kern/kern_prot.c | 10 ++++----- sys/kern/kern_resource.c | 3 --- sys/kern/kern_sig.c | 14 ++----------- sys/kern/kern_synch.c | 2 +- sys/kern/kern_sysctl.c | 3 +-- sys/kern/kern_time.c | 42 ++++++++++++++----------------------- sys/kern/kern_umtx.c | 1 - sys/kern/kern_uuid.c | 1 - sys/kern/kern_xxx.c | 10 ++++----- sys/kern/p1003_1b.c | 6 +++--- sys/kern/sys_generic.c | 15 ------------- sys/kern/sys_pipe.c | 5 ++--- sys/kern/sysv_msg.c | 4 ---- sys/kern/sysv_sem.c | 3 --- sys/kern/sysv_shm.c | 5 ----- sys/kern/uipc_mqueue.c | 18 +++------------- sys/kern/uipc_sem.c | 3 --- sys/kern/uipc_syscalls.c | 4 +--- sys/kern/vfs_aio.c | 6 +++--- sys/kern/vfs_cache.c | 2 +- sys/kern/vfs_mount.c | 9 +++----- sys/kern/vfs_syscalls.c | 40 ++++++++++++----------------------- 30 files changed, 86 insertions(+), 186 deletions(-) diff --git a/sys/kern/kern_acl.c b/sys/kern/kern_acl.c index 0a276a2e38b9..c2456be6ce8c 100644 --- a/sys/kern/kern_acl.c +++ b/sys/kern/kern_acl.c @@ -264,7 +264,7 @@ __acl_set_link(struct thread *td, struct __acl_set_link_args *uap) } /* - * Given a file descriptor, get an ACL for it + * Given a file descriptor, get an ACL for it. */ int __acl_get_fd(struct thread *td, struct __acl_get_fd_args *uap) @@ -283,7 +283,7 @@ __acl_get_fd(struct thread *td, struct __acl_get_fd_args *uap) } /* - * Given a file descriptor, set an ACL for it + * Given a file descriptor, set an ACL for it. */ int __acl_set_fd(struct thread *td, struct __acl_set_fd_args *uap) diff --git a/sys/kern/kern_context.c b/sys/kern/kern_context.c index 8532a8f86994..f951fca4da96 100644 --- a/sys/kern/kern_context.c +++ b/sys/kern/kern_context.c @@ -39,9 +39,9 @@ __FBSDID("$FreeBSD$"); #include /* - * The first two fields of a ucontext_t are the signal mask and - * the machine context. The next field is uc_link; we want to - * avoid destroying the link when copying out contexts. + * The first two fields of a ucontext_t are the signal mask and the machine + * context. The next field is uc_link; we want to avoid destroying the link + * when copying out contexts. */ #define UC_COPY_SIZE offsetof(ucontext_t, uc_link) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 4a636de39d7d..f37126f4c906 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -263,7 +263,7 @@ getdtablesize(struct thread *td, struct getdtablesize_args *uap) /* * Duplicate a file descriptor to a particular value. * - * note: keep in mind that a potential race condition exists when closing + * Note: keep in mind that a potential race condition exists when closing * descriptors from a shared descriptor table (via rfork). */ #ifndef _SYS_SYSPROTO_H_ @@ -2187,8 +2187,8 @@ fdrop_locked(struct file *fp, struct thread *td) /* * Apply an advisory lock on a file descriptor. * - * Just attempt to get a record lock of the requested type on - * the entire file (l_whence = SEEK_SET, l_start = 0, l_len = 0). + * Just attempt to get a record lock of the requested type on the entire file + * (l_whence = SEEK_SET, l_start = 0, l_len = 0). */ #ifndef _SYS_SYSPROTO_H_ struct flock_args { diff --git a/sys/kern/kern_environment.c b/sys/kern/kern_environment.c index 1d3362630ae8..9737f355fb69 100644 --- a/sys/kern/kern_environment.c +++ b/sys/kern/kern_environment.c @@ -69,8 +69,7 @@ char **kenvp; struct mtx kenv_lock; /* - * No need to protect this with a mutex - * since SYSINITS are single threaded. + * No need to protect this with a mutex since SYSINITS are single threaded. */ int dynamic_kenv = 0; diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index e07ded2e8d9e..31c8c39c7f60 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -221,11 +221,11 @@ __mac_execve(td, uap) } /* - * XXX: kern_execve has the astonishing property of not always - * returning to the caller. If sufficiently bad things happen during - * the call to do_execve(), it can end up calling exit1(); as a result, - * callers must avoid doing anything which they might need to undo - * (e.g., allocating memory). + * XXX: kern_execve has the astonishing property of not always returning to + * the caller. If sufficiently bad things happen during the call to + * do_execve(), it can end up calling exit1(); as a result, callers must + * avoid doing anything which they might need to undo (e.g., allocating + * memory). */ int kern_execve(td, args, mac_p) @@ -950,8 +950,8 @@ exec_new_vmspace(imgp, sv) } /* - * Copy out argument and environment strings from the old process - * address space into the temporary string buffer. + * Copy out argument and environment strings from the old process address + * space into the temporary string buffer. */ int exec_copyin_args(struct image_args *args, char *fname, @@ -1053,9 +1053,9 @@ exec_free_args(struct image_args *args) } /* - * Copy strings out to the new process address space, constructing - * new arg and env vector tables. Return a pointer to the base - * so that it can be used as the initial stack pointer. + * Copy strings out to the new process address space, constructing new arg + * and env vector tables. Return a pointer to the base so that it can be used + * as the initial stack pointer. */ register_t * exec_copyout_strings(imgp) diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 6a6470929d9d..b8bef74945ca 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -89,8 +89,7 @@ MALLOC_DEFINE(M_ZOMBIE, "zombie", "zombie proc status"); void (*nlminfo_release_p)(struct proc *p); /* - * exit -- - * Death of process. + * exit -- death of process. */ void sys_exit(struct thread *td, struct sys_exit_args *uap) @@ -101,9 +100,9 @@ sys_exit(struct thread *td, struct sys_exit_args *uap) } /* - * Exit: deallocate address space and other resources, change proc state - * to zombie, and unlink proc from allproc and parent's lists. Save exit - * status and rusage for wait(). Check for child processes and orphan them. + * Exit: deallocate address space and other resources, change proc state to + * zombie, and unlink proc from allproc and parent's lists. Save exit status + * and rusage for wait(). Check for child processes and orphan them. */ void exit1(struct thread *td, int rv) diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 2f36265d812f..bba1ce4a14b9 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -556,9 +556,6 @@ ktrcsw(out, user) /* Interface and common routines */ -/* - * ktrace system call - */ #ifndef _SYS_SYSPROTO_H_ struct ktrace_args { char *fname; @@ -729,9 +726,6 @@ ktrace(td, uap) #endif /* KTRACE */ } -/* - * utrace system call - */ /* ARGSUSED */ int utrace(td, uap) diff --git a/sys/kern/kern_ntptime.c b/sys/kern/kern_ntptime.c index d97c6dd9a27b..b1148235fe69 100644 --- a/sys/kern/kern_ntptime.c +++ b/sys/kern/kern_ntptime.c @@ -249,9 +249,8 @@ ntp_gettime1(struct ntptimeval *ntvp) /* * ntp_gettime() - NTP user application interface * - * See the timex.h header file for synopsis and API description. Note - * that the TAI offset is returned in the ntvtimeval.tai structure - * member. + * See the timex.h header file for synopsis and API description. Note that + * the TAI offset is returned in the ntvtimeval.tai structure member. */ #ifndef _SYS_SYSPROTO_H_ struct ntp_gettime_args { @@ -294,12 +293,13 @@ SYSCTL_INT(_kern_ntp_pll, OID_AUTO, time_monitor, CTLFLAG_RD, &time_monitor, 0, SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, pps_freq, CTLFLAG_RD, &pps_freq, sizeof(pps_freq), "I", ""); SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, time_freq, CTLFLAG_RD, &time_freq, sizeof(time_freq), "I", ""); #endif + /* * ntp_adjtime() - NTP daemon application interface * - * See the timex.h header file for synopsis and API description. Note - * that the timex.constant structure member has a dual purpose to set - * the time constant and to set the TAI offset. + * See the timex.h header file for synopsis and API description. Note that + * the timex.constant structure member has a dual purpose to set the time + * constant and to set the TAI offset. */ #ifndef _SYS_SYSPROTO_H_ struct ntp_adjtime_args { diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index ceab6520d88f..a11825a432ef 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -983,10 +983,9 @@ setregid(register struct thread *td, struct setregid_args *uap) } /* - * setresuid(ruid, euid, suid) is like setreuid except control over the - * saved uid is explicit. + * setresuid(ruid, euid, suid) is like setreuid except control over the saved + * uid is explicit. */ - #ifndef _SYS_SYSPROTO_H_ struct setresuid_args { uid_t ruid; @@ -1065,10 +1064,9 @@ setresuid(register struct thread *td, struct setresuid_args *uap) } /* - * setresgid(rgid, egid, sgid) is like setregid except control over the - * saved gid is explicit. + * setresgid(rgid, egid, sgid) is like setregid except control over the saved + * gid is explicit. */ - #ifndef _SYS_SYSPROTO_H_ struct setresgid_args { gid_t rgid; diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 8ab4f2acf169..32c27ed1d616 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -78,7 +78,6 @@ static struct uidinfo *uilookup(uid_t uid); /* * Resource controls and accounting. */ - #ifndef _SYS_SYSPROTO_H_ struct getpriority_args { int which; @@ -280,7 +279,6 @@ struct rtprio_thread_args { struct rtprio *rtp; }; #endif - int rtprio_thread(struct thread *td, struct rtprio_thread_args *uap) { @@ -373,7 +371,6 @@ struct rtprio_args { struct rtprio *rtp; }; #endif - int rtprio(td, uap) struct thread *td; /* curthread */ diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index c10ce458e9c4..663dba2f9cb6 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -546,8 +546,6 @@ sigqueue_delete_stopmask_proc(struct proc *p) * Determine signal that should be delivered to process p, the current * process, 0 if none. If there is a pending stop signal with default * action, the process stops in issignal(). - * - * MP SAFE. */ int cursig(struct thread *td) @@ -1023,10 +1021,6 @@ kern_sigprocmask(td, how, set, oset, old) return (error); } -/* - * sigprocmask() - MP SAFE - */ - #ifndef _SYS_SYSPROTO_H_ struct sigprocmask_args { int how; @@ -1058,9 +1052,6 @@ sigprocmask(td, uap) } #ifdef COMPAT_43 /* XXX - COMPAT_FBSD3 */ -/* - * osigprocmask() - MP SAFE - */ #ifndef _SYS_SYSPROTO_H_ struct osigprocmask_args { int how; @@ -1433,8 +1424,8 @@ osigsetmask(td, uap) #endif /* COMPAT_43 */ /* - * Suspend calling thread until signal, providing mask to be set - * in the meantime. + * Suspend calling thread until signal, providing mask to be set in the + * meantime. */ #ifndef _SYS_SYSPROTO_H_ struct sigsuspend_args { @@ -1754,7 +1745,6 @@ struct sigqueue_args { /* union sigval */ void *value; }; #endif - int sigqueue(struct thread *td, struct sigqueue_args *uap) { diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 356e9a88dc76..4fceafbc67c1 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -565,7 +565,7 @@ synch_setup(dummy) } /* - * General purpose yield system call + * General purpose yield system call. */ int yield(struct thread *td, struct yield_args *uap) diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 79fdf8c1ec0e..666a54154cc9 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1294,7 +1294,6 @@ struct sysctl_args { size_t newlen; }; #endif - int __sysctl(struct thread *td, struct sysctl_args *uap) { @@ -1446,6 +1445,7 @@ static struct { /* the actual string data is appended here */ } bsdi_si; + /* * this data is appended to the end of the bsdi_si structure during copyout. * The "char *" offsets are relative to the base of the bsdi_si struct. @@ -1462,7 +1462,6 @@ struct getkerninfo_args { int arg; }; #endif - int ogetkerninfo(struct thread *td, struct getkerninfo_args *uap) { diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 718732c0987b..2a3df9494f8f 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -186,7 +186,6 @@ struct clock_gettime_args { struct timespec *tp; }; #endif - /* ARGSUSED */ int clock_gettime(struct thread *td, struct clock_gettime_args *uap) @@ -255,7 +254,6 @@ struct clock_settime_args { const struct timespec *tp; }; #endif - /* ARGSUSED */ int clock_settime(struct thread *td, struct clock_settime_args *uap) @@ -297,7 +295,6 @@ struct clock_getres_args { struct timespec *tp; }; #endif - int clock_getres(struct thread *td, struct clock_getres_args *uap) { @@ -395,7 +392,6 @@ struct nanosleep_args { struct timespec *rmtp; }; #endif - /* ARGSUSED */ int nanosleep(struct thread *td, struct nanosleep_args *uap) @@ -505,25 +501,25 @@ kern_settimeofday(struct thread *td, struct timeval *tv, struct timezone *tzp) } /* - * Get value of an interval timer. The process virtual and - * profiling virtual time timers are kept in the p_stats area, since - * they can be swapped out. These are kept internally in the - * way they are specified externally: in time until they expire. + * Get value of an interval timer. The process virtual and profiling virtual + * time timers are kept in the p_stats area, since they can be swapped out. + * These are kept internally in the way they are specified externally: in + * time until they expire. * - * The real time interval timer is kept in the process table slot - * for the process, and its value (it_value) is kept as an - * absolute time rather than as a delta, so that it is easy to keep - * periodic real-time signals from drifting. + * The real time interval timer is kept in the process table slot for the + * process, and its value (it_value) is kept as an absolute time rather than + * as a delta, so that it is easy to keep periodic real-time signals from + * drifting. * * Virtual time timers are processed in the hardclock() routine of - * kern_clock.c. The real time timer is processed by a timeout - * routine, called from the softclock() routine. Since a callout - * may be delayed in real time due to interrupt processing in the system, - * it is possible for the real time timeout routine (realitexpire, given below), - * to be delayed in real time past when it is supposed to occur. It - * does not suffice, therefore, to reload the real timer .it_value from the - * real time timers .it_interval. Rather, we compute the next time in - * absolute time the timer should go off. + * kern_clock.c. The real time timer is processed by a timeout routine, + * called from the softclock() routine. Since a callout may be delayed in + * real time due to interrupt processing in the system, it is possible for + * the real time timeout routine (realitexpire, given below), to be delayed + * in real time past when it is supposed to occur. It does not suffice, + * therefore, to reload the real timer .it_value from the real time timers + * .it_interval. Rather, we compute the next time in absolute time the timer + * should go off. */ #ifndef _SYS_SYSPROTO_H_ struct getitimer_args { @@ -583,7 +579,6 @@ struct setitimer_args { struct itimerval *itv, *oitv; }; #endif - int setitimer(struct thread *td, struct setitimer_args *uap) { @@ -932,7 +927,6 @@ struct ktimer_create_args { int * timerid; }; #endif - int ktimer_create(struct thread *td, struct ktimer_create_args *uap) { @@ -1072,7 +1066,6 @@ struct ktimer_delete_args { int timerid; }; #endif - int ktimer_delete(struct thread *td, struct ktimer_delete_args *uap) { @@ -1137,7 +1130,6 @@ struct ktimer_settime_args { struct itimerspec * ovalue; }; #endif - int ktimer_settime(struct thread *td, struct ktimer_settime_args *uap) { @@ -1179,7 +1171,6 @@ struct ktimer_gettime_args { struct itimerspec * value; }; #endif - int ktimer_gettime(struct thread *td, struct ktimer_gettime_args *uap) { @@ -1211,7 +1202,6 @@ struct timer_getoverrun_args { int timerid; }; #endif - int ktimer_getoverrun(struct thread *td, struct ktimer_getoverrun_args *uap) { diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index a43b4d4c4e9b..f46c8fa234ec 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -2540,7 +2540,6 @@ _umtx_op(struct thread *td, struct _umtx_op_args *uap) } #ifdef COMPAT_IA32 - int freebsd32_umtx_lock(struct thread *td, struct freebsd32_umtx_lock_args *uap) /* struct umtx *umtx */ diff --git a/sys/kern/kern_uuid.c b/sys/kern/kern_uuid.c index 4bff90e1253c..a251b4b5ab46 100644 --- a/sys/kern/kern_uuid.c +++ b/sys/kern/kern_uuid.c @@ -178,7 +178,6 @@ struct uuidgen_args { int count; }; #endif - int uuidgen(struct thread *td, struct uuidgen_args *uap) { diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c index d5e476d2e2eb..b701372b2c75 100644 --- a/sys/kern/kern_xxx.c +++ b/sys/kern/kern_xxx.c @@ -142,14 +142,15 @@ oquota(td, uap) struct thread *td; struct oquota_args *uap; { + return (ENOSYS); } #endif /* COMPAT_43 */ /* - * This is the FreeBSD-1.1 compatable uname(2) interface. These - * days it is done in libc as a wrapper around a bunch of sysctl's. - * This must maintain the old 1.1 binary ABI. + * This is the FreeBSD-1.1 compatable uname(2) interface. These days it is + * done in libc as a wrapper around a bunch of sysctl's. This must maintain + * the old 1.1 binary ABI. */ #if SYS_NMLN != 32 #error "FreeBSD-1.1 uname syscall has been broken" @@ -159,7 +160,6 @@ struct uname_args { struct utsname *name; }; #endif - /* ARGSUSED */ int uname(td, uap) @@ -239,7 +239,6 @@ struct getdomainname_args { int len; }; #endif - /* ARGSUSED */ int getdomainname(td, uap) @@ -264,7 +263,6 @@ struct setdomainname_args { int len; }; #endif - /* ARGSUSED */ int setdomainname(td, uap) diff --git a/sys/kern/p1003_1b.c b/sys/kern/p1003_1b.c index f6d86e8b6307..69497a466dde 100644 --- a/sys/kern/p1003_1b.c +++ b/sys/kern/p1003_1b.c @@ -55,9 +55,9 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_P31B, "p1003.1b", "Posix 1003.1B"); -/* The system calls return ENOSYS if an entry is called that is - * not run-time supported. I am also logging since some programs - * start to use this when they shouldn't. That will be removed if annoying. +/* The system calls return ENOSYS if an entry is called that is not run-time + * supported. I am also logging since some programs start to use this when + * they shouldn't. That will be removed if annoying. */ int syscall_not_present(struct thread *td, const char *s, struct nosys_args *uap) diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 26d20ef15a59..268224a580e7 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -83,9 +83,6 @@ static int dofilewrite(struct thread *, int, struct file *, struct uio *, off_t, int); static void doselwakeup(struct selinfo *, int); -/* - * Read system call. - */ #ifndef _SYS_SYSPROTO_H_ struct read_args { int fd; @@ -281,9 +278,6 @@ dofileread(td, fd, fp, auio, offset, flags) return (error); } -/* - * Write system call - */ #ifndef _SYS_SYSPROTO_H_ struct write_args { int fd; @@ -482,9 +476,6 @@ dofilewrite(td, fd, fp, auio, offset, flags) return (error); } -/* - * Ioctl system call. - */ #ifndef _SYS_SYSPROTO_H_ struct ioctl_args { int fd; @@ -620,9 +611,6 @@ struct cv selwait; u_int nselcoll; /* Select collisions since boot */ SYSCTL_UINT(_kern, OID_AUTO, nselcoll, CTLFLAG_RD, &nselcoll, 0, ""); -/* - * Select system call. - */ #ifndef _SYS_SYSPROTO_H_ struct select_args { int nd; @@ -849,9 +837,6 @@ selscan(td, ibits, obits, nfd) return (0); } -/* - * Poll system call. - */ #ifndef _SYS_SYSPROTO_H_ struct poll_args { struct pollfd *fds; diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 035b4fbb1022..508f010de153 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -319,10 +319,9 @@ pipe_zone_fini(void *mem, int size) } /* - * The pipe system call for the DTYPE_PIPE type of pipes. If we fail, - * let the zone pick up the pieces via pipeclose(). + * The pipe system call for the DTYPE_PIPE type of pipes. If we fail, let + * the zone pick up the pieces via pipeclose(). */ - /* ARGSUSED */ int pipe(td, uap) diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c index e86e46fd89ef..d9f320787d78 100644 --- a/sys/kern/sysv_msg.c +++ b/sys/kern/sysv_msg.c @@ -380,7 +380,6 @@ struct msgctl_args { struct msqid_ds *buf; }; #endif - int msgctl(td, uap) struct thread *td; @@ -553,7 +552,6 @@ struct msgget_args { int msgflg; }; #endif - int msgget(td, uap) struct thread *td; @@ -663,7 +661,6 @@ struct msgsnd_args { int msgflg; }; #endif - int kern_msgsnd(td, msqid, msgp, msgsz, msgflg, mtype) struct thread *td; @@ -1000,7 +997,6 @@ struct msgrcv_args { int msgflg; }; #endif - int kern_msgrcv(td, msqid, msgp, msgsz, msgtyp, msgflg, mtype) struct thread *td; diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index f164b076d3af..3ca4ff5337b0 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -541,7 +541,6 @@ struct __semctl_args { union semun *arg; }; #endif - int __semctl(td, uap) struct thread *td; @@ -868,7 +867,6 @@ struct semget_args { int semflg; }; #endif - int semget(td, uap) struct thread *td; @@ -981,7 +979,6 @@ struct semop_args { size_t nsops; }; #endif - int semop(td, uap) struct thread *td; diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 7c4978403b6a..574c3dee6a61 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -289,7 +289,6 @@ struct shmdt_args { const void *shmaddr; }; #endif - int shmdt(td, uap) struct thread *td; @@ -340,7 +339,6 @@ struct shmat_args { int shmflg; }; #endif - int kern_shmat(td, shmid, shmaddr, shmflg) struct thread *td; @@ -470,7 +468,6 @@ struct oshmctl_args { int cmd; struct oshmid_ds *ubuf; }; - static int oshmctl(td, uap) struct thread *td; @@ -532,7 +529,6 @@ struct shmctl_args { struct shmid_ds *buf; }; #endif - int kern_shmctl(td, shmid, cmd, buf, bufsz) struct thread *td; @@ -679,7 +675,6 @@ struct shmget_args { int shmflg; }; #endif - static int shmget_existing(td, uap, mode, segnum) struct thread *td; diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 9e58c0509d5f..3439dbc571fa 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -764,7 +764,7 @@ mqfs_search(struct mqfs_node *pd, const char *name, int len) } /* - * Look up a file or directory + * Look up a file or directory. */ static int mqfs_lookupx(struct vop_cachedlookup_args *ap) @@ -1904,7 +1904,7 @@ notifier_remove(struct proc *p, struct mqueue *mq, int fd) } /* - * Syscall to open a message queue + * Syscall to open a message queue. */ int kmq_open(struct thread *td, struct kmq_open_args *uap) @@ -2018,7 +2018,7 @@ kmq_open(struct thread *td, struct kmq_open_args *uap) } /* - * Syscall to unlink a message queue + * Syscall to unlink a message queue. */ int kmq_unlink(struct thread *td, struct kmq_unlink_args *uap) @@ -2093,9 +2093,6 @@ getmq_write(struct thread *td, int fd, struct file **fpp, return _getmq(td, fd, fget_write, fpp, ppn, pmq); } -/* - * Syscall - */ int kmq_setattr(struct thread *td, struct kmq_setattr_args *uap) { @@ -2130,9 +2127,6 @@ kmq_setattr(struct thread *td, struct kmq_setattr_args *uap) return (error); } -/* - * Syscall - */ int kmq_timedreceive(struct thread *td, struct kmq_timedreceive_args *uap) { @@ -2151,9 +2145,6 @@ kmq_timedreceive(struct thread *td, struct kmq_timedreceive_args *uap) return (error); } -/* - * Syscall - */ int kmq_timedsend(struct thread *td, struct kmq_timedsend_args *uap) { @@ -2171,9 +2162,6 @@ kmq_timedsend(struct thread *td, struct kmq_timedsend_args *uap) return (error); } -/* - * Syscall - */ int kmq_notify(struct thread *td, struct kmq_notify_args *uap) { diff --git a/sys/kern/uipc_sem.c b/sys/kern/uipc_sem.c index 0347a51ae23c..c9903aabc049 100644 --- a/sys/kern/uipc_sem.c +++ b/sys/kern/uipc_sem.c @@ -518,7 +518,6 @@ struct ksem_unlink_args { }; int ksem_unlink(struct thread *td, struct ksem_unlink_args *uap); #endif - int ksem_unlink(struct thread *td, struct ksem_unlink_args *uap) { @@ -566,7 +565,6 @@ struct ksem_close_args { }; int ksem_close(struct thread *td, struct ksem_close_args *uap); #endif - int ksem_close(struct thread *td, struct ksem_close_args *uap) { @@ -639,7 +637,6 @@ struct ksem_wait_args { }; int ksem_wait(struct thread *td, struct ksem_wait_args *uap); #endif - int ksem_wait(struct thread *td, struct ksem_wait_args *uap) { diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 27b12c9c142a..5f6479c17c0e 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1171,7 +1171,6 @@ orecvfrom(td, uap) } #endif - #ifdef COMPAT_OLDSOCK int orecv(td, uap) @@ -1741,9 +1740,8 @@ sf_buf_mext(void *addr, void *args) * * Send a file specified by 'fd' and starting at 'offset' to a socket * specified by 's'. Send only 'nbytes' of the file or until EOF if nbytes == - * 0. Optionally add a header and/or trailer to the socket output. If + * 0. Optionally add a header and/or trailer to the socket output. If * specified, write the total number of bytes sent into *sbytes. - * */ int sendfile(struct thread *td, struct sendfile_args *uap) diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 763239931a09..f5fd25f1814c 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -1869,9 +1869,9 @@ aio_cancel(struct thread *td, struct aio_cancel_args *uap) } /* - * aio_error is implemented in the kernel level for compatibility purposes only. - * For a user mode async implementation, it would be best to do it in a userland - * subroutine. + * aio_error is implemented in the kernel level for compatibility purposes + * only. For a user mode async implementation, it would be best to do it in + * a userland subroutine. */ int aio_error(struct thread *td, struct aio_error_args *uap) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index c20fd9616a3f..44005b0fc9a6 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -690,7 +690,7 @@ static int disablecwd; SYSCTL_INT(_debug, OID_AUTO, disablecwd, CTLFLAG_RW, &disablecwd, 0, "Disable the getcwd syscall"); -/* Implementation of the getcwd syscall */ +/* Implementation of the getcwd syscall. */ int __getcwd(td, uap) struct thread *td; diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 09ac9ad94d48..6a3d41ec1d50 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -371,8 +371,7 @@ vfs_mergeopts(struct vfsoptlist *toopts, struct vfsoptlist *opts) } /* - * --------------------------------------------------------------------- - * Mount a filesystem + * Mount a filesystem. */ int nmount(td, uap) @@ -724,7 +723,6 @@ vfs_donmount(struct thread *td, int fsflags, struct uio *fsoptions) } /* - * --------------------------------------------------------------------- * Old mount API. */ #ifndef _SYS_SYSPROTO_H_ @@ -1072,11 +1070,10 @@ vfs_domount( } /* - * --------------------------------------------------------------------- * Unmount a filesystem. * - * Note: unmount takes a path to the vnode mounted on as argument, - * not special file (as before). + * Note: unmount takes a path to the vnode mounted on as argument, not + * special file (as before). */ #ifndef _SYS_SYSPROTO_H_ struct unmount_args { diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 07ba22e0f191..ed0c432dd16f 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -95,6 +95,11 @@ static int vn_access(struct vnode *vp, int user_flags, struct ucred *cred, */ int async_io_version; +#ifdef DEBUG +static int syncprt = 0; +SYSCTL_INT(_debug, OID_AUTO, syncprt, CTLFLAG_RW, &syncprt, 0, ""); +#endif + /* * Sync each mounted filesystem. */ @@ -103,12 +108,6 @@ struct sync_args { int dummy; }; #endif - -#ifdef DEBUG -static int syncprt = 0; -SYSCTL_INT(_debug, OID_AUTO, syncprt, CTLFLAG_RW, &syncprt, 0, ""); -#endif - /* ARGSUSED */ int sync(td, uap) @@ -158,8 +157,6 @@ SYSCTL_INT(_kern_prison, OID_AUTO, quotas, CTLFLAG_RW, &prison_quotas, 0, ""); /* * Change filesystem quotas. - * - * MP SAFE */ #ifndef _SYS_SYSPROTO_H_ struct quotactl_args { @@ -931,10 +928,8 @@ change_root(vp, td) } /* - * Check permissions, allocate an open file structure, - * and call the device open routine if any. - * - * MP SAFE + * Check permissions, allocate an open file structure, and call the device + * open routine if any. */ #ifndef _SYS_SYSPROTO_H_ struct open_args { @@ -1119,8 +1114,6 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags, #ifdef COMPAT_43 /* * Create a file. - * - * MP SAFE */ #ifndef _SYS_SYSPROTO_H_ struct ocreat_args { @@ -3226,8 +3219,8 @@ fsync(td, uap) } /* - * Rename files. Source and destination must either both be directories, - * or both not be directories. If target is a directory, it must be empty. + * Rename files. Source and destination must either both be directories, or + * both not be directories. If target is a directory, it must be empty. */ #ifndef _SYS_SYSPROTO_H_ struct rename_args { @@ -3774,6 +3767,7 @@ getdirentries(td, uap) fdrop(fp, td); return (error); } + #ifndef _SYS_SYSPROTO_H_ struct getdents_args { int fd; @@ -3800,8 +3794,6 @@ getdents(td, uap) /* * Set the mode mask for creation of filesystem nodes. - * - * MP SAFE */ #ifndef _SYS_SYSPROTO_H_ struct umask_args { @@ -3826,8 +3818,8 @@ umask(td, uap) } /* - * Void all references to file by ripping underlying filesystem - * away from vnode. + * Void all references to file by ripping underlying filesystem away from + * vnode. */ #ifndef _SYS_SYSPROTO_H_ struct revoke_args { @@ -3915,7 +3907,7 @@ getvnode(fdp, fd, fpp) } /* - * Get (NFS) file handle + * Get an (NFS) file handle. */ #ifndef _SYS_SYSPROTO_H_ struct lgetfh_args { @@ -4001,8 +3993,6 @@ getfh(td, uap) * * warning: do not remove the priv_check() call or this becomes one giant * security hole. - * - * MP SAFE */ #ifndef _SYS_SYSPROTO_H_ struct fhopen_args { @@ -4192,8 +4182,6 @@ fhopen(td, uap) /* * Stat an (NFS) file handle. - * - * MP SAFE */ #ifndef _SYS_SYSPROTO_H_ struct fhstat_args { @@ -4242,8 +4230,6 @@ fhstat(td, uap) /* * Implement fstatfs() for (NFS) file handles. - * - * MP SAFE */ #ifndef _SYS_SYSPROTO_H_ struct fhstatfs_args {