static const int NUM_OPEN_FLAGS;
+ //@{
+ /// Basic X86_64 Linux types
+ typedef uint64_t size_t;
+ typedef uint64_t off_t;
+ typedef int64_t time_t;
+ typedef int64_t clock_t;
+ //@}
+
static const unsigned TGT_MAP_SHARED = 0x00001;
static const unsigned TGT_MAP_PRIVATE = 0x00002;
static const unsigned TGT_MAP_32BIT = 0x00040;
static SyscallFlagTransTable mmapFlagTable[];
+ //@{
+ /// Basic X86 Linux types
+ typedef uint32_t size_t;
+ typedef uint32_t off_t;
+ typedef int32_t time_t;
+ typedef int32_t clock_t;
+ //@}
+
static const unsigned TGT_MAP_SHARED = 0x00001;
static const unsigned TGT_MAP_PRIVATE = 0x00002;
static const unsigned TGT_MAP_32BIT = 0x00040;
template <class OS>
SyscallReturn
mmapFunc(SyscallDesc *desc, ThreadContext *tc,
- Addr start, uint64_t length, int prot, int tgt_flags,
- int tgt_fd, int offset)
+ Addr start, typename OS::size_t length, int prot,
+ int tgt_flags, int tgt_fd, typename OS::off_t offset)
{
auto p = tc->getProcessPtr();
Addr page_bytes = tc->getSystemPtr()->getPageBytes();
template <class OS>
SyscallReturn
mmap2Func(SyscallDesc *desc, ThreadContext *tc,
- Addr start, uint64_t length, int prot, int tgt_flags,
- int tgt_fd, int offset)
+ Addr start, typename OS::size_t length, int prot,
+ int tgt_flags, int tgt_fd, typename OS::off_t offset)
{
return mmapFunc<OS>(desc, tc, start, length, prot, tgt_flags,
tgt_fd, offset * tc->getSystemPtr()->getPageBytes());