|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] Support for -EAGAIN from xc_gnttab_map_gr
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1261031276 0
# Node ID fe42b16855aa727c36833f19df9ba0e7a163941e
# Parent c344350672987de3d27f6d0b8ca75e1ac3882e52
Support for -EAGAIN from xc_gnttab_map_grant_ref.
Signed-off-by: Grzegorz Milos <Grzegorz.Milos@xxxxxxxxxx>
---
tools/libxc/xc_linux.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletion(-)
diff -r c34435067298 -r fe42b16855aa tools/libxc/xc_linux.c
--- a/tools/libxc/xc_linux.c Thu Dec 17 06:27:56 2009 +0000
+++ b/tools/libxc/xc_linux.c Thu Dec 17 06:27:56 2009 +0000
@@ -442,13 +442,19 @@ void *xc_gnttab_map_grant_ref(int xcg_ha
if ( ioctl(xcg_handle, IOCTL_GNTDEV_MAP_GRANT_REF, &map) )
return NULL;
+mmap_again:
addr = mmap(NULL, PAGE_SIZE, prot, MAP_SHARED, xcg_handle, map.index);
if ( addr == MAP_FAILED )
{
int saved_errno = errno;
struct ioctl_gntdev_unmap_grant_ref unmap_grant;
- /* Unmap the driver slots used to store the grant information. */
+ if(saved_errno == EAGAIN)
+ {
+ usleep(1000);
+ goto mmap_again;
+ }
+ /* Unmap the driver slots used to store the grant information. */
perror("xc_gnttab_map_grant_ref: mmap failed");
unmap_grant.index = map.index;
unmap_grant.count = 1;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] Support for -EAGAIN from xc_gnttab_map_grant_ref.,
Xen patchbot-unstable <=
|
|
|
|
|