--- include/linux/xpmem.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) Index: linux-2.6/include/linux/xmem.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.6/include/linux/xpmem.h 2008-01-03 11:14:45.000000000 -0800 @@ -0,0 +1,37 @@ +#ifndef __LINUX_XMEM +#define __LINUX_XMEM + +typedef unsigned long xmem_t; + +int xmem_system_id = -1; + +unsigned int xmem_get_sys_id(xmem_t handle) +{ + return handle >> 32; +} + +unsigned int xmem_get_local_id(xmem_t handle) +{ + VM_BUG_ON(xmem_get_sys_id(handle) != xmem_system_id); + return handle & ((1 << 32) - 1); +} + +struct xmem_drv { + export(xmem_t, struct vm_area_struct *); + import(xmem_t, struct vm_area_struct *); + unmap(xmem_t, struct vm_area_struct *); + unmap_page(xmem_t, struct vm_area_struct *, struct page *, unsigned long addr); +}; + +long sys_xmem(unsigned long xmem_t, int op, + unsigned long start, unsigned long length, + unsigned long offset, unsigned long flags); + +enum xmem_op { XP_CREATE, XP_MAP, XP_FREE, NR_XPMEM_OPS }; + +sys_xmem(SOMEHANDLE, XP_SHARE, blabb, length, 0); + +#endif /* __LINUX_XPMEM */ + +