process.hh revision 2680
12199SN/A/*
22199SN/A * Copyright (c) 2003-2004 The Regents of The University of Michigan
32199SN/A * All rights reserved.
42199SN/A *
52199SN/A * Redistribution and use in source and binary forms, with or without
62199SN/A * modification, are permitted provided that the following conditions are
72199SN/A * met: redistributions of source code must retain the above copyright
82199SN/A * notice, this list of conditions and the following disclaimer;
92199SN/A * redistributions in binary form must reproduce the above copyright
102199SN/A * notice, this list of conditions and the following disclaimer in the
112199SN/A * documentation and/or other materials provided with the distribution;
122199SN/A * neither the name of the copyright holders nor the names of its
132199SN/A * contributors may be used to endorse or promote products derived from
142199SN/A * this software without specific prior written permission.
152199SN/A *
162199SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172199SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182199SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192199SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202199SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212199SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222199SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232199SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242199SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252199SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262199SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665Ssaidi@eecs.umich.edu *
282665Ssaidi@eecs.umich.edu * Authors: Steve Reinhardt
292199SN/A */
302199SN/A
312202SN/A#ifndef __SPARC_LINUX_PROCESS_HH__
322202SN/A#define __SPARC_LINUX_PROCESS_HH__
332199SN/A
342584SN/A#include "arch/sparc/linux/linux.hh"
352474SN/A#include "arch/sparc/process.hh"
362199SN/A#include "sim/process.hh"
372199SN/A
382474SN/Anamespace SparcISA {
392199SN/A
402202SN/A/// A process with emulated SPARC/Linux syscalls.
412474SN/Aclass SparcLinuxProcess : public SparcLiveProcess
422199SN/A{
432199SN/A  public:
442199SN/A    /// Constructor.
452202SN/A    SparcLinuxProcess(const std::string &name,
462199SN/A                      ObjectFile *objFile,
472458SN/A                      System * system,
482199SN/A                      int stdin_fd, int stdout_fd, int stderr_fd,
492199SN/A                      std::vector<std::string> &argv,
502199SN/A                      std::vector<std::string> &envp);
512199SN/A
522199SN/A    virtual SyscallDesc* getDesc(int callnum);
532199SN/A
542199SN/A    /// The target system's hostname.
552199SN/A    static const char *hostname;
562199SN/A
572199SN/A     /// Array of syscall descriptors, indexed by call number.
582199SN/A    static SyscallDesc syscallDescs[];
592199SN/A
602199SN/A    const int Num_Syscall_Descs;
612199SN/A};
622199SN/A
632561SN/ASyscallReturn getresuidFunc(SyscallDesc *desc, int num,
642680Sktlim@umich.edu                                 Process *p, ThreadContext *tc);
652561SN/A
662474SN/A} // namespace SparcISA
672199SN/A#endif // __ALPHA_LINUX_PROCESS_HH__
68