Deleted Added
sdiff udiff text old ( 11886:43b882cada33 ) new ( 12296:e127a1bae7bd )
full compact
1/*
2 * Copyright (c) 2012-2013, 2015 ARM Limited
3 * Copyright (c) 2015-2016 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

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

46#ifndef __SIM_SYSCALL_DESC_HH__
47#define __SIM_SYSCALL_DESC_HH__
48
49#include <string>
50
51#include "base/types.hh"
52
53class Process;
54class SyscallDesc;
55class SyscallReturn;
56class ThreadContext;
57
58SyscallReturn unimplementedFunc(SyscallDesc *desc, int num,
59 Process *p, ThreadContext *tc);
60
61/**
62 * This class provides the wrapper interface for the system call
63 * implementations which are defined in the sim/syscall_emul files and
64 * bound to the ISAs in the architecture specific code
65 * (i.e. arch/X86/linux/process.cc).
66 */
67class SyscallDesc {
68 public:
69 /** Typedef the function pointer here to clean up code below */
70 typedef SyscallReturn (*SyscallExecutor)(SyscallDesc*, int num,
71 Process*, ThreadContext*);
72
73 SyscallDesc(const char *name,
74 SyscallExecutor sys_exec=unimplementedFunc, int flags=0)
75 : _name(name), executor(sys_exec), _flags(flags), _warned(false)
76 {
77 }
78
79 /** Provide a mechanism to specify behavior for abnormal system calls */
80 enum Flags {
81 /**
82 * Do not set return registers according to executor return value.

--- 55 unchanged lines hidden ---