|
FreeBSD kernel kern code
|
#include <sys/cdefs.h>#include <sys/param.h>#include <sys/kernel.h>#include <sys/bio.h>#include <sys/malloc.h>#include <sys/mbuf.h>#include <sys/proc.h>#include <sys/sglist.h>#include <sys/uio.h>#include <vm/vm.h>#include <vm/vm_page.h>#include <vm/pmap.h>#include <vm/vm_map.h>#include <sys/ktr.h>
Go to the source code of this file.
Data Structures | |
| struct | sgsave |
Macros | |
| #define | SGLIST_SAVE(sg, sgsave) |
| #define | SGLIST_RESTORE(sg, sgsave) |
Functions | |
| __FBSDID ("$BSDSUniX$") | |
| static | MALLOC_DEFINE (M_SGLIST,"sglist","scatter/gather lists") |
| static __inline int | _sglist_append_range (struct sglist *sg, struct sglist_seg **ssp, vm_paddr_t paddr, size_t len) |
| static __inline int | _sglist_append_buf (struct sglist *sg, void *buf, size_t len, pmap_t pmap, size_t *donep) |
| int | sglist_count (void *buf, size_t len) |
| struct sglist * | sglist_alloc (int nsegs, int mflags) |
| void | sglist_free (struct sglist *sg) |
| int | sglist_append (struct sglist *sg, void *buf, size_t len) |
| int | sglist_append_bio (struct sglist *sg, struct bio *bp) |
| int | sglist_append_phys (struct sglist *sg, vm_paddr_t paddr, size_t len) |
| int | sglist_append_mbuf (struct sglist *sg, struct mbuf *m0) |
| int | sglist_append_user (struct sglist *sg, void *buf, size_t len, struct thread *td) |
| int | sglist_append_uio (struct sglist *sg, struct uio *uio) |
| int | sglist_consume_uio (struct sglist *sg, struct uio *uio, size_t resid) |
| struct sglist * | sglist_build (void *buf, size_t len, int mflags) |
| struct sglist * | sglist_clone (struct sglist *sg, int mflags) |
| size_t | sglist_length (struct sglist *sg) |
| int | sglist_split (struct sglist *original, struct sglist **head, size_t length, int mflags) |
| int | sglist_join (struct sglist *first, struct sglist *second) |
| int | sglist_slice (struct sglist *original, struct sglist **slice, size_t offset, size_t length, int mflags) |
| #define SGLIST_RESTORE | ( | sg, | |
| sgsave | |||
| ) |
Definition at line 72 of file subr_sglist.c.
Referenced by sglist_append(), sglist_append_bio(), sglist_append_mbuf(), sglist_append_phys(), sglist_append_uio(), and sglist_append_user().
| #define SGLIST_SAVE | ( | sg, | |
| sgsave | |||
| ) |
Definition at line 64 of file subr_sglist.c.
Referenced by sglist_append(), sglist_append_bio(), sglist_append_mbuf(), sglist_append_phys(), sglist_append_uio(), and sglist_append_user().
| __FBSDID | ( | "$BSDSUniX$" | ) |
|
static |
Definition at line 109 of file subr_sglist.c.
References _sglist_append_range().
Referenced by sglist_append(), sglist_append_uio(), sglist_append_user(), and sglist_consume_uio().


|
static |
Definition at line 84 of file subr_sglist.c.
Referenced by _sglist_append_buf(), and sglist_append_phys().

|
static |
| struct sglist* sglist_alloc | ( | int | nsegs, |
| int | mflags | ||
| ) |
Definition at line 200 of file subr_sglist.c.
References malloc().
Referenced by sglist_build(), sglist_clone(), sglist_slice(), and sglist_split().


| int sglist_append | ( | struct sglist * | sg, |
| void * | buf, | ||
| size_t | len | ||
| ) |
Definition at line 229 of file subr_sglist.c.
References _sglist_append_buf(), SGLIST_RESTORE, and SGLIST_SAVE.
Referenced by sglist_append_bio(), sglist_append_mbuf(), and sglist_build().


| int sglist_append_bio | ( | struct sglist * | sg, |
| struct bio * | bp | ||
| ) |
Definition at line 250 of file subr_sglist.c.
References sglist_append(), sglist_append_phys(), SGLIST_RESTORE, and SGLIST_SAVE.

| int sglist_append_mbuf | ( | struct sglist * | sg, |
| struct mbuf * | m0 | ||
| ) |
Definition at line 317 of file subr_sglist.c.
References sglist_append(), SGLIST_RESTORE, and SGLIST_SAVE.

| int sglist_append_phys | ( | struct sglist * | sg, |
| vm_paddr_t | paddr, | ||
| size_t | len | ||
| ) |
Definition at line 286 of file subr_sglist.c.
References _sglist_append_range(), SGLIST_RESTORE, SGLIST_SAVE, and sgsave::ss_len.
Referenced by sglist_append_bio().


| int sglist_append_uio | ( | struct sglist * | sg, |
| struct uio * | uio | ||
| ) |
Definition at line 367 of file subr_sglist.c.
References _sglist_append_buf(), SGLIST_RESTORE, and SGLIST_SAVE.

| int sglist_append_user | ( | struct sglist * | sg, |
| void * | buf, | ||
| size_t | len, | ||
| struct thread * | td | ||
| ) |
Definition at line 346 of file subr_sglist.c.
References _sglist_append_buf(), SGLIST_RESTORE, and SGLIST_SAVE.

| struct sglist* sglist_build | ( | void * | buf, |
| size_t | len, | ||
| int | mflags | ||
| ) |
Definition at line 465 of file subr_sglist.c.
References sglist_alloc(), sglist_append(), sglist_count(), and sglist_free().

| struct sglist* sglist_clone | ( | struct sglist * | sg, |
| int | mflags | ||
| ) |
Definition at line 488 of file subr_sglist.c.
References sglist_alloc().

| int sglist_consume_uio | ( | struct sglist * | sg, |
| struct uio * | uio, | ||
| size_t | resid | ||
| ) |
Definition at line 415 of file subr_sglist.c.
References _sglist_append_buf().

| int sglist_count | ( | void * | buf, |
| size_t | len | ||
| ) |
Definition at line 170 of file subr_sglist.c.
Referenced by sglist_build().

| void sglist_free | ( | struct sglist * | sg | ) |
Definition at line 216 of file subr_sglist.c.
References free().
Referenced by sglist_build().


| int sglist_join | ( | struct sglist * | first, |
| struct sglist * | second | ||
| ) |
Definition at line 615 of file subr_sglist.c.
| size_t sglist_length | ( | struct sglist * | sg | ) |
Definition at line 508 of file subr_sglist.c.
| int sglist_slice | ( | struct sglist * | original, |
| struct sglist ** | slice, | ||
| size_t | offset, | ||
| size_t | length, | ||
| int | mflags | ||
| ) |
Definition at line 668 of file subr_sglist.c.
References count, and sglist_alloc().

| int sglist_split | ( | struct sglist * | original, |
| struct sglist ** | head, | ||
| size_t | length, | ||
| int | mflags | ||
| ) |
Definition at line 537 of file subr_sglist.c.
References count, and sglist_alloc().
