Justus Winter, le Wed 30 Apr 2014 14:55:16 +0200, a écrit :
> 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
> ipc_kobject_server function.

Ack.

> * kern/ipc_kobject.c: Include the MIG-generated server headers for the
> machine-dependent interfaces.
> (ipc_kobject_server): Drop the simple declaration of
> MACHINE_SERVER_ROUTINE.
> * i386/i386/machine_routines.h (MACHINE_SERVER_HEADER): New
> definition.
> ---
>  i386/i386/machine_routines.h | 1 +
>  kern/ipc_kobject.c           | 5 +----
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/i386/i386/machine_routines.h b/i386/i386/machine_routines.h
> index d77849a..65315e5 100644
> --- a/i386/i386/machine_routines.h
> +++ b/i386/i386/machine_routines.h
> @@ -31,6 +31,7 @@
>   * The i386 has a set of machine-dependent interfaces.
>   */
>  #define      MACHINE_SERVER          mach_i386_server
> +#define      MACHINE_SERVER_HEADER   <machine/mach_i386.server.h>
>  #define      MACHINE_SERVER_ROUTINE  mach_i386_server_routine
>  
>  #endif /* _I386_MACHINE_ROUTINES_H_ */
> diff --git a/kern/ipc_kobject.c b/kern/ipc_kobject.c
> index 13af820..bf22028 100644
> --- a/kern/ipc_kobject.c
> +++ b/kern/ipc_kobject.c
> @@ -63,6 +63,7 @@
>  
>  #if  MACH_MACHINE_ROUTINES
>  #include <machine/machine_routines.h>
> +#include MACHINE_SERVER_HEADER
>  #endif
>  
>  
> @@ -158,10 +159,6 @@ ipc_kobject_server(request)
>        * to perform the kernel function
>        */
>      {
> -#if  MACH_MACHINE_ROUTINES
> -     extern mig_routine_t    MACHINE_SERVER_ROUTINE();
> -#endif
> -
>       check_simple_locks();
>       if ((routine = mach_server_routine(&request->ikm_header)) != 0
>        || (routine = mach_port_server_routine(&request->ikm_header)) != 0
> -- 
> 1.9.2
> 

-- 
Samuel
Be warned that typing \fBkillall \fIname\fP may not have the desired
effect on non-Linux systems, especially when done by a privileged user.
(From the killall manual page)

Reply via email to