[PATCH] xen: add missing includes

2013-12-17 Thread Justus Winter
* xen/console.h: Add missing includes. --- xen/console.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/console.h b/xen/console.h index 2b78f29..061ba28 100644 --- a/xen/console.h +++ b/xen/console.h @@ -21,7 +21,9 @@ #include machine/xen.h #include string.h +#include mach/port.h

Re: [PATCH] xen: add missing includes

2013-12-17 Thread Samuel Thibault
Justus Winter, le Tue 17 Dec 2013 13:17:21 +0100, a écrit : * xen/console.h: Add missing includes. Ack. --- xen/console.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/console.h b/xen/console.h index 2b78f29..061ba28 100644 --- a/xen/console.h +++ b/xen/console.h @@ -21,7

[PATCH 1/4] kern/sched_prim.h: remove unnecessary __GNUC__ #ifdef

2013-12-17 Thread Marin Ramesa
Attribute noreturn is used irrespective of __GNUC__. Remove unnecessary #ifdef. * kern/sched_prim.h [__GNUC__]: Remove #ifdef. --- kern/sched_prim.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kern/sched_prim.h b/kern/sched_prim.h index 07b5bf0..c7ff977 100644 ---

[PATCH 3/4] device/chario.c: qualify pointers that access their dereferenced values under locks with __restrict__

2013-12-17 Thread Marin Ramesa
Qualifier __restrict__ means that only the pointer under __restrict__ will be used to access dereferenced values. So if a code is under locks and no function is called in the critical section with pointer as an argument, it's safe to use __restrict__. This allows the compiler to make

[PATCH 2/4] Cleanup of the copyin() and copyout() calls

2013-12-17 Thread Marin Ramesa
* device/ds_routines.c (device_write_trap) (copyin) (data): Cast to (void *). Argument is an address. (device_write_trap) (copyin) (io_data): Don't cast. (device_writev_trap) (copyin) (iovec, stack_iovec): Likewise. (device_writev_trap) (copyin) (data, p): Cast to (void *). Arguments are

[PATCH 4/4] device/device_emul.h (device_emulation_ops): modify so that correct argument types are listed

2013-12-17 Thread Marin Ramesa
Modify structure device_emulation_ops so that correct argument types are listed. This patch produces warnings in the linux code. There is a previous version of this patch here: http://lists.gnu.org/archive/html/bug-hurd/2013-11/msg00482.html * device/device_emul.h (device_emulation_ops): Modify.

Re: [PATCH 3/4] device/chario.c: qualify pointers that access their dereferenced values under locks with __restrict__

2013-12-17 Thread Samuel Thibault
Marin Ramesa, le Tue 17 Dec 2013 15:58:27 +0100, a écrit : Qualifier __restrict__ means that only the pointer under __restrict__ will be used to access dereferenced values. Yes. So if a code is under locks and no function is called in the critical section with pointer as an argument, it's

Re: [PATCH 4/4] device/device_emul.h (device_emulation_ops): modify so that correct argument types are listed

2013-12-17 Thread Samuel Thibault
Marin Ramesa, le Tue 17 Dec 2013 15:58:28 +0100, a écrit : Modify structure device_emulation_ops so that correct argument types are listed. This patch produces warnings in the linux code. Yes. I'm not sure we really want to specify mach_device_t here, as the linux code example shows. The

Re: [PATCH 3/4] device/chario.c: qualify pointers that access their dereferenced values under locks with __restrict__

2013-12-17 Thread Richard Braun
On Tue, Dec 17, 2013 at 06:51:49PM +0100, Samuel Thibault wrote: I don't think we benefit very much here, do we? restrict is a very difficult thing to maintain, few programmers really understand what it means, I'd rather avoid introducing too many of them. I agree. Note that GNU Mach is built

Re: [PATCH 3/4] device/chario.c: qualify pointers that access their dereferenced values under locks with __restrict__

2013-12-17 Thread Richard Braun
On Tue, Dec 17, 2013 at 03:58:27PM +0100, Marin Ramesa wrote: Qualifier __restrict__ means that only the pointer under __restrict__ will be used to access dereferenced values. So if a code is under locks and no function is called in the critical section with pointer as an argument, it's

Re: [PATCH 3/4] device/chario.c: qualify pointers that access their dereferenced values under locks with __restrict__

2013-12-17 Thread Marin Ramesa
On 18.12.2013 00:17:38, Richard Braun wrote: On Tue, Dec 17, 2013 at 03:58:27PM +0100, Marin Ramesa wrote: Qualifier __restrict__ means that only the pointer under __restrict__ will be used to access dereferenced values. So if a code is under locks and no function is called in the critical