All of lore.kernel.org
 help / color / mirror / Atom feed
* The return value of xc_map_foreign_range~~~
@ 2008-03-18 11:45 张琳
  2008-03-18 12:33 ` Derek Murray
  2008-03-18 12:49 ` Daniel Stodden
  0 siblings, 2 replies; 3+ messages in thread
From: 张琳 @ 2008-03-18 11:45 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 510 bytes --]

I am shame to say that I have never met a function whose return value is void*.

This is the first time~~~

So, can anyone told me the meaning of the return value of this function -----xc_map_foreign_range?

Is it a pointer pointed to a memory area corresponding the machine frame number(the last parameter passed to the function)?

And the third parameter named size: the unit of size is in bytes or in pages?

Wish you good luck~~~

                                                yours:Lin  


[-- Attachment #1.2: Type: text/html, Size: 3685 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: The return value of xc_map_foreign_range~~~
  2008-03-18 11:45 The return value of xc_map_foreign_range~~~ 张琳
@ 2008-03-18 12:33 ` Derek Murray
  2008-03-18 12:49 ` Daniel Stodden
  1 sibling, 0 replies; 3+ messages in thread
From: Derek Murray @ 2008-03-18 12:33 UTC (permalink / raw)
  To: 张琳; +Cc: xen-devel

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]

Hi,

2008/3/18 张琳 <zhanglin_nk@tom.com>:
> So, can anyone told me the meaning of the return value of this function
> -----xc_map_foreign_range?
>
> Is it a pointer pointed to a memory area corresponding the machine frame
> number(the last parameter passed to the function)?

That's correct.

> And the third parameter named size: the unit of size is in bytes or in
> pages?

The size parameter is in bytes, and must be a multiple of PAGE_SIZE
(as with mmap).

Regards,

Derek Murray.

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: The return value of xc_map_foreign_range~~~
  2008-03-18 11:45 The return value of xc_map_foreign_range~~~ 张琳
  2008-03-18 12:33 ` Derek Murray
@ 2008-03-18 12:49 ` Daniel Stodden
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Stodden @ 2008-03-18 12:49 UTC (permalink / raw)
  To: 张琳; +Cc: xen-devel

On Tue, 2008-03-18 at 19:45 +0800, 张琳 wrote:
> I am shame to say that I have never met a function whose return value
> is void*.

To get used to it, I'd recommend malloc(). Just try it, it opens a whole
world of new and exciting applications. ;)

scnr.

Best,
Daniel

-- 
Daniel Stodden
LRR     -      Lehrstuhl für Rechnertechnik und Rechnerorganisation
Institut für Informatik der TU München             D-85748 Garching
http://www.lrr.in.tum.de/~stodden         mailto:stodden@cs.tum.edu
PGP Fingerprint: F5A4 1575 4C56 E26A 0B33  3D80 457E 82AE B0D8 735B

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-18 12:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-18 11:45 The return value of xc_map_foreign_range~~~ 张琳
2008-03-18 12:33 ` Derek Murray
2008-03-18 12:49 ` Daniel Stodden

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.