diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2012-06-17 21:02:48 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2012-06-17 21:02:48 +0000 |
| commit | fc9174db5100016523721f6f4f8ab20294ee35b0 (patch) | |
| tree | 1ab32d38ad0f664e958ea4e62f0df581ceba4a4e /sys/dev | |
| parent | 79cafccd40b19c663d7006ab305f043cec32815b (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/fb/fbreg.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/fb/fbreg.h b/sys/dev/fb/fbreg.h index 623e37c3e92c..ac9a6c37744f 100644 --- a/sys/dev/fb/fbreg.h +++ b/sys/dev/fb/fbreg.h @@ -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)) |
