syscall_emul.cc (5958:2d9737bf3c2f) syscall_emul.cc (6029:007c36616f47)
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;

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

37
38#include "sim/syscall_emul.hh"
39#include "base/chunk_generator.hh"
40#include "base/trace.hh"
41#include "cpu/thread_context.hh"
42#include "cpu/base.hh"
43#include "mem/page_table.hh"
44#include "sim/process.hh"
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;

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

37
38#include "sim/syscall_emul.hh"
39#include "base/chunk_generator.hh"
40#include "base/trace.hh"
41#include "cpu/thread_context.hh"
42#include "cpu/base.hh"
43#include "mem/page_table.hh"
44#include "sim/process.hh"
45#include "sim/system.hh"
45
46#include "sim/sim_exit.hh"
47
48using namespace std;
49using namespace TheISA;
50
51void
52SyscallDesc::doSyscall(int callnum, LiveProcess *process, ThreadContext *tc)

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

86 return 0;
87}
88
89
90SyscallReturn
91exitFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
92 ThreadContext *tc)
93{
46
47#include "sim/sim_exit.hh"
48
49using namespace std;
50using namespace TheISA;
51
52void
53SyscallDesc::doSyscall(int callnum, LiveProcess *process, ThreadContext *tc)

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

87 return 0;
88}
89
90
91SyscallReturn
92exitFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
93 ThreadContext *tc)
94{
94 if (tc->exit()) {
95 if (process->system->numRunningContexts() == 1) {
96 // Last running context... exit simulator
95 exitSimLoop("target called exit()",
97 exitSimLoop("target called exit()",
96 process->getSyscallArg(tc, 0) & 0xff);
98 process->getSyscallArg(tc, 0) & 0xff);
99 } else {
100 // other running threads... just halt this one
101 tc->halt();
97 }
98
99 return 1;
100}
101
102
103SyscallReturn
104getpagesizeFunc(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc)

--- 534 unchanged lines hidden ---
102 }
103
104 return 1;
105}
106
107
108SyscallReturn
109getpagesizeFunc(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc)

--- 534 unchanged lines hidden ---