linux.hh (2665:a124942bacb8) linux.hh (2764:e6fea7527b3c)
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 55 unchanged lines hidden (view full) ---

64 /// Basic Linux types.
65 typedef uint64_t size_t;
66 typedef uint64_t off_t;
67 typedef int64_t time_t;
68 typedef uint32_t uid_t;
69 typedef uint32_t gid_t;
70 //@}
71
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 55 unchanged lines hidden (view full) ---

64 /// Basic Linux types.
65 typedef uint64_t size_t;
66 typedef uint64_t off_t;
67 typedef int64_t time_t;
68 typedef uint32_t uid_t;
69 typedef uint32_t gid_t;
70 //@}
71
72#if BSD_HOST
72#if NO_STAT64
73 typedef struct stat hst_stat;
74 typedef struct stat hst_stat64;
75#else
76 typedef struct stat hst_stat ;
77 typedef struct stat64 hst_stat64;
78#endif
79
80 /// Stat buffer. Note that we can't call it 'stat' since that

--- 90 unchanged lines hidden (view full) ---

171 int64_t ru_nsignals; //!< signals received
172 int64_t ru_nvcsw; //!< voluntary context switches
173 int64_t ru_nivcsw; //!< involuntary "
174 };
175
176 /// Helper function to convert a host stat buffer to a target stat
177 /// buffer. Also copies the target buffer out to the simulated
178 /// memory space. Used by stat(), fstat(), and lstat().
73 typedef struct stat hst_stat;
74 typedef struct stat hst_stat64;
75#else
76 typedef struct stat hst_stat ;
77 typedef struct stat64 hst_stat64;
78#endif
79
80 /// Stat buffer. Note that we can't call it 'stat' since that

--- 90 unchanged lines hidden (view full) ---

171 int64_t ru_nsignals; //!< signals received
172 int64_t ru_nvcsw; //!< voluntary context switches
173 int64_t ru_nivcsw; //!< involuntary "
174 };
175
176 /// Helper function to convert a host stat buffer to a target stat
177 /// buffer. Also copies the target buffer out to the simulated
178 /// memory space. Used by stat(), fstat(), and lstat().
179#if !BSD_HOST
179#if !NO_STAT64
180 static void
181 copyOutStatBuf(TranslatingPort *mem, Addr addr, hst_stat *host)
182 {
183 using namespace TheISA;
184
185 TypedBufferArg<Linux::tgt_stat> tgt(addr);
186
187 tgt->st_dev = htog(host->st_dev);

--- 98 unchanged lines hidden ---
180 static void
181 copyOutStatBuf(TranslatingPort *mem, Addr addr, hst_stat *host)
182 {
183 using namespace TheISA;
184
185 TypedBufferArg<Linux::tgt_stat> tgt(addr);
186
187 tgt->st_dev = htog(host->st_dev);

--- 98 unchanged lines hidden ---