syscall_emul.hh (11321:02e930db812d) syscall_emul.hh (11337:4e3bf51208ba)
1/*
2 * Copyright (c) 2012-2013, 2015 ARM Limited
3 * Copyright (c) 2015 Advanced Micro Devices, Inc.
4 * All rights reserved
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

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

1352 tp->tv_sec = TheISA::htog(tp->tv_sec);
1353 tp->tv_nsec = TheISA::htog(tp->tv_nsec);
1354
1355 tp.copyOut(tc->getMemProxy());
1356
1357 return 0;
1358}
1359
1/*
2 * Copyright (c) 2012-2013, 2015 ARM Limited
3 * Copyright (c) 2015 Advanced Micro Devices, Inc.
4 * All rights reserved
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

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

1352 tp->tv_sec = TheISA::htog(tp->tv_sec);
1353 tp->tv_nsec = TheISA::htog(tp->tv_nsec);
1354
1355 tp.copyOut(tc->getMemProxy());
1356
1357 return 0;
1358}
1359
1360/// Target clock_getres() function.
1361template <class OS>
1362SyscallReturn
1363clock_getresFunc(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc)
1364{
1365 int index = 1;
1366 TypedBufferArg<typename OS::timespec> tp(p->getSyscallArg(tc, index));
1367
1368 // Set resolution at ns, which is what clock_gettime() returns
1369 tp->tv_sec = 0;
1370 tp->tv_nsec = 1;
1371
1372 tp.copyOut(tc->getMemProxy());
1373
1374 return 0;
1375}
1376
1360/// Target gettimeofday() handler.
1361template <class OS>
1362SyscallReturn
1363gettimeofdayFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
1364 ThreadContext *tc)
1365{
1366 int index = 0;
1367 TypedBufferArg<typename OS::timeval> tp(process->getSyscallArg(tc, index));

--- 148 unchanged lines hidden ---
1377/// Target gettimeofday() handler.
1378template <class OS>
1379SyscallReturn
1380gettimeofdayFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
1381 ThreadContext *tc)
1382{
1383 int index = 0;
1384 TypedBufferArg<typename OS::timeval> tp(process->getSyscallArg(tc, index));

--- 148 unchanged lines hidden ---