/*
- * Copyright (c) 2004-2005 The Regents of The University of Michigan
+ * Copyright (c) 2004-2009 The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#ifndef __LINUX_HH__
#define __LINUX_HH__
+
+#include "base/types.hh"
#include "config/full_system.hh"
#if FULL_SYSTEM
#else //!FULL_SYSTEM
-#include <inttypes.h>
+#include <string>
#include "kern/operatingsystem.hh"
+class ThreadContext;
+class LiveProcess;
+
///
/// This class encapsulates the types, structures, constants,
/// functions, and syscall-number mappings specific to the Alpha Linux
typedef uint64_t size_t;
typedef uint64_t off_t;
typedef int64_t time_t;
+ typedef int64_t clock_t;
typedef uint32_t uid_t;
typedef uint32_t gid_t;
//@}
int64_t tv_usec; //!< microseconds
};
+ /// Clock ticks per second, for times().
+ static const int M5_SC_CLK_TCK = 100;
+
+ /// For times().
+ struct tms {
+ int64_t tms_utime; //!< user time
+ int64_t tms_stime; //!< system time
+ int64_t tms_cutime; //!< user time of children
+ int64_t tms_cstime; //!< system time of children
+ };
+
// For writev/readv
struct tgt_iovec {
uint64_t iov_base; // void *
int64_t ru_nivcsw; //!< involuntary "
};
+ static int openSpecialFile(std::string path, LiveProcess *process, ThreadContext *tc);
+ static std::string procMeminfo(LiveProcess *process, ThreadContext *tc);
+
}; // class Linux