ANSIfy sys_generic.c
This commit is contained in:
parent
2339f28c6e
commit
cc3c9df80f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333457
@ -188,9 +188,7 @@ struct read_args {
|
||||
};
|
||||
#endif
|
||||
int
|
||||
sys_read(td, uap)
|
||||
struct thread *td;
|
||||
struct read_args *uap;
|
||||
sys_read(struct thread *td, struct read_args *uap)
|
||||
{
|
||||
struct uio auio;
|
||||
struct iovec aiov;
|
||||
@ -319,11 +317,7 @@ sys_preadv(struct thread *td, struct preadv_args *uap)
|
||||
}
|
||||
|
||||
int
|
||||
kern_preadv(td, fd, auio, offset)
|
||||
struct thread *td;
|
||||
int fd;
|
||||
struct uio *auio;
|
||||
off_t offset;
|
||||
kern_preadv(struct thread *td, int fd, struct uio *auio, off_t offset)
|
||||
{
|
||||
struct file *fp;
|
||||
int error;
|
||||
@ -347,13 +341,8 @@ kern_preadv(td, fd, auio, offset)
|
||||
* from a file using the passed in uio, offset, and flags.
|
||||
*/
|
||||
static int
|
||||
dofileread(td, fd, fp, auio, offset, flags)
|
||||
struct thread *td;
|
||||
int fd;
|
||||
struct file *fp;
|
||||
struct uio *auio;
|
||||
off_t offset;
|
||||
int flags;
|
||||
dofileread(struct thread *td, int fd, struct file *fp, struct uio *auio,
|
||||
off_t offset, int flags)
|
||||
{
|
||||
ssize_t cnt;
|
||||
int error;
|
||||
@ -400,9 +389,7 @@ struct write_args {
|
||||
};
|
||||
#endif
|
||||
int
|
||||
sys_write(td, uap)
|
||||
struct thread *td;
|
||||
struct write_args *uap;
|
||||
sys_write(struct thread *td, struct write_args *uap)
|
||||
{
|
||||
struct uio auio;
|
||||
struct iovec aiov;
|
||||
@ -532,11 +519,7 @@ sys_pwritev(struct thread *td, struct pwritev_args *uap)
|
||||
}
|
||||
|
||||
int
|
||||
kern_pwritev(td, fd, auio, offset)
|
||||
struct thread *td;
|
||||
struct uio *auio;
|
||||
int fd;
|
||||
off_t offset;
|
||||
kern_pwritev(struct thread *td, struct uio *auio, int fd, off_t offset)
|
||||
{
|
||||
struct file *fp;
|
||||
int error;
|
||||
@ -560,13 +543,8 @@ kern_pwritev(td, fd, auio, offset)
|
||||
* a file using the passed in uio, offset, and flags.
|
||||
*/
|
||||
static int
|
||||
dofilewrite(td, fd, fp, auio, offset, flags)
|
||||
struct thread *td;
|
||||
int fd;
|
||||
struct file *fp;
|
||||
struct uio *auio;
|
||||
off_t offset;
|
||||
int flags;
|
||||
dofilewrite(struct thread *td, int fd, struct file *fp, struct uio *auio,
|
||||
off_t offset, int flags)
|
||||
{
|
||||
ssize_t cnt;
|
||||
int error;
|
||||
@ -615,10 +593,7 @@ dofilewrite(td, fd, fp, auio, offset, flags)
|
||||
* descriptor isn't writable.
|
||||
*/
|
||||
int
|
||||
kern_ftruncate(td, fd, length)
|
||||
struct thread *td;
|
||||
int fd;
|
||||
off_t length;
|
||||
kern_ftruncate(struct thread *td, int fd, off_t length)
|
||||
{
|
||||
struct file *fp;
|
||||
int error;
|
||||
@ -647,9 +622,7 @@ struct ftruncate_args {
|
||||
};
|
||||
#endif
|
||||
int
|
||||
sys_ftruncate(td, uap)
|
||||
struct thread *td;
|
||||
struct ftruncate_args *uap;
|
||||
sys_ftruncate(struct thread *td, struct ftruncate_args *uap)
|
||||
{
|
||||
|
||||
return (kern_ftruncate(td, uap->fd, uap->length));
|
||||
@ -663,9 +636,7 @@ struct oftruncate_args {
|
||||
};
|
||||
#endif
|
||||
int
|
||||
oftruncate(td, uap)
|
||||
struct thread *td;
|
||||
struct oftruncate_args *uap;
|
||||
oftruncate(struct thread *td, struct oftruncate_args *uap)
|
||||
{
|
||||
|
||||
return (kern_ftruncate(td, uap->fd, uap->length));
|
||||
@ -1281,10 +1252,7 @@ selrescan(struct thread *td, fd_mask **ibits, fd_mask **obits)
|
||||
* each selinfo.
|
||||
*/
|
||||
static int
|
||||
selscan(td, ibits, obits, nfd)
|
||||
struct thread *td;
|
||||
fd_mask **ibits, **obits;
|
||||
int nfd;
|
||||
selscan(struct thread *td, fd_mask **ibits, fd_mask **obits, int nfd)
|
||||
{
|
||||
struct filedesc *fdp;
|
||||
struct file *fp;
|
||||
@ -1511,11 +1479,7 @@ pollrescan(struct thread *td)
|
||||
|
||||
|
||||
static int
|
||||
pollout(td, fds, ufds, nfd)
|
||||
struct thread *td;
|
||||
struct pollfd *fds;
|
||||
struct pollfd *ufds;
|
||||
u_int nfd;
|
||||
pollout(struct thread *td, struct pollfd *fds, struct pollfd *ufds, u_int nfd)
|
||||
{
|
||||
int error = 0;
|
||||
u_int i = 0;
|
||||
@ -1536,10 +1500,7 @@ pollout(td, fds, ufds, nfd)
|
||||
}
|
||||
|
||||
static int
|
||||
pollscan(td, fds, nfd)
|
||||
struct thread *td;
|
||||
struct pollfd *fds;
|
||||
u_int nfd;
|
||||
pollscan(struct thread *td, struct pollfd *fds, u_int nfd)
|
||||
{
|
||||
struct filedesc *fdp = td->td_proc->p_fd;
|
||||
struct file *fp;
|
||||
@ -1682,8 +1643,7 @@ selfdfree(struct seltd *stp, struct selfd *sfp)
|
||||
|
||||
/* Drain the waiters tied to all the selfd belonging the specified selinfo. */
|
||||
void
|
||||
seldrain(sip)
|
||||
struct selinfo *sip;
|
||||
seldrain(struct selinfo *sip)
|
||||
{
|
||||
|
||||
/*
|
||||
@ -1701,9 +1661,7 @@ seldrain(sip)
|
||||
* Record a select request.
|
||||
*/
|
||||
void
|
||||
selrecord(selector, sip)
|
||||
struct thread *selector;
|
||||
struct selinfo *sip;
|
||||
selrecord(struct thread *selector, struct selinfo *sip)
|
||||
{
|
||||
struct selfd *sfp;
|
||||
struct seltd *stp;
|
||||
@ -1752,17 +1710,14 @@ selrecord(selector, sip)
|
||||
|
||||
/* Wake up a selecting thread. */
|
||||
void
|
||||
selwakeup(sip)
|
||||
struct selinfo *sip;
|
||||
selwakeup(struct selinfo *sip)
|
||||
{
|
||||
doselwakeup(sip, -1);
|
||||
}
|
||||
|
||||
/* Wake up a selecting thread, and set its priority. */
|
||||
void
|
||||
selwakeuppri(sip, pri)
|
||||
struct selinfo *sip;
|
||||
int pri;
|
||||
selwakeuppri(struct selinfo *sip, int pri)
|
||||
{
|
||||
doselwakeup(sip, pri);
|
||||
}
|
||||
@ -1771,9 +1726,7 @@ selwakeuppri(sip, pri)
|
||||
* Do a wakeup when a selectable event occurs.
|
||||
*/
|
||||
static void
|
||||
doselwakeup(sip, pri)
|
||||
struct selinfo *sip;
|
||||
int pri;
|
||||
doselwakeup(struct selinfo *sip, int pri)
|
||||
{
|
||||
struct selfd *sfp;
|
||||
struct selfd *sfn;
|
||||
|
Loading…
Reference in New Issue
Block a user