Revision dae3270c linux-user/qemu.h
b/linux-user/qemu.h | ||
---|---|---|
207 | 207 |
#define VERIFY_READ 0 |
208 | 208 |
#define VERIFY_WRITE 1 /* implies read access */ |
209 | 209 |
|
210 |
#define access_ok(type,addr,size) \ |
|
211 |
(page_check_range((target_ulong)addr,size,(type==VERIFY_READ)?PAGE_READ:PAGE_WRITE)==0) |
|
210 |
static inline int access_ok(int type, abi_ulong addr, abi_ulong size) |
|
211 |
{ |
|
212 |
return page_check_range((target_ulong)addr, size, |
|
213 |
(type == VERIFY_READ) ? PAGE_READ : (PAGE_READ | PAGE_WRITE)) == 0; |
|
214 |
} |
|
212 | 215 |
|
213 | 216 |
/* NOTE __get_user and __put_user use host pointers and don't check access. */ |
214 | 217 |
/* These are usually used to access struct data members once the |
Also available in: Unified diff