[PATCH 1/2] device/net_io.c: add comments and initialize hash_entp

2013-12-02 Thread Marin Ramesa
Samuel Thibault wrote: It doesn't seem so clear that it's actually always properly initialized. We also need a comment explaining why it always is. * device/net_io.c (hash_entp): Initialize and add a comment saying why this was done. --- device/net_io.c | 7 +-- 1 file changed, 5

[PATCH 2/2] kern/lock.h: XXX quiet GCC warnings about set but unused variables during simple locks

2013-12-02 Thread Marin Ramesa
* kern/lock.h (decl_simple_lock_data): Define macro. (simple_unlock): Define so that lock is assigned to itself and add a comment saying why this was done. (simple_lock_try): Define so that lock data is cast to a boolean with the value TRUE and assigned to itself. Add a comment saying why this

Re: [PATCH 1/2] device/net_io.c: add comments and initialize hash_entp

2013-12-02 Thread Justus Winter
Quoting Marin Ramesa (2013-12-02 09:14:35) Samuel Thibault wrote: It doesn't seem so clear that it's actually always properly initialized. We also need a comment explaining why it always is. * device/net_io.c (hash_entp): Initialize and add a comment saying why this was done. ---

[PATCH 1/5] Advise flex not to generate the input function

2013-12-02 Thread Justus Winter
This avoids a warning about input being unused. * lexxer.l: Define YY_NO_INPUT. --- lexxer.l |3 +++ 1 file changed, 3 insertions(+) diff --git a/lexxer.l b/lexxer.l index 6686b55..5f2f61e 100644 --- a/lexxer.l +++ b/lexxer.l @@ -50,6 +50,9 @@ FileName ({QString}|{AString}) #include

[PATCH 2/5] Avoid a compiler warning in WriteDefines

2013-12-02 Thread Justus Winter
* header.c (WriteDefines): Avoid warning about unused parameter. --- header.c |1 + 1 file changed, 1 insertion(+) diff --git a/header.c b/header.c index 150412a..1bc570f 100644 --- a/header.c +++ b/header.c @@ -41,6 +41,7 @@ WriteIncludes(FILE *file) static void WriteDefines(FILE *file)

[PATCH 5/5] Generate a x_server_routine in the sheader so it can be inlined

2013-12-02 Thread Justus Winter
* header.c (WriteServerHeader): Emit a x_server_routine that can be inlined. * server.c (WriteEpilog): Export the x_routines array so it can be used from the inlined x_server_routine. --- header.c |8 server.c |2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git

[PATCH 4/5] Move the generation of x_server_routine function into a function

2013-12-02 Thread Justus Winter
* server.c (WriteSubsystemServerRoutine): New function. (WriteEpilog): Adjust accordingly. * write.h (WriteSubsystemServerRoutine): New declaration. --- server.c | 35 +-- write.h |1 + 2 files changed, 22 insertions(+), 14 deletions(-) diff --git

[PATCH 3/5] Clean up generated sources

2013-12-02 Thread Justus Winter
* Makefile (CLEANFILES): Add generated source files lexxer.c and parser.c. --- Makefile.am |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 33bc768..3e6dfcf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ bin_SCRIPTS = mig

Re: [PATCH 1/2] device/net_io.c: add comments and initialize hash_entp

2013-12-02 Thread Marin Ramesa
On 02.12.2013 10:37:08, Justus Winter wrote: The other day you were fixing this kind of code, now you're introducing it. Maybe there's a better way to silence this warning, maybe some attribute. Maybe initialize to some kind of a template, like this: From

Re: [PATCH 1/2] device/net_io.c: add comments and initialize hash_entp

2013-12-02 Thread Marin Ramesa
On 02.12.2013 11:55:14, Marin Ramesa wrote: +for (counter = 0; i N_NET_HASH_KEYS; i++) This should be: for (counter = 0; counter N_NET_HASH_KEYS; counter++);

Re: [PATCH 1/2] device/net_io.c: add comments and initialize hash_entp

2013-12-02 Thread Justus Winter
Quoting Marin Ramesa (2013-12-02 11:55:14) On 02.12.2013 10:37:08, Justus Winter wrote: The other day you were fixing this kind of code, now you're introducing it. Maybe there's a better way to silence this warning, maybe some attribute. Maybe initialize to some kind of a template, like

Re: [PATCH 6/7] pfinet: improve the pfinet_demuxer function

2013-12-02 Thread Samuel Thibault
Justus Winter, le Sat 30 Nov 2013 20:11:02 +0100, a écrit : Handle multiple request types as recommended by the Mach Server Writer's Guide section 4, subsection Handling Multiple Request Types. This avoids initializing the reply message in every X_server function. The reply message has

Re: [PATCH 5/5] Generate a x_server_routine in the sheader so it can be inlined

2013-12-02 Thread Samuel Thibault
Well, it means that whenever a protocol gets augmented, one has to recompile all demuxer functions calling these inlines. In the example of trivfs_demuxer, the application itself does not need a rebuild, only libtrivfs needs, but in other cases that will not be true. This is a quite subtle issue

Re: [PATCH 3/7] libtrivfs: improve the trivfs_demuxer function

2013-12-02 Thread Samuel Thibault
Justus Winter, le Sat 30 Nov 2013 20:10:59 +0100, a écrit : Handle multiple request types as recommended by the Mach Server Writer's Guide section 4, subsection Handling Multiple Request Types. This avoids initializing the reply message in every X_server function. The reply message has

Re: [PATCH 7/7] pflocal: improve the demuxer functions

2013-12-02 Thread Samuel Thibault
Justus Winter, le Sat 30 Nov 2013 20:11:03 +0100, a écrit : Handle multiple request types as recommended by the Mach Server Writer's Guide section 4, subsection Handling Multiple Request Types. This avoids initializing the reply message in every X_server function. The reply message has

Re: [PATCH 1/7] libdiskfs: improve the diskfs_demuxer function

2013-12-02 Thread Samuel Thibault
Justus Winter, le Sat 30 Nov 2013 20:10:57 +0100, a écrit : Handle multiple request types as recommended by the Mach Server Writer's Guide section 4, subsection Handling Multiple Request Types. This avoids initializing the reply message in every X_server function. The reply message has

Re: [PATCH 1/5] Advise flex not to generate the input function

2013-12-02 Thread Samuel Thibault
Justus Winter, le Mon 02 Dec 2013 10:58:15 +0100, a écrit : This avoids a warning about input being unused. * lexxer.l: Define YY_NO_INPUT. Ack. --- lexxer.l |3 +++ 1 file changed, 3 insertions(+) diff --git a/lexxer.l b/lexxer.l index 6686b55..5f2f61e 100644 --- a/lexxer.l

Re: [PATCH 2/7] libnetfs: improve the netfs_demuxer function

2013-12-02 Thread Samuel Thibault
Justus Winter, le Sat 30 Nov 2013 20:10:58 +0100, a écrit : Handle multiple request types as recommended by the Mach Server Writer's Guide section 4, subsection Handling Multiple Request Types. This avoids initializing the reply message in every X_server function. The reply message has

Re: [PATCH 2/5] Avoid a compiler warning in WriteDefines

2013-12-02 Thread Samuel Thibault
Justus Winter, le Mon 02 Dec 2013 10:58:16 +0100, a écrit : * header.c (WriteDefines): Avoid warning about unused parameter. Ack. --- header.c |1 + 1 file changed, 1 insertion(+) diff --git a/header.c b/header.c index 150412a..1bc570f 100644 --- a/header.c +++ b/header.c @@

Re: [PATCH] libdiskfs: improve the diskfs_demuxer function

2013-12-02 Thread Samuel Thibault
Justus Winter, le Fri 29 Nov 2013 14:30:59 +0100, a écrit : Handle multiple request types as recommended by the Mach Server Writer's Guide section 4, subsection Handling Multiple Request Types. This avoids initializing the reply message in every X_server function. The reply message has

Re: [PATCH 3/5] Clean up generated sources

2013-12-02 Thread Samuel Thibault
Justus Winter, le Mon 02 Dec 2013 10:58:17 +0100, a écrit : * Makefile (CLEANFILES): Add generated source files lexxer.c and parser.c. Ack. --- Makefile.am |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 33bc768..3e6dfcf 100644 ---

Re: [PATCH 5/7] proc: improve the message_demuxer function

2013-12-02 Thread Samuel Thibault
Justus Winter, le Sat 30 Nov 2013 20:11:01 +0100, a écrit : Handle multiple request types as recommended by the Mach Server Writer's Guide section 4, subsection Handling Multiple Request Types. This avoids initializing the reply message in every X_server function. The reply message has

[OT] patches

2013-12-02 Thread Ivan Shmakov
Justus Winter 4win...@informatik.uni-hamburg.de writes: […] Also, please inline your patches so they can be more easily discussed. JFTR: the treatment of text/* MIME parts may depend on the mail user agent software used. For instance, I’ve just tried to reply to

Re: [PATCH] Patch that breaks the gnumach build

2013-12-02 Thread Samuel Thibault
Marin Ramesa, le Sun 01 Dec 2013 10:47:53 +0100, a écrit : I need some help. I'm trying to fix a GCC warning by modifying the struct dev_ops in device/conf.h. I need the definition of io_req_t to do that. But when I include device/io_req.h from device/conf.h the build breaks with this error

Re: [PATCH 1/2] device/net_io.c: add comments and initialize hash_entp

2013-12-02 Thread Samuel Thibault
Justus Winter, le Mon 02 Dec 2013 14:10:56 +0100, a écrit : Quoting Marin Ramesa (2013-12-02 11:55:14) On 02.12.2013 10:37:08, Justus Winter wrote: The other day you were fixing this kind of code, now you're introducing it. Maybe there's a better way to silence this warning, maybe some

Re: [PATCH 5/5] Generate a x_server_routine in the sheader so it can be inlined

2013-12-02 Thread Justus Winter
Quoting Samuel Thibault (2013-12-02 13:09:44) Well, it means that whenever a protocol gets augmented, one has to recompile all demuxer functions calling these inlines. In the example of trivfs_demuxer, the application itself does not need a rebuild, only libtrivfs needs, but in other cases

Inlining the x_server_routines in the demuxing functions

2013-12-02 Thread Justus Winter
Hi :) This is a patch series taking advantage of the proposed MIG change to inline the x_server_routine functions into the demuxer functions. It actually seems to improve our performance :) The time needed to compile half (I don't build the udeb variant) a Hurd package using fakeroot-tcp on my

[PATCH 2/7] libnetfs: include the mig-generated server headers in demuxer.c

2013-12-02 Thread Justus Winter
GNU MIG recently gained support for emitting x_server_routine declarations in the generated server header file. Using this declaration, the x_server_routine functions can be inlined into the demuxer function. * libnetfs/demuxer.c: Include the mig-generated server headers. --- libnetfs/demuxer.c

[PATCH 1/7] libdiskfs: include the mig-generated server headers in demuxer.c

2013-12-02 Thread Justus Winter
GNU MIG recently gained support for emitting x_server_routine declarations in the generated server header file. Using this declaration, the x_server_routine functions can be inlined into the demuxer function. * libdiskfs/demuxer.c: Include the mig-generated server headers. ---

[PATCH 4/7] exec: include the mig-generated server headers in main.c

2013-12-02 Thread Justus Winter
GNU MIG recently gained support for emitting x_server_routine declarations in the generated server header file. Using this declaration, the x_server_routine functions can be inlined into the demuxer function. * exec/main.c: Include the mig-generated server headers. --- exec/main.c |6 +++---

[PATCH 3/7] libtrivfs: include the mig-generated server headers in demuxer.c

2013-12-02 Thread Justus Winter
GNU MIG recently gained support for emitting x_server_routine declarations in the generated server header file. Using this declaration, the x_server_routine functions can be inlined into the demuxer function. * libtrivfs/demuxer.c: Include the mig-generated server headers. ---

[PATCH 6/7] pfinet: include the mig-generated server headers in main.c

2013-12-02 Thread Justus Winter
GNU MIG recently gained support for emitting x_server_routine declarations in the generated server header file. Using this declaration, the x_server_routine functions can be inlined into the demuxer function. * pfinet/main.c: Include the mig-generated server headers. --- pfinet/main.c | 11

[PATCH 5/7] proc: include the mig-generated server headers in main.c

2013-12-02 Thread Justus Winter
GNU MIG recently gained support for emitting x_server_routine declarations in the generated server header file. Using this declaration, the x_server_routine functions can be inlined into the demuxer function. * proc/main.c: Include the mig-generated server headers. --- proc/main.c | 10

[PATCH 7/7] pflocal: include the mig-generated server headers

2013-12-02 Thread Justus Winter
GNU MIG recently gained support for emitting x_server_routine declarations in the generated server header file. Using this declaration, the x_server_routine functions can be inlined into the demuxer function. * pflocal/demuxer.c: Include the mig-generated server headers. * pflocal/sserver.c:

Re: [PATCH] Patch that breaks the gnumach build

2013-12-02 Thread Marin Ramesa
On 02.12.2013 14:38:28, Samuel Thibault wrote: Marin Ramesa, le Sun 01 Dec 2013 10:47:53 +0100, a écrit : I need some help. I'm trying to fix a GCC warning by modifying the struct dev_ops in device/conf.h. I need the definition of io_req_t to do that. But when I include device/io_req.h from

[PATCH 01/14] i386/i386at/kd.c: fix signed overflow (a warning from GCC)

2013-12-02 Thread Marin Ramesa
* i386/i386at/kd.c (c): Cast to char. --- i386/i386at/kd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c index 3890c3d..0b780a7 100644 --- a/i386/i386at/kd.c +++ b/i386/i386at/kd.c @@ -854,7 +854,7 @@ int vec; *

[PATCH 02/14] i386/i386at/kd.c: remove useless old code

2013-12-02 Thread Marin Ramesa
* i386/i386at/kd.c [old]: Remove code. --- i386/i386at/kd.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c index 0b780a7..ab04632 100644 --- a/i386/i386at/kd.c +++ b/i386/i386at/kd.c @@ -748,9 +748,7 @@ int vec;

[PATCH 14/14] vm/vm_resident.c: move struct definition to a header file

2013-12-02 Thread Marin Ramesa
* vm/vm_resident.c: Include vm/vm_resident.h. (vm_page_bucket_t): Move struct defintion to vm/vm_resident.h. --- vm/vm_resident.c | 5 + vm/vm_resident.h | 5 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/vm/vm_resident.c b/vm/vm_resident.c index fbd4275..b164109

[PATCH 05/14] i386/i386/idt.c: move struct definition to a header file

2013-12-02 Thread Marin Ramesa
* i386/i386/idt.c (idt_init_entry): Move struct definition to i386/i386/idt-gen.h. --- i386/i386/idt-gen.h | 7 +++ i386/i386/idt.c | 6 -- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/i386/i386/idt-gen.h b/i386/i386/idt-gen.h index f86afb4..1aad4c0 100644 ---

[PATCH 04/14] ddb/db_macro.c: move struct definition to a header file

2013-12-02 Thread Marin Ramesa
* ddb/db_macro.c (db_user_macro): Move struct definition to ddb/db_macro.h. --- ddb/db_macro.c | 6 -- ddb/db_macro.h | 8 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ddb/db_macro.c b/ddb/db_macro.c index 9d14b12..6c1bff3 100644 --- a/ddb/db_macro.c +++

[PATCH 06/14] i386/intel/pmap.c: move struct definitions to a header file

2013-12-02 Thread Marin Ramesa
* i386/intel/pmap.c (pv_entry, pmap_update_item, pmap_update_list): Move struct definitions to i386/intel/pmap.h. --- i386/intel/pmap.c | 45 - i386/intel/pmap.h | 46 +- 2 files changed, 45 insertions(+),

[PATCH 03/14] ddb/db_cond.c: move struct definition to a header file

2013-12-02 Thread Marin Ramesa
* ddb/db_cond.c (db_cond): Move struct definition to ddb/db_cond.h. --- ddb/db_cond.c | 7 --- ddb/db_cond.h | 7 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ddb/db_cond.c b/ddb/db_cond.c index 82ec0d6..b8e661b 100644 --- a/ddb/db_cond.c +++ b/ddb/db_cond.c @@

[PATCH 11/14] kern/lock.c: move struct definition to a header file

2013-12-02 Thread Marin Ramesa
* kern/lock.c [MACH_SLOCKS NCPUS == 1] (simple_locks_info): Move struct definition to kern/lock.h. --- kern/lock.c | 5 - kern/lock.h | 7 +++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/kern/lock.c b/kern/lock.c index fb5e344..ca47e8a 100644 --- a/kern/lock.c +++

[PATCH 07/14] ipc/ipc_hash.c: move struct definition to a header file

2013-12-02 Thread Marin Ramesa
* ipc/ipc_hash.c (ipc_hash_global_bucket): Move struct definition to ipc/ipc_hash.h. --- ipc/ipc_hash.c | 7 --- ipc/ipc_hash.h | 7 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ipc/ipc_hash.c b/ipc/ipc_hash.c index 5eec58c..5b31691 100644 --- a/ipc/ipc_hash.c +++

[PATCH 13/14] vm/vm_fault.c: move struct definition to a header file

2013-12-02 Thread Marin Ramesa
* vm/vm_fault.c (vm_fault_state): Move struct definition to vm/vm_fault.h. --- vm/vm_fault.c | 26 -- vm/vm_fault.h | 24 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/vm/vm_fault.c b/vm/vm_fault.c index d0c7f96..0bde0fb 100644

[PATCH 12/14] vm/memory_object_proxy.c: move struct definition to a header file

2013-12-02 Thread Marin Ramesa
* vm/memory_object_proxy.c (memory_object_proxy): Move struct definition to vm/memory_object_proxy.h. --- vm/memory_object_proxy.c | 10 -- vm/memory_object_proxy.h | 9 + 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/vm/memory_object_proxy.c

[PATCH 08/14] ipc/ipc_marequest.c: move struct definition to a header file

2013-12-02 Thread Marin Ramesa
* ipc/ipc_marequest.c (ipc_marequest_bucket): Move struct definition to ipc/ipc_marequest.h. * ipc/ipc_marequest.h: Include kern/lock.h. --- ipc/ipc_marequest.c | 7 --- ipc/ipc_marequest.h | 8 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ipc/ipc_marequest.c

[PATCH 09/14] ipc/ipc_port.c: trivial stylistic fix for consistency

2013-12-02 Thread Marin Ramesa
* ipc/ipc_port.c (indent): Trivial stylistic fix for consistency. --- ipc/ipc_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipc/ipc_port.c b/ipc/ipc_port.c index b960739..99a6ad4 100644 --- a/ipc/ipc_port.c +++ b/ipc/ipc_port.c @@ -1240,7 +1240,7 @@

[PATCH] device/net_io.c: initialize hash_entp to NULL

2013-12-02 Thread Marin Ramesa
* device/net_io.c (hash_entp): Initialize to NET_HASH_ENTRY_NULL. --- device/net_io.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/device/net_io.c b/device/net_io.c index 1958840..40fe8f6 100644 --- a/device/net_io.c +++ b/device/net_io.c @@ -324,6 +324,7 @@