From ee02e647882a4be29e1130bd79904ee79ed6b802 Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Tue, 1 Aug 2006 13:45:43 -0700 Subject: Wrap libwfb memory access. Use the READ and WRITE macros to wrap memory accesses that could be in video memory. Add MEMCPY_WRAPPED and MEMSET_WRAPPED macros to wrap memcpy and memset, respectively. --- fb/fbbits.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'fb/fbbits.c') diff --git a/fb/fbbits.c b/fb/fbbits.c index 56b58df4e..cefe943b6 100644 --- a/fb/fbbits.c +++ b/fb/fbbits.c @@ -103,14 +103,14 @@ #define BITSUNIT BYTE #define BITSMUL 3 -#define FbDoTypeStore(b,t,x,s) (*((t *) (b)) = (x) >> (s)) -#define FbDoTypeRRop(b,t,a,x,s) (*((t *) (b)) = FbDoRRop(*((t *) (b)),\ - (a) >> (s), \ - (x) >> (s))) -#define FbDoTypeMaskRRop(b,t,a,x,m,s) (*((t *) (b)) = FbDoMaskRRop(*((t *) (b)),\ - (a) >> (s), \ - (x) >> (s), \ - (m) >> (s)) +#define FbDoTypeStore(b,t,x,s) WRITE(((t *) (b)), (x) >> (s)) +#define FbDoTypeRRop(b,t,a,x,s) WRITE((t *) (b), FbDoRRop(READ((t *) (b)),\ + (a) >> (s), \ + (x) >> (s))) +#define FbDoTypeMaskRRop(b,t,a,x,m,s) WRITE((t *) (b), FbDoMaskRRop(READ((t *) (b)),\ + (a) >> (s), \ + (x) >> (s), \ + (m) >> (s))) #if BITMAP_BIT_ORDER == LSBFirst #define BITSSTORE(b,x) ((unsigned long) (b) & 1 ? \ (FbDoTypeStore (b, CARD8, x, 0), \ -- cgit v1.2.3