FreeBSD: add file descriptor tracking for _umtx_op
[valgrind.git] / coregrind / m_syswrap / priv_syswrap-solaris.h
blobc988a6d5452876315f29c360fb6a2f4baf868f22
2 /*--------------------------------------------------------------------*/
3 /*--- Solaris-specific syscalls stuff. priv_syswrap-solaris.h ---*/
4 /*--------------------------------------------------------------------*/
6 /*
7 This file is part of Valgrind, a dynamic binary instrumentation
8 framework.
10 Copyright (C) 2011-2017 Petr Pavlu
11 setup@dagobah.cz
13 This program is free software; you can redistribute it and/or
14 modify it under the terms of the GNU General Public License as
15 published by the Free Software Foundation; either version 2 of the
16 License, or (at your option) any later version.
18 This program is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, see <http://www.gnu.org/licenses/>.
26 The GNU General Public License is contained in the file COPYING.
29 #ifndef __PRIV_SYSWRAP_SOLARIS_H
30 #define __PRIV_SYSWRAP_SOLARIS_H
32 #include "pub_core_basics.h" // VG_ macro
33 #include "priv_types_n_macros.h" // DECL_TEMPLATE
34 #include "pub_core_tooliface.h" // CorePart
36 /* Macro to join a syscall name with a syscall variant. */
37 #define SC2(name, subname) \
38 name "_" subname
40 /* Macro to join a syscall name with its variant and sub-variant. */
41 #define SC3(name, subname, subsubname) \
42 name "_" subname "_" subsubname
44 extern void ML_(call_on_new_stack_0_1)(Addr stack, Addr retaddr,
45 void (*f)(Word), Word arg1);
46 extern Word ML_(start_thread_NORETURN)(void *arg);
47 extern Addr ML_(allocstack) (ThreadId tid);
48 extern void ML_(setup_start_thread_context)(ThreadId tid, vki_ucontext_t *uc);
50 extern UInt ML_(fletcher32)(UShort *buf, SizeT blocks);
51 extern ULong ML_(fletcher64)(UInt *buf, SizeT blocks);
52 extern void ML_(save_machine_context)(ThreadId tid, vki_ucontext_t *uc,
53 CorePart part);
54 extern void ML_(restore_machine_context)(ThreadId tid, vki_ucontext_t *uc,
55 CorePart part, Bool esp_is_thrptr);
57 #if defined(VGP_x86_solaris)
59 extern void ML_(setup_gdt)(VexGuestX86State *vex);
60 extern void ML_(cleanup_gdt)(VexGuestX86State *vex);
61 extern void ML_(update_gdt_lwpgs)(ThreadId tid);
63 /* prototypes */
64 DECL_TEMPLATE(x86_solaris, sys_fstatat64);
65 DECL_TEMPLATE(x86_solaris, sys_openat64);
66 DECL_TEMPLATE(x86_solaris, sys_llseek32);
67 DECL_TEMPLATE(x86_solaris, sys_mmap64);
68 DECL_TEMPLATE(x86_solaris, sys_stat64);
69 DECL_TEMPLATE(x86_solaris, sys_lstat64);
70 DECL_TEMPLATE(x86_solaris, sys_fstat64);
71 DECL_TEMPLATE(x86_solaris, sys_statvfs64);
72 DECL_TEMPLATE(x86_solaris, sys_fstatvfs64);
73 DECL_TEMPLATE(x86_solaris, sys_setrlimit64);
74 DECL_TEMPLATE(x86_solaris, sys_getrlimit64);
75 DECL_TEMPLATE(x86_solaris, sys_pread64);
76 DECL_TEMPLATE(x86_solaris, sys_pwrite64);
77 DECL_TEMPLATE(x86_solaris, sys_open64);
79 #elif defined(VGP_amd64_solaris)
80 /* Nothing yet. */
82 #else
83 # error "Unknown platform"
84 #endif
86 #endif // __PRIV_SYSWRAP_SOLARIS_H
88 /*--------------------------------------------------------------------*/
89 /*--- end ---*/
90 /*--------------------------------------------------------------------*/