syscall_emul.hh (13902:a43851662ce3) | syscall_emul.hh (13907:3a7a5838ef50) |
---|---|
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 --- 740 unchanged lines hidden (view full) --- 749template <class OS> 750SyscallReturn 751ioctlFunc(SyscallDesc *desc, int callnum, Process *p, ThreadContext *tc) 752{ 753 int index = 0; 754 int tgt_fd = p->getSyscallArg(tc, index); 755 unsigned req = p->getSyscallArg(tc, index); 756 | 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 --- 740 unchanged lines hidden (view full) --- 749template <class OS> 750SyscallReturn 751ioctlFunc(SyscallDesc *desc, int callnum, Process *p, ThreadContext *tc) 752{ 753 int index = 0; 754 int tgt_fd = p->getSyscallArg(tc, index); 755 unsigned req = p->getSyscallArg(tc, index); 756 |
757 DPRINTF(SyscallVerbose, "ioctl(%d, 0x%x, ...)\n", tgt_fd, req); | 757 DPRINTF_SYSCALL(Verbose, "ioctl(%d, 0x%x, ...)\n", tgt_fd, req); |
758 759 if (OS::isTtyReq(req)) 760 return -ENOTTY; 761 762 auto dfdp = std::dynamic_pointer_cast<DeviceFDEntry>((*p->fds)[tgt_fd]); 763 if (dfdp) { 764 EmulatedDriver *emul_driver = dfdp->getDriver(); 765 if (emul_driver) --- 1970 unchanged lines hidden (view full) --- 2736{ 2737 int index = 0; 2738 pid_t pid = p->getSyscallArg(tc, index); 2739 Addr statPtr = p->getSyscallArg(tc, index); 2740 int options = p->getSyscallArg(tc, index); 2741 Addr rusagePtr = p->getSyscallArg(tc, index); 2742 2743 if (rusagePtr) | 758 759 if (OS::isTtyReq(req)) 760 return -ENOTTY; 761 762 auto dfdp = std::dynamic_pointer_cast<DeviceFDEntry>((*p->fds)[tgt_fd]); 763 if (dfdp) { 764 EmulatedDriver *emul_driver = dfdp->getDriver(); 765 if (emul_driver) --- 1970 unchanged lines hidden (view full) --- 2736{ 2737 int index = 0; 2738 pid_t pid = p->getSyscallArg(tc, index); 2739 Addr statPtr = p->getSyscallArg(tc, index); 2740 int options = p->getSyscallArg(tc, index); 2741 Addr rusagePtr = p->getSyscallArg(tc, index); 2742 2743 if (rusagePtr) |
2744 DPRINTFR(SyscallVerbose, 2745 "%d: %s: syscall wait4: rusage pointer provided however " | 2744 DPRINTF_SYSCALL(Verbose, "wait4: rusage pointer provided %lx, however " |
2746 "functionality not supported. Ignoring rusage pointer.\n", | 2745 "functionality not supported. Ignoring rusage pointer.\n", |
2747 curTick(), tc->getCpuPtr()->name()); | 2746 rusagePtr); |
2748 2749 /** 2750 * Currently, wait4 is only implemented so that it will wait for children 2751 * exit conditions which are denoted by a SIGCHLD signals posted into the 2752 * system signal list. We return no additional information via any of the 2753 * parameters supplied to wait4. If nothing is found in the system signal 2754 * list, we will wait indefinitely for SIGCHLD to post by retrying the 2755 * call. --- 109 unchanged lines hidden --- | 2747 2748 /** 2749 * Currently, wait4 is only implemented so that it will wait for children 2750 * exit conditions which are denoted by a SIGCHLD signals posted into the 2751 * system signal list. We return no additional information via any of the 2752 * parameters supplied to wait4. If nothing is found in the system signal 2753 * list, we will wait indefinitely for SIGCHLD to post by retrying the 2754 * call. --- 109 unchanged lines hidden --- |