diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2006-08-01 13:45:43 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2006-08-01 13:45:43 -0700 |
commit | ee02e647882a4be29e1130bd79904ee79ed6b802 (patch) | |
tree | f4a2d76b462019f4ea16a7c2004d257db6684ab6 /fb/fbbits.c | |
parent | a69335dc299be6de8b82ed34de1cb30f1255feb4 (diff) |
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.
Diffstat (limited to 'fb/fbbits.c')
-rw-r--r-- | fb/fbbits.c | 16 |
1 files changed, 8 insertions, 8 deletions
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), \ |