forked from KolibriOS/kolibrios
ddk: 3.17-rc1
git-svn-id: svn://kolibrios.org@5056 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -101,19 +101,6 @@ static inline struct page *sg_page(struct scatterlist *sg)
|
||||
return (struct page *)((sg)->page_link & ~0x3);
|
||||
}
|
||||
|
||||
/**
|
||||
* sg_set_buf - Set sg entry to point at given data
|
||||
* @sg: SG entry
|
||||
* @buf: Data
|
||||
* @buflen: Data length
|
||||
*
|
||||
**/
|
||||
//static inline void sg_set_buf(struct scatterlist *sg, const void *buf,
|
||||
// unsigned int buflen)
|
||||
//{
|
||||
// sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf));
|
||||
//}
|
||||
|
||||
/*
|
||||
* Loop over each sg element, following the pointer to a new list if necessary
|
||||
*/
|
||||
@@ -226,10 +213,10 @@ void sg_init_one(struct scatterlist *, const void *, unsigned int);
|
||||
typedef struct scatterlist *(sg_alloc_fn)(unsigned int, gfp_t);
|
||||
typedef void (sg_free_fn)(struct scatterlist *, unsigned int);
|
||||
|
||||
void __sg_free_table(struct sg_table *, unsigned int, sg_free_fn *);
|
||||
void __sg_free_table(struct sg_table *, unsigned int, bool, sg_free_fn *);
|
||||
void sg_free_table(struct sg_table *);
|
||||
int __sg_alloc_table(struct sg_table *, unsigned int, unsigned int, gfp_t,
|
||||
sg_alloc_fn *);
|
||||
int __sg_alloc_table(struct sg_table *, unsigned int, unsigned int,
|
||||
struct scatterlist *, gfp_t, sg_alloc_fn *);
|
||||
int sg_alloc_table(struct sg_table *, unsigned int, gfp_t);
|
||||
int sg_alloc_table_from_pages(struct sg_table *sgt,
|
||||
struct page **pages, unsigned int n_pages,
|
||||
@@ -241,6 +228,11 @@ size_t sg_copy_from_buffer(struct scatterlist *sgl, unsigned int nents,
|
||||
size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents,
|
||||
void *buf, size_t buflen);
|
||||
|
||||
size_t sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents,
|
||||
void *buf, size_t buflen, off_t skip);
|
||||
size_t sg_pcopy_to_buffer(struct scatterlist *sgl, unsigned int nents,
|
||||
void *buf, size_t buflen, off_t skip);
|
||||
|
||||
/*
|
||||
* Maximum number of entries that will be allocated in one piece, if
|
||||
* a list larger than this is required then chaining will be utilized.
|
||||
|
Reference in New Issue
Block a user