direct-io.hg

changeset 9654:b36a43b9d9b5

Introduce gnttab_empty_grant_references() to check whether grant
references is empty.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author kaf24@firebug.cl.cam.ac.uk
date Fri Apr 14 15:05:04 2006 +0100 (2006-04-14)
parents b055716f89c0
children 176302fe4dfb
files linux-2.6-xen-sparse/drivers/xen/core/gnttab.c linux-2.6-xen-sparse/include/xen/gnttab.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c	Fri Apr 14 14:54:46 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c	Fri Apr 14 15:05:04 2006 +0100
     1.3 @@ -65,6 +65,7 @@ EXPORT_SYMBOL_GPL(gnttab_end_foreign_tra
     1.4  EXPORT_SYMBOL_GPL(gnttab_alloc_grant_references);
     1.5  EXPORT_SYMBOL_GPL(gnttab_free_grant_references);
     1.6  EXPORT_SYMBOL_GPL(gnttab_free_grant_reference);
     1.7 +EXPORT_SYMBOL_GPL(gnttab_empty_grant_references);
     1.8  EXPORT_SYMBOL_GPL(gnttab_claim_grant_reference);
     1.9  EXPORT_SYMBOL_GPL(gnttab_release_grant_reference);
    1.10  EXPORT_SYMBOL_GPL(gnttab_request_free_callback);
    1.11 @@ -325,6 +326,12 @@ gnttab_alloc_grant_references(u16 count,
    1.12  }
    1.13  
    1.14  int
    1.15 +gnttab_empty_grant_references(const grant_ref_t *private_head)
    1.16 +{
    1.17 +	return (*private_head == GNTTAB_LIST_END);
    1.18 +}
    1.19 +
    1.20 +int
    1.21  gnttab_claim_grant_reference(grant_ref_t *private_head)
    1.22  {
    1.23  	grant_ref_t g = *private_head;
     2.1 --- a/linux-2.6-xen-sparse/include/xen/gnttab.h	Fri Apr 14 14:54:46 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/include/xen/gnttab.h	Fri Apr 14 15:05:04 2006 +0100
     2.3 @@ -91,6 +91,8 @@ void gnttab_free_grant_reference(grant_r
     2.4  
     2.5  void gnttab_free_grant_references(grant_ref_t head);
     2.6  
     2.7 +int gnttab_empty_grant_references(const grant_ref_t *pprivate_head);
     2.8 +
     2.9  int gnttab_claim_grant_reference(grant_ref_t *pprivate_head);
    2.10  
    2.11  void gnttab_release_grant_reference(grant_ref_t *private_head,