syscall_emul.hh (6703:2707e7b63f53) syscall_emul.hh (6744:408673e38566)
1/*
2 * Copyright (c) 2003-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;

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

1182SyscallReturn
1183timesFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
1184 ThreadContext *tc)
1185{
1186 int index = 0;
1187 TypedBufferArg<typename OS::tms> bufp(process->getSyscallArg(tc, index));
1188
1189 // Fill in the time structure (in clocks)
1/*
2 * Copyright (c) 2003-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;

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

1182SyscallReturn
1183timesFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
1184 ThreadContext *tc)
1185{
1186 int index = 0;
1187 TypedBufferArg<typename OS::tms> bufp(process->getSyscallArg(tc, index));
1188
1189 // Fill in the time structure (in clocks)
1190 int64_t clocks = curTick * OS::_SC_CLK_TCK / Clock::Int::s;
1190 int64_t clocks = curTick * OS::M5_SC_CLK_TCK / Clock::Int::s;
1191 bufp->tms_utime = clocks;
1192 bufp->tms_stime = 0;
1193 bufp->tms_cutime = 0;
1194 bufp->tms_cstime = 0;
1195
1196 // Convert to host endianness
1197 bufp->tms_utime = htog(bufp->tms_utime);
1198

--- 30 unchanged lines hidden ---
1191 bufp->tms_utime = clocks;
1192 bufp->tms_stime = 0;
1193 bufp->tms_cutime = 0;
1194 bufp->tms_cstime = 0;
1195
1196 // Convert to host endianness
1197 bufp->tms_utime = htog(bufp->tms_utime);
1198

--- 30 unchanged lines hidden ---