FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/aio.h>
#include <sys/domain.h>
#include <sys/file.h>
#include <sys/filedesc.h>
#include <sys/kernel.h>
#include <sys/kthread.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/protosw.h>
#include <sys/sigio.h>
#include <sys/signal.h>
#include <sys/signalvar.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/filio.h>
#include <sys/sockio.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
#include <sys/sysproto.h>
#include <sys/taskqueue.h>
#include <sys/uio.h>
#include <sys/ucred.h>
#include <sys/un.h>
#include <sys/unpcb.h>
#include <sys/user.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/route.h>
#include <net/vnet.h>
#include <netinet/in.h>
#include <netinet/in_pcb.h>
#include <security/mac/mac_framework.h>
#include <vm/vm.h>
#include <vm/pmap.h>
#include <vm/vm_extern.h>
#include <vm/vm_map.h>
Go to the source code of this file.
Macros | |
#define | aio_done backend3 |
Functions | |
__FBSDID ("$FreeBSD$") | |
static | SYSCTL_NODE (_kern_ipc, OID_AUTO, aio, CTLFLAG_RD|CTLFLAG_MPSAFE, NULL, "socket AIO stats") |
SYSCTL_INT (_kern_ipc_aio, OID_AUTO, empty_results, CTLFLAG_RD, &empty_results, 0, "socket operation returned EAGAIN") | |
SYSCTL_INT (_kern_ipc_aio, OID_AUTO, empty_retries, CTLFLAG_RD, &empty_retries, 0, "socket operation retries") | |
static void | soo_aio_cancel (struct kaiocb *job) |
static int | soo_read (struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td) |
static int | soo_write (struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td) |
static int | soo_ioctl (struct file *fp, u_long cmd, void *data, struct ucred *active_cred, struct thread *td) |
static int | soo_poll (struct file *fp, int events, struct ucred *active_cred, struct thread *td) |
static int | soo_stat (struct file *fp, struct stat *ub, struct ucred *active_cred) |
static int | soo_close (struct file *fp, struct thread *td) |
static int | soo_fill_kinfo (struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) |
static | STAILQ_HEAD (task) |
static void | soaio_kproc_create (void *context, int pending) |
void | soaio_enqueue (struct task *task) |
static void | soaio_init (void) |
SYSINIT (soaio, SI_SUB_VFS, SI_ORDER_ANY, soaio_init, NULL) | |
static __inline int | soaio_ready (struct socket *so, struct sockbuf *sb) |
static void | soaio_process_job (struct socket *so, struct sockbuf *sb, struct kaiocb *job) |
static void | soaio_process_sb (struct socket *so, struct sockbuf *sb) |
void | soaio_rcv (void *context, int pending) |
void | soaio_snd (void *context, int pending) |
void | sowakeup_aio (struct socket *so, struct sockbuf *sb) |
static int | soo_aio_queue (struct file *fp, struct kaiocb *job) |
Variables | |
static int | empty_results |
static int | empty_retries |
static fo_rdwr_t | soo_read |
static fo_rdwr_t | soo_write |
static fo_ioctl_t | soo_ioctl |
static fo_poll_t | soo_poll |
fo_kqfilter_t | soo_kqfilter |
static fo_stat_t | soo_stat |
static fo_close_t | soo_close |
static fo_fill_kinfo_t | soo_fill_kinfo |
static fo_aio_queue_t | soo_aio_queue |
struct fileops | socketops |
#define aio_done backend3 |
Definition at line 437 of file sys_socket.c.
__FBSDID | ( | "$FreeBSD$" | ) |
void soaio_enqueue | ( | struct task * | task | ) |
Definition at line 562 of file sys_socket.c.
References taskqueue_enqueue(), and wakeup_one().
Referenced by sowakeup_aio().
|
static |
Definition at line 578 of file sys_socket.c.
References new_unrhdr(), and soaio_kproc_create().
|
static |
Definition at line 520 of file sys_socket.c.
References alloc_unr(), free_unr(), and kproc_create().
Referenced by soaio_init().
|
static |
Definition at line 596 of file sys_socket.c.
References aio_cancel(), aio_complete(), aio_set_cancel_function(), aio_switch_vmspace(), empty_results, empty_retries, flags, kern_psignal(), soaio_ready(), soo_aio_cancel(), soreceive(), and sosend().
Referenced by soaio_process_sb().
|
static |
Definition at line 705 of file sys_socket.c.
References aio_clear_cancel_function(), soaio_process_job(), and soaio_ready().
Referenced by soaio_rcv(), and soaio_snd().
void soaio_rcv | ( | void * | context, |
int | pending | ||
) |
Definition at line 735 of file sys_socket.c.
References soaio_process_sb().
Referenced by soalloc().
|
static |
Definition at line 590 of file sys_socket.c.
Referenced by soaio_process_job(), soaio_process_sb(), and soo_aio_queue().
void soaio_snd | ( | void * | context, |
int | pending | ||
) |
Definition at line 744 of file sys_socket.c.
References soaio_process_sb().
Referenced by soalloc().
|
static |
Definition at line 766 of file sys_socket.c.
References aio_cancel(), aio_cancel_cleared(), and aio_complete().
Referenced by soaio_process_job(), and soo_aio_queue().
|
static |
Definition at line 797 of file sys_socket.c.
References aio_set_cancel_function(), panic(), soaio_ready(), soo_aio_cancel(), and sowakeup_aio().
|
static |
Definition at line 351 of file sys_socket.c.
References badfileops, and soclose().
|
static |
Definition at line 366 of file sys_socket.c.
References free().
|
static |
Definition at line 158 of file sys_socket.c.
References data, fgetown(), and fsetown().
|
static |
Definition at line 289 of file sys_socket.c.
References sopoll().
|
static |
Definition at line 121 of file sys_socket.c.
References soreceive().
|
static |
Definition at line 304 of file sys_socket.c.
|
static |
Definition at line 137 of file sys_socket.c.
References sosend(), and tdsignal().
void sowakeup_aio | ( | struct socket * | so, |
struct sockbuf * | sb | ||
) |
Definition at line 753 of file sys_socket.c.
References soaio_enqueue().
Referenced by soo_aio_queue(), and sowakeup().
|
static |
Definition at line 439 of file sys_socket.c.
SYSCTL_INT | ( | _kern_ipc_aio | , |
OID_AUTO | , | ||
empty_results | , | ||
CTLFLAG_RD | , | ||
& | empty_results, | ||
0 | , | ||
"socket operation returned EAGAIN" | |||
) |
SYSCTL_INT | ( | _kern_ipc_aio | , |
OID_AUTO | , | ||
empty_retries | , | ||
CTLFLAG_RD | , | ||
& | empty_retries, | ||
0 | , | ||
"socket operation retries" | |||
) |
|
static |
SYSINIT | ( | soaio | , |
SI_SUB_VFS | , | ||
SI_ORDER_ANY | , | ||
soaio_init | , | ||
NULL | |||
) |
|
static |
Definition at line 83 of file sys_socket.c.
Referenced by soaio_process_job().
|
static |
Definition at line 87 of file sys_socket.c.
Referenced by soaio_process_job().
struct fileops socketops |
Definition at line 103 of file sys_socket.c.
Referenced by kern_accept4(), kern_socket(), and kern_socketpair().
|
static |
Definition at line 99 of file sys_socket.c.
|
static |
Definition at line 97 of file sys_socket.c.
|
static |
Definition at line 98 of file sys_socket.c.
|
static |
Definition at line 93 of file sys_socket.c.
|
extern |
Definition at line 180 of file uipc_socket.c.
|
static |
Definition at line 94 of file sys_socket.c.
|
static |
Definition at line 91 of file sys_socket.c.
|
static |
Definition at line 96 of file sys_socket.c.
|
static |
Definition at line 92 of file sys_socket.c.