Update function definitions and required include files to reflect

the current state of the system.

Approved by: alfred
This commit is contained in:
Chad David 2001-12-26 23:14:04 +00:00
parent 64dce2fedb
commit f16b3c0de4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=88509
61 changed files with 191 additions and 118 deletions

View File

@ -34,6 +34,9 @@
.Nd "locks a buffer"
.Sh SYNOPSIS
.In sys/param.h
.In sys/systm.h
.In sys/uio.h
.In sys/bio.h
.In sys/buf.h
.Ft int
.Fn BUF_LOCK "struct buf *bp" "int locktype"

View File

@ -34,6 +34,9 @@
.Nd "destroys a buffer's lock"
.Sh SYNOPSIS
.In sys/param.h
.In sys/systm.h
.In sys/uio.h
.In sys/bio.h
.In sys/buf.h
.Ft void
.Fn BUF_LOCKFREE "struct buf *bp"

View File

@ -34,6 +34,9 @@
.Nd "unlocks a locked buffer"
.Sh SYNOPSIS
.In sys/param.h
.In sys/systm.h
.In sys/uio.h
.In sys/bio.h
.In sys/buf.h
.Ft void
.Fn BUF_LOCKINIT "struct buf *bp"

View File

@ -34,6 +34,9 @@
.Nd "returns the reference count on a buffer's lock"
.Sh SYNOPSIS
.In sys/param.h
.In sys/systm.h
.In sys/uio.h
.In sys/bio.h
.In sys/buf.h
.Ft int
.Fn BUF_REFCNT "struct buf *bp"

View File

@ -34,6 +34,9 @@
.Nd "locks a buffer"
.Sh SYNOPSIS
.In sys/param.h
.In sys/systm.h
.In sys/uio.h
.In sys/bio.h
.In sys/buf.h
.Ft int
.Fn BUF_TIMELOCK "struct buf *bp" "int locktype" "char *wmesg" "int catch" "int timo"

View File

@ -34,6 +34,9 @@
.Nd "unlocks a locked buffer"
.Sh SYNOPSIS
.In sys/param.h
.In sys/systm.h
.In sys/uio.h
.In sys/bio.h
.In sys/buf.h
.Ft void
.Fn BUF_UNLOCK "struct buf *bp"

View File

@ -35,6 +35,8 @@
.Nm DECLARE_MODULE
.Nd kernel module declaration macro
.Sh SYNOPSIS
.In sys/param.h
.In sys/kernel.h
.In sys/module.h
.Fn DECLARE_MODULE "name" "moduledata_t data" "sub" "order"
.Sh DESCRIPTION

View File

@ -35,6 +35,8 @@
.Nm DEV_MODULE
.Nd device driver module declaration macro
.Sh SYNOPSIS
.In sys/param.h
.In sys/kernel.h
.In sys/module.h
.In sys/conf.h
.Fn DEV_MODULE "name" "modeventhand_t evh" "void *arg"

View File

@ -35,7 +35,8 @@
.Nm DRIVER_MODULE
.Nd kernel driver declaration macro
.Sh SYNOPSIS
.In sys/types.h
.In sys/param.h
.In sys/kernel.h
.In sys/bus.h
.In sys/module.h
.Fn DRIVER_MODULE name busname "driver_t driver" "devclass_t devclass" "modeventhand_t evh" "void *arg"

View File

@ -35,8 +35,10 @@
.Nm KASSERT
.Nd kernel expression verification macro
.Sh SYNOPSIS
.In sys/param.h
.In sys/systm.h
.Cd options INVARIANTS
.Fn KASSERT expression "const char *msg"
.Fn KASSERT expression msg
.Sh DESCRIPTION
In a kernel compiled with "options INVARIANTS",
the
@ -66,6 +68,9 @@ vput(vp)
...
}
.Ed
.Sh NOTES
.Fa msg
must be enclosed in brackets.
.Sh SEE ALSO
.Xr config 8 ,
.Xr panic 9

View File

@ -35,6 +35,7 @@
.Nm MODULE_DEPEND
.Nd set kernel module dependencies
.Sh SYNOPSIS
.In sys/param.h
.In sys/module.h
.Fn MODULE_DEPEND "name" "moddepend" "int minversion" "int prefversion" "int maxversion"
.Sh DESCRIPTION

View File

@ -35,6 +35,7 @@
.Nm MODULE_VERSION
.Nd set kernel module version
.Sh SYNOPSIS
.In sys/param.h
.In sys/module.h
.Fn MODULE_VERSION "name" "int version"
.Sh DESCRIPTION

View File

@ -35,6 +35,8 @@
.Nm SYSCALL_MODULE
.Nd syscall kernel module declaration macro
.Sh SYNOPSIS
.In sys/param.h
.In sys/kernel.h
.In sys/proc.h
.In sys/module.h
.In sys/sysent.h

View File

@ -39,7 +39,7 @@
.In sys/mount.h
.In sys/vnode.h
.Ft int
.Fn VFS_MOUNT "struct mount *mp" "char *path" "caddr_t data" "struct nameidata *ndp" "struct proc *p"
.Fn VFS_MOUNT "struct mount *mp" "char *path" "caddr_t data" "struct nameidata *ndp" "struct thread *td"
.Sh DESCRIPTION
Mount a filesystem into the system's namespace.
.Pp
@ -56,8 +56,8 @@ Filesystem specific data. This should be read into the kernel using
Contains the result of a
.Xr namei 9
call on the pathname of the mountpoint.
.It Ar p
Process which is mounting the filesystem.
.It Ar td
Thread which is mounting the filesystem.
.El
.Pp
This is called both to mount new filesystems and to change the

View File

@ -39,7 +39,7 @@
.In sys/mount.h
.In sys/vnode.h
.Ft int
.Fn VFS_QUOTACTL "struct mount *mp" "int cmds" "uid_t uid" "caddr_t arg" "struct proc *p"
.Fn VFS_QUOTACTL "struct mount *mp" "int cmds" "uid_t uid" "caddr_t arg" "struct thread *td"
.Sh DESCRIPTION
Implement filesystem quotas. See
.Xr quotactl 2

View File

@ -35,9 +35,11 @@
.Vt vfsconf
.Sh SYNOPSIS
.In sys/param.h
.In sys/kernel.h
.In sys/module.h
.In sys/mount.h
.Ft void
.Fn VFS_SET "struct vfsops *vfsops" "char *fsname" "int flags"
.Fn VFS_SET "struct vfsops *vfsops" "fsname" "int flags"
.Sh DESCRIPTION
.Fn VFS_SET
creates a

View File

@ -39,7 +39,7 @@
.In sys/mount.h
.In sys/vnode.h
.Ft int
.Fn VFS_START "struct mount *mp" "int flags" "struct proc *p"
.Fn VFS_START "struct mount *mp" "int flags" "struct thread *td"
.Sh DESCRIPTION
This is called after
.Xr VFS_MOUNT 9
@ -50,8 +50,8 @@ Its arguments are:
The filesystem.
.It Ar flags
??
.It Ar p
Process which is starting the filesystem.
.It Ar td
Thread which is starting the filesystem.
.El
.Sh SEE ALSO
.Xr VFS 9 ,

View File

@ -39,7 +39,7 @@
.In sys/mount.h
.In sys/vnode.h
.Ft int
.Fn VFS_STATFS "struct mount *mp" "struct statfs *sbp" "struct proc *p"
.Fn VFS_STATFS "struct mount *mp" "struct statfs *sbp" "struct thread *td"
.Sh DESCRIPTION
This call returns various pieces of information about the filesystem,
including recommended I/O sizes, free space, free inodes, etc.
@ -50,8 +50,8 @@ Its arguments are:
The filesystem.
.It Ar sbp
Return parameter for the filesystem's status.
.It Ar p
The process which is querying the filesystem.
.It Ar td
The thread which is querying the filesystem.
.El
.Sh SEE ALSO
.Xr VFS 9 ,

View File

@ -39,7 +39,7 @@
.In sys/mount.h
.In sys/vnode.h
.Ft int
.Fn VFS_SYNC "struct mount *mp" "int waitfor" "struct ucred *cred" "struct proc *p"
.Fn VFS_SYNC "struct mount *mp" "int waitfor" "struct ucred *cred" "struct thread *td"
.Sh DESCRIPTION
This writes out all unwritten data in a filesystem.
.Pp
@ -60,8 +60,8 @@ push data not written by filesystem syncer
.El
.It Ar cred
The caller's credentials.
.It Ar p
The calling process.
.It Ar td
The calling thread.
.El
.Pp
This would normally call

View File

@ -39,7 +39,7 @@
.In sys/mount.h
.In sys/vnode.h
.Ft int
.Fn VFS_UNMOUNT "struct mount *mp" "int mntflags" "struct proc *p"
.Fn VFS_UNMOUNT "struct mount *mp" "int mntflags" "struct thread *td"
.Sh DESCRIPTION
Unmount a filesystem.
.Pp
@ -49,8 +49,8 @@ Its arguments are:
The filesystem.
.It Ar mntflags
Various flags.
.It Ar p
Process which is unmounting the filesystem.
.It Ar td
Thread which is unmounting the filesystem.
.El
.Pp
If the

View File

@ -35,8 +35,7 @@
.Sh SYNOPSIS
.In sys/types.h
.In sys/systm.h
.Ft "typedef void" ( *forklist_fn )
.Fa ( "struct proc*" , "struct proc*" , int ) ;
.Ft "typedef void" ( *forklist_fn ) ( "struct proc*" , "struct proc*" , int ) ;
.Pp
.Ft int
.Fn at_fork "forklist_fn func"

View File

@ -33,14 +33,18 @@
.Nm bios32
.Nd interact with PC BIOS
.Sh SYNOPSIS
.In sys/types.h
.In sys/param.h
.In vm/vm.h
.In vm/pmap.h
.In machine/param.h
.In machine/pmap.h
.In machine/pc/bios.h
.Ft u_int32_t
.Fn bios_sigsearch "u_int32_t start" "u_char *sig" "int siglen" "int paralen" "int sigofs"
.Ft int
.Fn bios32_SDlookup "struct bios32_SDentry *ent"
.Ft void
.Fn bios32 "caddr_t entry" "struct bios32_args *args"
.Ft int
.Fn bios32 "struct bios_regs *br" "u_int offset" "u_short segment"
.Fn BIOS_PADDRTOVADDR "addr"
.Fn BIOS_VADDRTOPADDR "addr"
.Vt extern struct bios32_SDentry PCIbios ;

View File

@ -44,6 +44,8 @@
.Nm cv_wmesg
.Nd kernel condition variable
.Sh SYNOPSIS
.In sys/param.h
.In sys/proc.h
.In sys/condvar.h
.Ft void
.Fn cv_init "struct cv *cvp" "const char *desc"
@ -62,7 +64,7 @@
.Ft void
.Fn cv_broadcast "struct cv *cvp"
.Ft void
.Fn cv_waitq_remove "struct proc *p"
.Fn cv_waitq_remove "struct thread *td"
.Ft int
.Fn cv_waitq_empty "struct cv *cvp"
.Ft const char *

View File

@ -34,10 +34,10 @@
.Sh SYNOPSIS
.In sys/types.h
.In sys/systm.h
.Ft critical_t
.Ft void
.Fn critical_enter "void"
.Ft void
.Fn critical_exit "critical_t savecrit"
.Fn critical_exit "void"
.Sh DESCRIPTION
These functions are used to prevent preemption in a critcal region of code.
All that is guaranteed is that the current CPU will not be preempted by an

View File

@ -35,6 +35,7 @@
.Vt cdevsw
structure
.Sh SYNOPSIS
.In sys/param.h
.In sys/conf.h
.Ft "struct cdevsw *"
.Fn devsw "dev_t dev"

View File

@ -39,6 +39,7 @@
.Nd "network domain management"
.Sh SYNOPSIS
.In sys/param.h
.In sys/kernel.h
.In sys/protosw.h
.In sys/domain.h
.Ft void

View File

@ -32,6 +32,8 @@
.Nd get the CPU's fast counter register contents
.Sh SYNOPSIS
.In sys/param.h
.In sys/queue.h
.In machine/cpufunc.h
.In machine/cpu.h
.Ft u_int64_t
.Fn get_cyclecounter "void"

View File

@ -32,6 +32,8 @@
.Nd get the CPU's fast counter register contents
.Sh SYNOPSIS
.In sys/param.h
.In sys/queue.h
.In machine/cpufunc.h
.In machine/cpu.h
.Ft u_int64_t
.Fn get_cyclecounter "void"

View File

@ -37,7 +37,7 @@
.Nm if_data
.Nd kernel interfaces for manipulating network interfaces
.Sh SYNOPSIS
.In sys/types.h
.In sys/param.h
.In sys/time.h
.In sys/socket.h
.In net/if.h
@ -50,13 +50,13 @@
.Ft void
.Fn if_down "struct ifnet *ifp"
.Ft int
.Fn ifioctl "struct socket *so" "u_long cmd" "caddr_t data" "struct proc *p"
.Fn ifioctl "struct socket *so" "u_long cmd" "caddr_t data" "struct thread *td"
.Ft int
.Fn ifpromisc "struct ifnet *ifp" "int pswitch"
.Ft int
.Fn if_allmulti "struct ifnet *ifp" "int amswitch"
.Ft "struct ifnet *"
.Fn ifunit "char *name"
.Fn ifunit "const char *name"
.Ft void
.Fn if_up "struct ifnet *ifp"
.\"
@ -71,7 +71,6 @@
.Fn ifaof_ifpforaddr "struct sockaddr *addr" "struct ifnet *ifp"
.Ft void
.Fn ifafree "struct ifaddr *ifa"
.Ft void \"macro
.Fn IFAFREE "struct ifaddr *ifa"
.\"
.Ss "Interface multicast address functions"
@ -82,9 +81,7 @@
.Ft "struct ifmultiaddr *"
.Fn ifmaof_ifpforaddr "struct sockaddr *addr" "struct ifnet *ifp"
.Ss "Output queue macros"
.Ft void \"macro
.Fn IF_ENQ_DROP "struct ifqueue *ifq" "struct mbuf *m"
.Ft void \"macro
.Fn IF_DEQUEUE "struct ifqueue *ifq" "struct mbuf *m"
.\"
.Ss "struct ifnet member functions"
@ -803,8 +800,8 @@ Process the ioctl request
.Ar cmd ,
issued on socket
.Ar so
by process
.Ar p ,
by thread
.Ar td ,
with data parameter
.Ar data .
This is the main routine for handling all interface configuration

View File

@ -44,7 +44,8 @@
.Nm useracc
.Nd check memory regions for accessibility
.Sh SYNOPSIS
.In sys/types.h
.In sys/param.h
.In sys/proc.h
.In vm/vm.h
.In vm/vm_extern.h
.Ft int

View File

@ -49,7 +49,7 @@
.Fn kobj_init "kobj_t obj" "kobj_class_t cls"
.Ft void
.Fn kobj_delete "kobj_t obj" "struct malloc_type *mtype"
.Fn DEFINE_CLASS name methods size
.Fn DEFINE_CLASS name "kobj_method_t *methods" "size_t size"
.Sh DESCRIPTION
The kernel object system implements an object-oriented programming
system in the

View File

@ -31,6 +31,7 @@
.Nm CTR0 , CTR1 , CTR2 , CTR3 , CTR4 , CTR5
.Nd kernel tracing facility
.Sh SYNOPSIS
.In sys/param.h
.In sys/ktr.h
.Vt "extern int ktr_cpumask" ;
.Vt "extern int ktr_entries" ;

View File

@ -33,18 +33,18 @@
.Nm lockmgr ,
.Nm lockcount ,
.Nm lockstatus
.Nd kernel process locking
.Nd kernel thread locking
.Sh SYNOPSIS
.In sys/types.h
.In sys/lock.h
.Ft void
.Fn lockinit "struct lock *lkp" "int prio" "char *wmesg" "int timo" "int flags"
.Ft int
.Fn lockmgr "struct lock *lkp" "u_int flags" "struct simplelock *interlkp" "struct proc *p"
.Fn lockmgr "struct lock *lkp" "u_int flags" "struct mtx *interlkp" "struct thread *td"
.Ft int
.Fn lockcount "struct lock *lkp"
.Ft int
.Fn lockstatus "struct lock *lkp" "struct proc *p"
.Fn lockstatus "struct lock *lkp" "struct thread *td"
.Sh DESCRIPTION
The function
.Fn lockinit
@ -64,35 +64,35 @@ The following values are defined:
.Bl -tag -width "LK_XXXXXXXXXXXX" -compact
.It Dv LK_SHARED
get one of many possible shared locks.
If a process holding an exclusive lock requests a shared lock,
If a thread holding an exclusive lock requests a shared lock,
the exclusive lock(s) will be downgraded to shared locks.
.It Dv LK_EXCLUSIVE
stop further shared locks, when they are cleared,
grant a pending upgrade if it exists, then grant an exclusive
lock.
Only one exclusive lock may exist at a time, except that
a process holding an exclusive lock may get additional exclusive
a thread holding an exclusive lock may get additional exclusive
locks if it explicitly sets the LK_CANRECURSE flag in the lock
request, or if the LK_CANRECUSE flag was set when the lock was
initialized.
.It Dv LK_UPGRADE
the process must hold a shared lock that it wants to
the thread must hold a shared lock that it wants to
have upgraded to an exclusive lock.
Other processes may get exclusive access to the resource between
Other threads may get exclusive access to the resource between
the time that the upgrade is requested and the time that it is
granted.
.It Dv LK_EXCLUPGRADE
the process must hold a shared lock that it wants to
the thread must hold a shared lock that it wants to
have upgraded to an exclusive lock.
If the request succeeds, no other processes will have gotten
If the request succeeds, no other thread will have gotten
exclusive access to the resource between the time that the upgrade
is requested and the time that it is granted.
However, if another process has already requested an upgrade,
However, if another thread has already requested an upgrade,
the request will fail.
.It Dv LK_DOWNGRADE
the process must hold an exclusive lock that it wants
the thread must hold an exclusive lock that it wants
to have downgraded to a shared lock.
If the process holds multiple (recursive) exclusive locks,
If the thread holds multiple (recursive) exclusive locks,
they will all be downgraded to shared locks.
.It Dv LK_RELEASE
release one instance of a lock.
@ -103,12 +103,12 @@ This feature is used before freeing a lock that is part of a
piece of memory that is about to be freed.
.It Dv LK_EXCLOTHER
return for lockstatus().
Used when another process holds the lock exclusively.
Used when another thread holds the lock exclusively.
.El
.Sh RETURN VALUES
Successfully obtained locks return 0.
Locks will always succeed unless one of the following is true:
LK_FORCEUPGRADE is requested and some other process has already
LK_FORCEUPGRADE is requested and some other thread has already
requested a lock upgrade; returns
.Er EBUSY .
LK_WAIT is set and a sleep would be required; returns

View File

@ -33,9 +33,9 @@
.Nm lockdestroy
.Nd "destroys a lock"
.Sh SYNOPSIS
.In sys/types.h
.In sys/param.h
.In sys/lockmgr.h
.Ft int
.Ft void
.Fn lockdestroy "struct lock *lkp"
.Sh DESCRIPTION
The

View File

@ -51,6 +51,7 @@
.Li kldload libmchain
.Pp
.In sys/param.h
.In sys/uio.h
.In sys/mchain.h
.Ft int
.Fn mb_init "struct mbchain *mbp"

View File

@ -34,6 +34,7 @@
.\"
.Sh SYNOPSIS
.In sys/param.h
.In sys/systm.h
.In sys/mbuf.h
.\"
.Ss Mbuf allocation macros
@ -55,15 +56,20 @@
.Fn MFREE "struct mbuf *mbuf" "struct mbuf *successor"
.\"
.Ss Mbuf utility macros
.Fn mtod "struct mbuf *mbuf" "any type"
.Ft void *
.Fn mtod "struct mbuf *mbuf" "type"
.Ft int
.Fn MEXT_IS_REF "struct mbuf *mbuf"
.Fn M_COPY_PKTHDR "struct mbuf *to" "struct mbuf *from"
.Fn M_ALIGN "struct mbuf *mbuf" "u_int len"
.Fn MH_ALIGN "struct mbuf *mbuf" "u_int len"
.Ft int
.Fn M_LEADINGSPACE "struct mbuf *mbuf"
.Ft int
.Fn M_TRAILINGSPACE "struct mbuf *mbuf"
.Fn M_PREPEND "struct mbuf *mbuf" "int len" "int how"
.Fn MCHTYPE "struct mbuf *mbuf" "u_int type"
.Ft int
.Fn M_WRITABLE "struct mbuf *mbuf"
.\"
.Ss Mbuf allocation functions

View File

@ -52,6 +52,7 @@
.Li kldload libmchain
.Pp
.In sys/param.h
.In sys/uio.h
.In sys/mchain.h
.Ft void
.Fn md_initm "struct mdchain *mdp" "struct mbuf *m"

View File

@ -40,12 +40,13 @@
.Nm NDINIT
.Nd convert pathname to a pointer to a locked vnode
.Sh SYNOPSIS
.In sys/types.h
.In sys/param.h
.In sys/proc.h
.In sys/namei.h
.Ft int
.Fn namei "struct nameidata *ndp"
.Ft void
.Fn NDINIT "struct nameidata *ndp" "u_long operation" "u_long operflags" "enum uio_seg segflag" "const char *path" "struct proc *proc"
.Fn NDINIT "struct nameidata *ndp" "u_long operation" "u_long operflags" "enum uio_seg segflag" "const char *path" "struct thread *td"
.Ft void
.Fn NDFREE "struct nameidata *ndp" "u_int operflags"
.Sh DESCRIPTION
@ -89,8 +90,8 @@ userspace (UIO_USERSPACE) or in the kernel address space (UIO_SYSSPACE).
.It Ar path
Pointer to pathname buffer (the file or directory name that will be
looked up)
.It Ar proc
Which process context to use for the
.It Ar td
Which thread context to use for the
.Fn namei
locks.
.El

View File

@ -37,14 +37,23 @@
.Sh SYNOPSIS
.In sys/param.h
.In sys/mbuf.h
.In sys/socket.h
.In net/if.h
.In net/pfil.h
.Ft struct packet_filter_hook *
.Fn pfil_hook_get "int" "struct pfil_head *"
.Ft void
.Fn pfil_add_hook "int (*func)()" "int flags" "struct pfil_head *"
.Ft void
.Fn pfil_remove_hook "int (*func)()" "int flags" "struct pfil_head *"
.Fn pfil_hook_get "int flag" "struct pfil_head *ph"
.Ft int
.Fo pfil_add_hook
.Fa "int (*func)(void *, int, struct ifnet *, int, struct mbuf **)"
.Fa "int flags"
.Fa "struct pfil_head *ph"
.Fc
.Ft int
.Fo pfil_remove_hook
.Fa "int (*func)(void *, int, struct ifnet *, int, struct mbuf **)"
.Fa "int flags"
.Fa "struct pfil_head *ph"
.Fc
.\"(void *, int, struct ifnet *, int, struct mbuf **)
.Sh DESCRIPTION
The

View File

@ -31,6 +31,7 @@
.Nm pfind , zpfind
.Nd locate a process by number
.Sh SYNOPSIS
.In sys/param.h
.In sys/proc.h
.Ft "struct proc *"
.Fn pfind "pid_t pid"

View File

@ -31,6 +31,7 @@
.Nm pgfind
.Nd "locate a process group by number"
.Sh SYNOPSIS
.In sys/param.h
.In sys/proc.h
.Ft "struct pgrp *"
.Fn pgfind "pid_t pgid"

View File

@ -45,6 +45,7 @@
.Sh SYNOPSIS
.In sys/param.h
.In sys/systm.h
.In sys/bio.h
.In sys/buf.h
.Ft int
.Fn physio "dev_t dev" "struct uio *uio" "int ioflag"

View File

@ -35,13 +35,14 @@
.Nm resource_int_value , resource_long_value , resource_string_value
.Nd get a value from the hints mechanism
.Sh SYNOPSIS
.In sys/param.h
.In sys/bus.h
.Ft int
.Fn resource_int_value "const char *name" "int unit" "const char *resname" "int *result"
.Ft int
.Fn resource_long_value "const char *name" "int unit" "const char *resname" "long *result"
.Ft int
.Fn resource_string_value "const char *name" "int unit" "const char *resname" "char **result"
.Fn resource_string_value "const char *name" "int unit" "const char *resname" "const char **result"
.Sh DESCRIPTION
These functions fetch a value from the
.Dq hints

View File

@ -37,6 +37,7 @@
.Dq hints
database for matches
.Sh SYNOPSIS
.In sys/param.h
.In sys/bus.h
.Ft int
.Fn resource_query_string "int num" "const char *field" "const char *what"

View File

@ -39,14 +39,14 @@
.Vt "extern struct rq rtqueues[]" ;
.Vt "extern struct rq queues[]" ;
.Vt "extern struct rq idqueues[]" ;
.Ft struct proc *
.Fn chooseproc "void"
.Ft u_int32_t
.Ft struct thread *
.Fn choosethread "void"
.Ft int
.Fn procrunnable "void"
.Ft void
.Fn remrunqueue "struct proc *p"
.Fn remrunqueue "struct thread *td"
.Ft void
.Fn setrunqueue "struct proc *p"
.Fn setrunqueue "struct thread *td"
.Sh DESCRIPTION
The run queue consists of four priority queues:
.Va itqueues
@ -95,24 +95,24 @@ may have to require that the
.Va sched_lock
mutex be acquired.
.Pp
.Fn chooseproc
returns the highest priority runnable process.
If there are no runnable processes, then the idle process is returned.
.Fn choosethread
returns the highest priority runnable thread.
If there are no runnable threads, then the idle thread is returned.
This function is called by
.Fn cpu_switch
and
.Fn cpu_throw
to determine which process to switch to.
.Fn chooseproc
to determine which thread to switch to.
.Fn choosethread
must be called with the
.Va sched_lock
mutex held.
.Pp
.Fn setrunqueue
adds the process
.Fa p
adds the thread
.Fa td
to the tail of the appropriate queue in the proper priority queue.
The process must be runnable, i.e.\&
The thread must be runnable, i.e.\&
.Va p_stat
must be set to
.Dv SRUN .
@ -121,11 +121,11 @@ This function must be called with the
mutex held.
.Pp
.Fn remrunqueue
removes process
.Fa p
removes thread
.Fa td
from its run queue.
If
.Fa p
.Fa td
is not on a run queue, then the kernel will
.Xr panic 9 .
This function must be called with the

View File

@ -44,11 +44,11 @@
.Ft int
.Fn curpriority_cmp "struct proc *p"
.Ft void
.Fn maybe_resched "struct proc *chk"
.Fn maybe_resched "struct ksegrp *kg"
.Ft void
.Fn propagate_priority "struct proc *p"
.Ft void
.Fn resetpriority "struct proc *p"
.Fn resetpriority "struct ksegrp *kg"
.Ft void
.Fn roundrobin "void *arg"
.Ft int
@ -56,13 +56,13 @@
.Ft void
.Fn sched_setup "void *dummy"
.Ft void
.Fn schedclock "struct proc *p"
.Fn schedclock "struct thread *td"
.Ft void
.Fn schedcpu "void *arg"
.Ft void
.Fn setrunnable "struct proc *p"
.Fn setrunnable "struct thread *td"
.Ft void
.Fn updatepri "struct proc *p"
.Fn updatepri "struct thread *td"
.Sh DESCRIPTION
Each process has three different priorities stored in
.Vt "struct proc" :

View File

@ -41,6 +41,7 @@
.Nd kernel counting semaphore
.Sh SYNOPSIS
.In sys/types.h
.In sys/lock.h
.In sys/sema.h
.Ft void
.Fn sema_init "struct sema *sema" "int value" "const char *description"

View File

@ -39,7 +39,7 @@
.Ft void
.Fn sleepinit "void"
.Ft void
.Fn unsleep "struct proc *p"
.Fn unsleep "struct thread *td"
.Sh DESCRIPTION
The sleep queues used by
.Xr msleep 9

View File

@ -44,9 +44,9 @@
.In sys/param.h
.In sys/systm.h
.Ft int
.Fn suser "const struct proc *proc"
.Fn suser "struct proc *proc"
.Ft int
.Fn suser_xxx "const struct ucred *cred" "const struct proc *proc" "int flags"
.Fn suser_xxx "struct ucred *cred" "struct proc *proc" "int flag"
.Sh DESCRIPTION
The
.Nm

View File

@ -62,14 +62,14 @@
.Fc
.Ft struct sysctl_oid_list *
.Fo SYSCTL_STATIC_CHILDREN
.Fa OID_NAME
.Fa "struct sysctl_oid_list OID_NAME"
.Fc
.Ft struct sysctl_oid *
.Fo SYSCTL_ADD_OID
.Fa "struct sysctl_ctx_list *ctx"
.Fa "struct sysctl_oid_list *parent"
.Fa "int number"
.Fa NAME
.Fa "const char *name"
.Fa "int kind"
.Fa "void *arg1"
.Fa "int arg2"
@ -82,7 +82,7 @@
.Fa "struct sysctl_ctx_list *ctx"
.Fa "struct sysctl_oid_list *parent"
.Fa "int number"
.Fa NAME
.Fa "const char *name"
.Fa "int access"
.Fa "int (*handler) (SYSCTL_HANDLER_ARGS)"
.Fa "const char *descr"
@ -92,10 +92,10 @@
.Fa "struct sysctl_ctx_list *ctx"
.Fa "struct sysctl_oid_list *parent"
.Fa "int number"
.Fa NAME
.Fa "const char *name"
.Fa "int access"
.Fa "char *arg"
.Fa 0
.Fa "int len"
.Fa "const char *descr"
.Fc
.Ft struct sysctl_oid *
@ -103,10 +103,10 @@
.Fa "struct sysctl_ctx_list *ctx"
.Fa "struct sysctl_oid_list *parent"
.Fa "int number"
.Fa NAME
.Fa "const char *name"
.Fa "int access"
.Fa "int *arg"
.Fa 0
.Fa "int len"
.Fa "const char *descr"
.Fc
.Ft struct sysctl_oid *
@ -114,10 +114,10 @@
.Fa "struct sysctl_ctx_list *ctx"
.Fa "struct sysctl_oid_list *parent"
.Fa "int number"
.Fa NAME
.Fa "const char *name"
.Fa "int access"
.Fa "unsigned int *arg"
.Fa 0
.Fa "int len"
.Fa "const char *descr"
.Fc
.Ft struct sysctl_oid *
@ -125,10 +125,9 @@
.Fa "struct sysctl_ctx_list *ctx"
.Fa "struct sysctl_oid_list *parent"
.Fa "int number"
.Fa NAME
.Fa "const char *name"
.Fa "int access"
.Fa "long *arg"
.Fa 0
.Fa "const char *descr"
.Fc
.Ft struct sysctl_oid *
@ -136,10 +135,9 @@
.Fa "struct sysctl_ctx_list *ctx"
.Fa "struct sysctl_oid_list *parent"
.Fa "int number"
.Fa NAME
.Fa "const char *name"
.Fa "int access"
.Fa "unsigned long *arg"
.Fa 0
.Fa "const char *descr"
.Fc
.Ft struct sysctl_oid *
@ -147,10 +145,10 @@
.Fa "struct sysctl_ctx_list *ctx"
.Fa "struct sysctl_oid_list *parent"
.Fa "int number"
.Fa NAME
.Fa "const char *name"
.Fa "int access"
.Fa "void *arg"
.Fa "size_t *len"
.Fa "int len"
.Fa "const char *format"
.Fa "const char *descr"
.Fc
@ -159,10 +157,10 @@
.Fa "struct sysctl_ctx_list *ctx"
.Fa "struct sysctl_oid_list *parent"
.Fa "int number"
.Fa NAME
.Fa "const char *name"
.Fa "int access"
.Fa "struct TYPE *arg"
.Fa TYPE
.Fa "void *arg"
.Fa STRUCT_NAME
.Fa "const char *descr"
.Fc
.Ft struct sysctl_oid *
@ -170,10 +168,10 @@
.Fa "struct sysctl_ctx_list *ctx"
.Fa "struct sysctl_oid_list *parent"
.Fa "int number"
.Fa NAME
.Fa "const char *name"
.Fa "int access"
.Fa 0
.Fa 0
.Fa "void *arg1"
.Fa "int arg2"
.Fa "int (*handler) (SYSCTL_HANDLER_ARGS)"
.Fa "const char *format"
.Fa "const char *descr"

View File

@ -36,6 +36,8 @@
.Nd asynchronous task execution
.Sh SYNOPSIS
.In sys/param.h
.In sys/kernel.h
.In sys/malloc.h
.In sys/queue.h
.In sys/taskqueue.h
.Bd -literal
@ -63,9 +65,9 @@ struct task {
.Fn taskqueue_enqueue "struct taskqueue *queue" "struct task *task"
.Ft void
.Fn taskqueue_run "struct taskqueue *queue"
.Fn TASK_INIT "task" "priority" "func" "context"
.Fn TASK_INIT "struct task *task" "int priority" "task_fn_t *func" "void *context"
.Fn TASKQUEUE_DECLARE "name"
.Fn TASKQUEUE_DEFINE "name" "enqueue" "context" "init"
.Fn TASKQUEUE_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init"
.Sh DESCRIPTION
These functions provide a simple interface for asynchronous execution
of code.

View File

@ -43,7 +43,7 @@
.In sys/ucred.h
.Ft "struct ucred *"
.Fn crget void
.Ft void
.Ft "struct ucred *"
.Fn crhold "struct ucred *cr"
.Ft void
.Fn crfree "struct ucred *cr"

View File

@ -38,6 +38,7 @@
.Nd "functions for managing UID information"
.Sh SYNOPSIS
.In sys/param.h
.In sys/proc.h
.In sys/resourcevar.h
.Ft void
.Fn uihashinit void

View File

@ -32,7 +32,7 @@
.Nm vaccess
.Nd generate an access control decision using vnode parameters
.Sh SYNOPSIS
.In sys/types.h
.In sys/param.h
.In sys/vnode.h
.Ft int
.Fo vaccess

View File

@ -32,7 +32,7 @@
.Nm vaccess_acl_posix1e
.Nd generate a POSIX.1e ACL access control decision using vnode parameters
.Sh SYNOPSIS
.In sys/types.h
.In sys/param.h
.In sys/vnode.h
.In sys/acl.h
.Ft int

View File

@ -40,7 +40,8 @@
.Nm count_dev
.Nd "get total number of references to a device"
.Sh SYNOPSIS
.In sys/types.h
.In sys/param.h
.In sys/time.h
.In sys/conf.h
.In sys/vnode.h
.Ft int

View File

@ -31,6 +31,7 @@
.Nm vfs_unmountall
.Nd unmount all file systems
.Sh SYNOPSIS
.In sys/param.h
.In sys/mount.h
.Ft void
.Fn vfs_unmountall "void"

View File

@ -38,7 +38,7 @@
.In sys/param.h
.In sys/vnode.h
.Ft int
.Fn vget "struct vnode *vp" "int lockflag" "struct proc *p"
.Fn vget "struct vnode *vp" "int lockflag" "struct thread *td"
.Sh DESCRIPTION
Get a vnode from the free list and increment its reference count.
.Bl -tag -width lockflag

View File

@ -37,7 +37,7 @@
.In vm/vm.h
.In vm/vm_page.h
.Ft void
.Fn vm_set_page_size
.Fn vm_set_page_size void
.Sh DESCRIPTION
The
.Fn vm_set_page_size

View File

@ -44,7 +44,8 @@
.Nm vsunlock
.Nd lock/unlock user space addresses in memory
.Sh SYNOPSIS
.In sys/types.h
.In sys/param.h
.In sys/proc.h
.In vm/vm.h
.In vm/vm_extern.h
.Ft void

View File

@ -38,6 +38,7 @@
.Nd zone allocator
.Sh SYNOPSIS
.In sys/param.h
.In sys/queue.h
.In vm/vm_zone.h
.Ft void
.Fn zbootinit "vm_zone_t z" "char *name" "int size" "void *item" "int nitems"