bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH gnumach 2/2] ipc: also use the kernel message buffer cache fo


From: Samuel Thibault
Subject: Re: [PATCH gnumach 2/2] ipc: also use the kernel message buffer cache for kernel messages
Date: Fri, 2 Jan 2015 01:25:31 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Justus Winter, le Thu 18 Dec 2014 11:30:25 +0100, a écrit :
> * ipc/ipc_kmsg.c (ipc_kmsg_get_from_kernel): Use the ikm cache.
> (ipc_kmsg_put_to_kernel): Likewis.

Ack!

> ---
>  ipc/ipc_kmsg.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c
> index e16709c..dfbb3eb 100644
> --- a/ipc/ipc_kmsg.c
> +++ b/ipc/ipc_kmsg.c
> @@ -546,10 +546,9 @@ ipc_kmsg_get_from_kernel(
>       assert(size >= sizeof(mach_msg_header_t));
>       assert((size & 3) == 0);
>  
> -     kmsg = ikm_alloc(size);
> +     kmsg = ikm_cache_get (size);
>       if (kmsg == IKM_NULL)
>               return MACH_SEND_NO_BUFFER;
> -     ikm_init(kmsg, size);
>  
>       memcpy(&kmsg->ikm_header, msg, size);
>  
> @@ -613,7 +612,7 @@ ipc_kmsg_put_to_kernel(
>  
>       memcpy(msg, &kmsg->ikm_header, size);
>  
> -     ikm_free(kmsg);
> +     ikm_cache_put (kmsg);
>  }
>  
>  /*
> -- 
> 2.1.3
> 

-- 
Samuel
<N> bon comment on fait de l'investigation pour savoir qui est le vilain ?
<s> on débranche le routeur et on regarde qui s'affole
 -+- #ens-mim administre -+-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]