process.hh revision 2680:246e7104f744
112027Sjungma@eit.uni-kl.de/*
212027Sjungma@eit.uni-kl.de * Copyright (c) 2003-2004 The Regents of The University of Michigan
312027Sjungma@eit.uni-kl.de * All rights reserved.
412027Sjungma@eit.uni-kl.de *
512027Sjungma@eit.uni-kl.de * Redistribution and use in source and binary forms, with or without
612027Sjungma@eit.uni-kl.de * modification, are permitted provided that the following conditions are
712027Sjungma@eit.uni-kl.de * met: redistributions of source code must retain the above copyright
812027Sjungma@eit.uni-kl.de * notice, this list of conditions and the following disclaimer;
912027Sjungma@eit.uni-kl.de * redistributions in binary form must reproduce the above copyright
1012027Sjungma@eit.uni-kl.de * notice, this list of conditions and the following disclaimer in the
1112027Sjungma@eit.uni-kl.de * documentation and/or other materials provided with the distribution;
1212027Sjungma@eit.uni-kl.de * neither the name of the copyright holders nor the names of its
1312027Sjungma@eit.uni-kl.de * contributors may be used to endorse or promote products derived from
1412027Sjungma@eit.uni-kl.de * this software without specific prior written permission.
1512027Sjungma@eit.uni-kl.de *
1612027Sjungma@eit.uni-kl.de * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1712027Sjungma@eit.uni-kl.de * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1812027Sjungma@eit.uni-kl.de * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1912027Sjungma@eit.uni-kl.de * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2012027Sjungma@eit.uni-kl.de * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2112027Sjungma@eit.uni-kl.de * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2212027Sjungma@eit.uni-kl.de * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2312027Sjungma@eit.uni-kl.de * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2412027Sjungma@eit.uni-kl.de * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2512027Sjungma@eit.uni-kl.de * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2612027Sjungma@eit.uni-kl.de * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2712027Sjungma@eit.uni-kl.de *
2812027Sjungma@eit.uni-kl.de * Authors: Steve Reinhardt
2912027Sjungma@eit.uni-kl.de */
3012027Sjungma@eit.uni-kl.de
3112027Sjungma@eit.uni-kl.de#ifndef __SPARC_LINUX_PROCESS_HH__
3212027Sjungma@eit.uni-kl.de#define __SPARC_LINUX_PROCESS_HH__
3312027Sjungma@eit.uni-kl.de
3412027Sjungma@eit.uni-kl.de#include "arch/sparc/linux/linux.hh"
3512027Sjungma@eit.uni-kl.de#include "arch/sparc/process.hh"
3612027Sjungma@eit.uni-kl.de#include "sim/process.hh"
3712027Sjungma@eit.uni-kl.de
3812027Sjungma@eit.uni-kl.denamespace SparcISA {
3912027Sjungma@eit.uni-kl.de
4012027Sjungma@eit.uni-kl.de/// A process with emulated SPARC/Linux syscalls.
4112027Sjungma@eit.uni-kl.declass SparcLinuxProcess : public SparcLiveProcess
4212027Sjungma@eit.uni-kl.de{
4312027Sjungma@eit.uni-kl.de  public:
4412027Sjungma@eit.uni-kl.de    /// Constructor.
4512027Sjungma@eit.uni-kl.de    SparcLinuxProcess(const std::string &name,
4612027Sjungma@eit.uni-kl.de                      ObjectFile *objFile,
4712027Sjungma@eit.uni-kl.de                      System * system,
4812027Sjungma@eit.uni-kl.de                      int stdin_fd, int stdout_fd, int stderr_fd,
4912027Sjungma@eit.uni-kl.de                      std::vector<std::string> &argv,
5012027Sjungma@eit.uni-kl.de                      std::vector<std::string> &envp);
5112027Sjungma@eit.uni-kl.de
5212027Sjungma@eit.uni-kl.de    virtual SyscallDesc* getDesc(int callnum);
5312027Sjungma@eit.uni-kl.de
5412027Sjungma@eit.uni-kl.de    /// The target system's hostname.
5512027Sjungma@eit.uni-kl.de    static const char *hostname;
5612027Sjungma@eit.uni-kl.de
5712027Sjungma@eit.uni-kl.de     /// Array of syscall descriptors, indexed by call number.
5812027Sjungma@eit.uni-kl.de    static SyscallDesc syscallDescs[];
5912027Sjungma@eit.uni-kl.de
6012027Sjungma@eit.uni-kl.de    const int Num_Syscall_Descs;
6112027Sjungma@eit.uni-kl.de};
6212027Sjungma@eit.uni-kl.de
6312027Sjungma@eit.uni-kl.deSyscallReturn getresuidFunc(SyscallDesc *desc, int num,
6412027Sjungma@eit.uni-kl.de                                 Process *p, ThreadContext *tc);
6512027Sjungma@eit.uni-kl.de
6612027Sjungma@eit.uni-kl.de} // namespace SparcISA
6712027Sjungma@eit.uni-kl.de#endif // __ALPHA_LINUX_PROCESS_HH__
6812027Sjungma@eit.uni-kl.de