svn commit: r237203 - head/sys/dev/fb

Taku YAMAMOTO taku at tackymt.homeip.net
Sun Jun 17 21:29:16 UTC 2012


On Sun, 17 Jun 2012 21:02:48 +0000 (UTC)
Poul-Henning Kamp <phk at FreeBSD.org> wrote:

> Author: phk
> Date: Sun Jun 17 21:02:48 2012
> New Revision: 237203
> URL: http://svn.freebsd.org/changeset/base/237203
(snip)
> Modified:
>   head/sys/dev/fb/fbreg.h
> 
> Modified: head/sys/dev/fb/fbreg.h
> ==============================================================================
> --- head/sys/dev/fb/fbreg.h	Sun Jun 17 20:45:45 2012	(r237202)
> +++ head/sys/dev/fb/fbreg.h	Sun Jun 17 21:02:48 2012	(r237203)
> @@ -35,9 +35,16 @@
>  
>  /* some macros */
>  #if defined(__amd64__) || defined(__i386__)
> -#define bcopy_io(s, d, c)	bcopy((void *)(s), (void *)(d), (c))
> -#define bcopy_toio(s, d, c)	bcopy((void *)(s), (void *)(d), (c))
> -#define bcopy_fromio(s, d, c)	bcopy((void *)(s), (void *)(d), (c))
> +
> +static __inline void
> +copyw(uint16_t *src, uint16_t *dst, size_t size)
> +{
> +	while (size--)
> +		*dst++ = *src++;
> +}
> +#define bcopy_io(s, d, c)	copyw((void*)(s), (void*)(d), (c))
> +#define bcopy_toio(s, d, c)	copyw((void*)(s), (void*)(d), (c))
> +#define bcopy_fromio(s, d, c)	copyw((void*)(s), (void*)(d), (c))
>  #define bzero_io(d, c)		bzero((void *)(d), (c))
>  #define fill_io(p, d, c)	fill((p), (void *)(d), (c))
>  #define fillw_io(p, d, c)	fillw((p), (void *)(d), (c))
> 

Does this end up with copying 2*size bytes instead of size bytes?

-- 
-|-__   YAMAMOTO, Taku
 | __ <     <taku at tackymt.homeip.net>

      - A chicken is an egg's way of producing more eggs. -


More information about the svn-src-head mailing list