# define ENTER(_types...) Debug_Enter((char*)__func__, _types)
# define LOG(_fmt...) Debug_Log((char*)__func__, _fmt)
# define LEAVE(_t...) Debug_Leave((char*)__func__, _t)
+# define LEAVE_RET(_t,_v...) do{LEAVE(_t,_v);return _v;}while(0)
+# define LEAVE_RET0() do{LEAVE('-');return;}while(0)
#else
# define ENTER(...)
# define LOG(...)
# define LEAVE(...)
+# define LEAVE_RET(_t,_v...) return (_v)
+# define LEAVE_RET0() return
#endif
/**
* \}
/**
* \brief Checks is a memory range is user accessable
* \param VAddr Base address to check
- * \param Length Number of bytes to check
* \return 1 if the memory is all user-accessable, 0 otherwise
*/
-extern int MM_IsUser(tVAddr VAddr, int Length);
+extern int MM_IsUser(tVAddr VAddr);
/**
* \brief Set the access flags on a page
* \param VAddr Virtual address of the page
extern void *memcpyd(void *dest, const void *src, Uint count);
extern void *memset(void *dest, int val, Uint count);
extern void *memsetd(void *dest, Uint val, Uint count);
+/**
+ * \}
+ */
+/**
+ * \name Memory Validation
+ * \{
+ */
+extern int CheckString(char *String);
+extern int CheckMem(void *Mem, int Num);
/**
* \}
*/
extern void itoa(char *buf, Uint num, int base, int minLength, char pad);
extern int ReadUTF8(Uint8 *str, Uint32 *Val);
extern int WriteUTF8(Uint8 *str, Uint32 Val);
+extern int LookupString(char **Array, char *Needle);
/**
* \}
*/