Hi! On Sat, 27 Aug 2011 01:13:00 +0200, Samuel Thibault <samuel.thiba...@gnu.org> wrote: > Fridolín Pokorný, le Wed 24 Aug 2011 12:27:46 +0200, a écrit : > > diff -Naur a/vm/memory_object_proxy.h b/vm/memory_object_proxy.h > > --- a/vm/memory_object_proxy.h 1970-01-01 01:00:00.000000000 +0100 > > +++ b/vm/memory_object_proxy.h 2011-08-24 08:48:03.000000000 +0200 > > @@ -0,0 +1,48 @@ > > +/* > > + * Copyright (C) 2011 Free Software Foundation, Inc. > > + * > > + * This program is free software; you can redistribute it and/or modify > > + * it under the terms of the GNU General Public License as published by > > + * the Free Software Foundation; either version 2, or (at your option) > > + * any later version. > > + * > > + * This program is distributed in the hope that it will be useful, > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > + * GNU General Public License for more details. > > + * > > + * You should have received a copy of the GNU General Public License > > + * along with this program; if not, write to the Free Software > > + * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. > > + * > > + * Author: Fridolin Pokorny > > + */ > > I'm a bit unsure about this. I guess you haven't assigned your > copyrights to the FSF. > > On the other hand, since it's a copy of the .c file, maybe we should > rather simply copy/paste the 2005 copyright?
That's a reasonable approach, yes. I additionally committed the attached patch. Samuel, I think you didn't intentionally drop the #includes (I also changed/added some more)? Also, the declaration of memory_object_proxy_lookup could be added/moved. Grüße, Thomas
From 810152088a978ecbc1dda2a345bf236c32c941c7 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tho...@schwinge.name> Date: Tue, 6 Sep 2011 00:27:46 +0200 Subject: [PATCH] Further prototyping work for memory_object_proxy.c functions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * vm/memory_object_proxy.h: Add #includes. (memory_object_proxy_lookup): New declaration. * vm/memory_object_proxy.c: #include <vm/memory_object_proxy.h>. * vm/vm_user.c: Likewise. (memory_object_proxy_lookup): Drop declaration. Parts based on a patch by Fridolín Pokorný <fridolin.poko...@gmail.com>. --- vm/memory_object_proxy.c | 2 ++ vm/memory_object_proxy.h | 36 ++++++++++++++++++++++++++++-------- vm/vm_user.c | 6 +----- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/vm/memory_object_proxy.c b/vm/memory_object_proxy.c index 7204256..fdab6e0 100644 --- a/vm/memory_object_proxy.c +++ b/vm/memory_object_proxy.c @@ -46,6 +46,8 @@ #include <ipc/ipc_port.h> #include <ipc/ipc_space.h> +#include <vm/memory_object_proxy.h> + /* The zone which holds our proxy memory objects. */ static zone_t memory_object_proxy_zone; diff --git a/vm/memory_object_proxy.h b/vm/memory_object_proxy.h index 001ddb2..f4be0d0 100644 --- a/vm/memory_object_proxy.h +++ b/vm/memory_object_proxy.h @@ -1,5 +1,5 @@ -/* memory_object_proxy.c - Proxy memory objects for Mach. - Copyright (C) 2005 Free Software Foundation, Inc. +/* memory_object_proxy.h - Proxy memory objects for Mach. + Copyright (C) 2005, 2011 Free Software Foundation, Inc. Written by Marcus Brinkmann. This file is part of GNU Mach. @@ -18,11 +18,31 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ +#ifndef _VM_MEMORY_OBJECT_PROXY_H_ +#define _VM_MEMORY_OBJECT_PROXT_H_ + +#include <ipc/ipc_types.h> +#include <mach/boolean.h> +#include <mach/machine/kern_return.h> +#include <mach/machine/vm_types.h> +#include <mach/message.h> +#include <mach/vm_prot.h> + extern void memory_object_proxy_init (void); extern boolean_t memory_object_proxy_notify (mach_msg_header_t *msg); -extern kern_return_t memory_object_create_proxy (ipc_space_t space, vm_prot_t max_protection, - ipc_port_t *object, natural_t object_count, - vm_offset_t *offset, natural_t offset_count, - vm_offset_t *start, natural_t start_count, - vm_offset_t *len, natural_t len_count, - ipc_port_t *port); +extern kern_return_t memory_object_create_proxy (ipc_space_t space, + vm_prot_t max_protection, + ipc_port_t *object, + natural_t object_count, + vm_offset_t *offset, + natural_t offset_count, + vm_offset_t *start, + natural_t start_count, + vm_offset_t *len, + natural_t len_count, + ipc_port_t *port); +extern kern_return_t memory_object_proxy_lookup (ipc_port_t port, + ipc_port_t *object, + vm_prot_t *max_protection); + +#endif /* _VM_MEMORY_OBJECT_PROXT_H_ */ diff --git a/vm/vm_user.c b/vm/vm_user.c index 672daab..59c2a36 100644 --- a/vm/vm_user.c +++ b/vm/vm_user.c @@ -44,6 +44,7 @@ #include <vm/vm_kern.h> #include <vm/vm_map.h> #include <vm/vm_object.h> +#include <vm/memory_object_proxy.h> #include <vm/vm_page.h> @@ -277,11 +278,6 @@ kern_return_t vm_copy(map, source_address, size, dest_address) } -/* XXX From memory_object_proxy.c */ -kern_return_t -memory_object_proxy_lookup (ipc_port_t proxy_object, ipc_port_t *object, - vm_prot_t *max_protection); - /* * Routine: vm_map */ -- 1.7.5.4
pgpDlZpj8o1YL.pgp
Description: PGP signature