vgdb: Handle EAGAIN in read_buf
[valgrind.git] / coregrind / m_syswrap / syswrap-linux-variants.c
blob3b0bff162a0cef5e5a7a063b9eaaec169ddfc367
2 /*--------------------------------------------------------------------*/
3 /*--- Handlers for syscalls on minor variants of Linux kernels. ---*/
4 /*--- syswrap-linux-variants.c ---*/
5 /*--------------------------------------------------------------------*/
7 /*
8 This file is part of Valgrind, a dynamic binary instrumentation
9 framework.
11 Copyright (C) 2000-2017 Julian Seward
12 jseward@acm.org
14 This program is free software; you can redistribute it and/or
15 modify it under the terms of the GNU General Public License as
16 published by the Free Software Foundation; either version 2 of the
17 License, or (at your option) any later version.
19 This program is distributed in the hope that it will be useful, but
20 WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 General Public License for more details.
24 You should have received a copy of the GNU General Public License
25 along with this program; if not, see <http://www.gnu.org/licenses/>.
27 The GNU General Public License is contained in the file COPYING.
30 #if defined(VGO_linux)
32 /* The files syswrap-generic.c, syswrap-linux.c, syswrap-*-linux.c,
33 and associated vki*.h header files, constitute Valgrind's model of how a
34 vanilla Linux kernel behaves with respect to syscalls.
36 On a few occasions, it is useful to run with a kernel that has some
37 (minor) extensions to the vanilla model, either due to running on a
38 hacked kernel, or using a vanilla kernel which has incorporated a
39 custom kernel module. Rather than clutter the standard model, all
40 such variant handlers are placed in here.
42 Unlike the C files for the standard model, this file should also
43 contain all constants/types needed for said wrappers. The vki*.h
44 headers should not be polluted with non-vanilla info. */
47 #include "pub_core_basics.h"
48 #include "pub_core_vki.h"
49 #include "pub_core_threadstate.h"
50 #include "pub_core_aspacemgr.h"
51 #include "pub_core_debuginfo.h" // VG_(di_notify_*)
52 #include "pub_core_transtab.h" // VG_(discard_translations)
53 #include "pub_core_debuglog.h"
54 #include "pub_core_libcbase.h"
55 #include "pub_core_libcassert.h"
56 #include "pub_core_libcfile.h"
57 #include "pub_core_libcprint.h"
58 #include "pub_core_libcproc.h"
59 #include "pub_core_mallocfree.h"
60 #include "pub_core_tooliface.h"
61 #include "pub_core_options.h"
62 #include "pub_core_scheduler.h"
63 #include "pub_core_signals.h"
64 #include "pub_core_syscall.h"
66 #include "priv_types_n_macros.h"
67 #include "priv_syswrap-linux-variants.h"
70 /* ---------------------------------------------------------------
71 BProc wrappers
72 ------------------------------------------------------------ */
74 /* Return 0 means hand to kernel, non-0 means fail w/ that value. */
75 Int ML_(linux_variant_PRE_sys_bproc)( UWord arg1, UWord arg2,
76 UWord arg3, UWord arg4,
77 UWord arg5, UWord arg6 )
79 return 0;
82 void ML_(linux_variant_POST_sys_bproc)( UWord arg1, UWord arg2,
83 UWord arg3, UWord arg4,
84 UWord arg5, UWord arg6 )
88 #endif // defined(VGO_linux)
90 /*--------------------------------------------------------------------*/
91 /*--- end ---*/
92 /*--------------------------------------------------------------------*/