valgrind-monitor.py regular expressions should use raw strings
[valgrind.git] / include / vki / vki-scnums-solaris.h
blob99388091a8137323efc8ea60c7d39518c9baa302
2 /*--------------------------------------------------------------------*/
3 /*--- System call numbers for Solaris. vki-scnums-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 /* Copyright 2013-2017, Ivo Raisr <ivosh@ivosh.net>. */
31 /* Copyright 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
33 #ifndef __VKI_SCNUMS_SOLARIS_H
34 #define __VKI_SCNUMS_SOLARIS_H
36 /* Note: Basic information about Solaris syscalls can be found in the kernel
37 source file uts/common/os/sysent.c.
40 /* Include sys/syscall.h to get SYS_* constants (and sys/trap.h to get T_*) to
41 avoid any copyright issues connected with their potential copying out of
42 the header file.
44 #include <sys/syscall.h>
45 #include <sys/trap.h>
47 /* normal syscall (int $0x91) */
48 #define VG_SOLARIS_SYSCALL_CLASS_CLASSIC 0
49 /* fasttrap syscall (int $0xD2) */
50 #define VG_SOLARIS_SYSCALL_CLASS_FASTTRAP 1
52 #define VG_SOLARIS_SYSCALL_CLASS_SHIFT 24
53 #define VG_SOLARIS_SYSCALL_NUMBER_MASK 0x00FFFFFF
55 #define VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(sysno) \
56 ((VG_SOLARIS_SYSCALL_CLASS_FASTTRAP << VG_SOLARIS_SYSCALL_CLASS_SHIFT) \
57 | (sysno))
58 #define VG_SOLARIS_SYSNO_CLASS(sysno) \
59 ((sysno) >> VG_SOLARIS_SYSCALL_CLASS_SHIFT)
60 #define VG_SOLARIS_SYSNO_INDEX(sysno) \
61 ((sysno) & VG_SOLARIS_SYSCALL_NUMBER_MASK)
63 #define __NR_exit SYS_exit
64 #if defined(SOLARIS_SPAWN_SYSCALL)
65 #define __NR_spawn SYS_spawn
66 #endif /* SOLARIS_SPAWN_SYSCALL */
67 #define __NR_read SYS_read
68 #define __NR_write SYS_write
69 #define __NR_close SYS_close
70 #define __NR_linkat SYS_linkat
71 #define __NR_symlinkat SYS_symlinkat
72 #define __NR_chdir SYS_chdir
73 #define __NR_time SYS_time
74 #define __NR_brk SYS_brk
75 #define __NR_lseek SYS_lseek
76 #define __NR_getpid SYS_getpid
77 #define __NR_mount SYS_mount
78 #define __NR_readlinkat SYS_readlinkat
79 #define __NR_setuid SYS_setuid
80 #define __NR_getuid SYS_getuid
81 #define __NR_stime SYS_stime
82 //#define __NR_pcsample SYS_pcsample
83 #define __NR_alarm SYS_alarm
84 #define __NR_pause SYS_pause
85 #if defined(SOLARIS_FREALPATHAT_SYSCALL)
86 #define __NR_frealpathat SYS_frealpathat
87 #endif /* SOLARIS_FREALPATHAT_SYSCALL */
88 #define __NR_stty SYS_stty
89 #define __NR_gtty SYS_gtty
90 //#define __NR_nice SYS_nice
91 //#define __NR_statfs SYS_statfs
92 //#define __NR_sync SYS_sync
93 #define __NR_kill SYS_kill
94 //#define __NR_fstatfs SYS_fstatfs
95 #define __NR_pgrpsys SYS_pgrpsys
96 //#define __NR_uucopystr SYS_uucopystr
97 #define __NR_pipe SYS_pipe
98 #define __NR_times SYS_times
99 //#define __NR_profil SYS_profil
100 #define __NR_faccessat SYS_faccessat
101 #define __NR_setgid SYS_setgid
102 #define __NR_getgid SYS_getgid
103 #define __NR_mknodat SYS_mknodat
104 //#define __NR_msgsys SYS_msgsys
105 #define __NR_sysi86 SYS_sysi86
106 //#define __NR_acct SYS_acct
107 #define __NR_shmsys SYS_shmsys
108 #define __NR_semsys SYS_semsys
109 #define __NR_ioctl SYS_ioctl
110 //#define __NR_uadmin SYS_uadmin
111 #define __NR_fchownat SYS_fchownat
112 //#define __NR_utssys SYS_utssys
113 #define __NR_fdsync SYS_fdsync
114 #define __NR_execve SYS_execve
115 #define __NR_umask SYS_umask
116 #define __NR_chroot SYS_chroot
117 #define __NR_fcntl SYS_fcntl
118 //#define __NR_ulimit SYS_ulimit
119 #define __NR_renameat SYS_renameat
120 #define __NR_unlinkat SYS_unlinkat
121 #define __NR_fstatat SYS_fstatat
122 #define __NR_fstatat64 SYS_fstatat64
123 #define __NR_openat SYS_openat
124 #define __NR_openat64 SYS_openat64
125 #define __NR_tasksys SYS_tasksys
126 //#define __NR_acctctl SYS_acctctl
127 //#define __NR_exacctsys SYS_exacctsys
128 #define __NR_getpagesizes SYS_getpagesizes
129 //#define __NR_rctlsys SYS_rctlsys
130 //#define __NR_sidsys SYS_sidsys
131 #define __NR_lwp_park SYS_lwp_park
132 #define __NR_sendfilev SYS_sendfilev
133 #if defined(SOLARIS_LWP_NAME_SYSCALL)
134 #define __NR_lwp_name SYS_lwp_name
135 #endif /* SOLARIS_LWP_NAME_SYSCALL */
136 #define __NR_getdents SYS_getdents
137 #define __NR_privsys SYS_privsys
138 #define __NR_ucredsys SYS_ucredsys
139 #define __NR_sysfs SYS_sysfs
140 #define __NR_getmsg SYS_getmsg
141 #define __NR_putmsg SYS_putmsg
142 #define __NR_setgroups SYS_setgroups
143 #define __NR_getgroups SYS_getgroups
144 #define __NR_sigprocmask SYS_sigprocmask
145 #define __NR_sigsuspend SYS_sigsuspend
146 #define __NR_sigaltstack SYS_sigaltstack
147 #define __NR_sigaction SYS_sigaction
148 #define __NR_sigpending SYS_sigpending
149 #define __NR_context SYS_context
150 #define __NR_fchmodat SYS_fchmodat
151 #define __NR_mkdirat SYS_mkdirat
152 #define __NR_statvfs SYS_statvfs
153 #define __NR_fstatvfs SYS_fstatvfs
154 //#define __NR_getloadavg SYS_getloadavg
155 #define __NR_nfssys SYS_nfssys
156 #define __NR_waitid SYS_waitid
157 #define __NR_waitsys SYS_waitsys /* = SYS_waitid (historical) */
158 #define __NR_sigsendsys SYS_sigsendsys
159 //#define __NR_hrtsys SYS_hrtsys
160 #if defined(SOLARIS_UTIMESYS_SYSCALL)
161 #define __NR_utimesys SYS_utimesys
162 #endif /* SOLARIS_UTIMESYS_SYSCALL */
163 #if defined(SOLARIS_UTIMENSAT_SYSCALL)
164 #define __NR_utimensat SYS_utimensat
165 #endif /* SOLARIS_UTIMENSAT_SYSCALL */
166 #define __NR_sigresend SYS_sigresend
167 #define __NR_priocntlsys SYS_priocntlsys
168 #define __NR_pathconf SYS_pathconf
169 //#define __NR_mincore SYS_mincore
170 #define __NR_mmap SYS_mmap
171 #define __NR_mprotect SYS_mprotect
172 #define __NR_munmap SYS_munmap
173 //#define __NR_fpathconf SYS_fpathconf
174 //#define __NR_vfork SYS_vfork
175 #define __NR_fchdir SYS_fchdir
176 #define __NR_readv SYS_readv
177 #define __NR_writev SYS_writev
178 #if defined(SOLARIS_UUIDSYS_SYSCALL)
179 #define __NR_uuidsys SYS_uuidsys
180 #endif /* SOLARIS_UUIDSYS_SYSCALL */
181 #define __NR_mmapobj SYS_mmapobj
182 #define __NR_setrlimit SYS_setrlimit
183 #define __NR_getrlimit SYS_getrlimit
184 #define __NR_memcntl SYS_memcntl
185 #define __NR_getpmsg SYS_getpmsg
186 #define __NR_putpmsg SYS_putpmsg
187 #define __NR_uname SYS_uname
188 #define __NR_setegid SYS_setegid
189 #define __NR_sysconfig SYS_sysconfig
190 //#define __NR_adjtime SYS_adjtime
191 #define __NR_systeminfo SYS_systeminfo
192 //#define __NR_sharefs SYS_sharefs
193 #define __NR_seteuid SYS_seteuid
194 #define __NR_forksys SYS_forksys
195 #if defined(SOLARIS_GETRANDOM_SYSCALL)
196 #define __NR_getrandom SYS_getrandom
197 #endif /* SOLARIS_GETRANDOM_SYSCALL */
198 #define __NR_sigtimedwait SYS_sigtimedwait
199 //#define __NR_lwp_info SYS_lwp_info
200 #define __NR_yield SYS_yield
201 #define __NR_lwp_sema_post SYS_lwp_sema_post
202 #define __NR_lwp_sema_trywait SYS_lwp_sema_trywait
203 #define __NR_lwp_detach SYS_lwp_detach
204 //#define __NR_corectl SYS_corectl
205 #define __NR_modctl SYS_modctl
206 #define __NR_fchroot SYS_fchroot
207 #if defined(SOLARIS_SYSTEM_STATS_SYSCALL)
208 #define __NR_system_stats SYS_system_stats
209 #endif /* SOLARIS_SYSTEM_STATS_SYSCALL */
210 //#define __NR_vhangup SYS_vhangup
211 #define __NR_gettimeofday SYS_gettimeofday
212 #define __NR_getitimer SYS_getitimer
213 #define __NR_setitimer SYS_setitimer
214 #define __NR_lwp_create SYS_lwp_create
215 #define __NR_lwp_exit SYS_lwp_exit
216 #define __NR_lwp_suspend SYS_lwp_suspend
217 #define __NR_lwp_continue SYS_lwp_continue
218 #if defined(SOLARIS_LWP_SIGQUEUE_SYSCALL)
219 #define __NR_lwp_sigqueue SYS_lwp_sigqueue
220 #else
221 #define __NR_lwp_kill SYS_lwp_kill
222 #endif /* SOLARIS_LWP_SIGQUEUE_SYSCALL */
223 #define __NR_lwp_self SYS_lwp_self
224 #define __NR_lwp_sigmask SYS_lwp_sigmask
225 #define __NR_lwp_private SYS_lwp_private
226 #define __NR_lwp_wait SYS_lwp_wait
227 #define __NR_lwp_mutex_wakeup SYS_lwp_mutex_wakeup
228 #define __NR_lwp_cond_wait SYS_lwp_cond_wait
229 #define __NR_lwp_cond_signal SYS_lwp_cond_signal
230 #define __NR_lwp_cond_broadcast SYS_lwp_cond_broadcast
231 #define __NR_pread SYS_pread
232 #define __NR_pwrite SYS_pwrite
233 #define __NR_llseek SYS_llseek
234 //#define __NR_inst_sync SYS_inst_sync
235 //#define __NR_brand SYS_brand
236 //#define __NR_kaio SYS_kaio
237 //#define __NR_cpc SYS_cpc
238 #define __NR_lgrpsys SYS_lgrpsys
239 #define __NR_rusagesys SYS_rusagesys
240 #define __NR_port SYS_port
241 #define __NR_pollsys SYS_pollsys
242 #define __NR_labelsys SYS_labelsys
243 #define __NR_acl SYS_acl
244 #define __NR_auditsys SYS_auditsys
245 //#define __NR_processor_bind SYS_processor_bind
246 //#define __NR_processor_info SYS_processor_info
247 #define __NR_p_online SYS_p_online
248 #define __NR_sigqueue SYS_sigqueue
249 #define __NR_clock_gettime SYS_clock_gettime
250 #define __NR_clock_settime SYS_clock_settime
251 #define __NR_clock_getres SYS_clock_getres
252 #define __NR_timer_create SYS_timer_create
253 #define __NR_timer_delete SYS_timer_delete
254 #define __NR_timer_settime SYS_timer_settime
255 #define __NR_timer_gettime SYS_timer_gettime
256 #define __NR_timer_getoverrun SYS_timer_getoverrun
257 #define __NR_nanosleep SYS_nanosleep
258 #define __NR_facl SYS_facl
259 #define __NR_door SYS_door
260 #define __NR_setreuid SYS_setreuid
261 #define __NR_setregid SYS_setregid
262 //#define __NR_install_utrap SYS_install_utrap
263 //#define __NR_signotify SYS_signotify
264 #define __NR_schedctl SYS_schedctl
265 #define __NR_pset SYS_pset
266 //#define SYS_sparc_utrap_install
267 #define __NR_resolvepath SYS_resolvepath
268 #define __NR_lwp_mutex_timedlock SYS_lwp_mutex_timedlock
269 #define __NR_lwp_sema_timedwait SYS_lwp_sema_timedwait
270 #define __NR_lwp_rwlock_sys SYS_lwp_rwlock_sys
271 #define __NR_getdents64 SYS_getdents64
272 #define __NR_mmap64 SYS_mmap64
273 #define __NR_statvfs64 SYS_statvfs64
274 #define __NR_fstatvfs64 SYS_fstatvfs64
275 #define __NR_setrlimit64 SYS_setrlimit64
276 #define __NR_getrlimit64 SYS_getrlimit64
277 #define __NR_pread64 SYS_pread64
278 #define __NR_pwrite64 SYS_pwrite64
279 //#define __NR_rpcsys SYS_rpcsys
280 #define __NR_zone SYS_zone
281 //#define __NR_autofssys SYS_autofssys
282 #define __NR_getcwd SYS_getcwd
283 #define __NR_so_socket SYS_so_socket
284 #define __NR_so_socketpair SYS_so_socketpair
285 #define __NR_bind SYS_bind
286 #define __NR_listen SYS_listen
287 #define __NR_accept SYS_accept
288 #define __NR_connect SYS_connect
289 #define __NR_shutdown SYS_shutdown
290 #define __NR_recv SYS_recv
291 #define __NR_recvfrom SYS_recvfrom
292 #define __NR_recvmsg SYS_recvmsg
293 #define __NR_send SYS_send
294 #define __NR_sendmsg SYS_sendmsg
295 #define __NR_sendto SYS_sendto
296 #define __NR_getpeername SYS_getpeername
297 #define __NR_getsockname SYS_getsockname
298 #define __NR_getsockopt SYS_getsockopt
299 #define __NR_setsockopt SYS_setsockopt
300 //#define __NR_sockconfig SYS_sockconfig
301 //#define __NR_ntp_gettime SYS_ntp_gettime
302 //#define __NR_ntp_adjtime SYS_ntp_adjtime
303 #define __NR_lwp_mutex_unlock SYS_lwp_mutex_unlock
304 //#define __NR_lwp_mutex_trylock SYS_lwp_mutex_trylock
305 #define __NR_lwp_mutex_register SYS_lwp_mutex_register
306 //#define __NR_cladm SYS_cladm
307 #define __NR_uucopy SYS_uucopy
308 #define __NR_umount2 SYS_umount2
310 /* The following syscalls were removed in Solaris 11 (see
311 https://wikis.oracle.com/display/DTrace/syscall+Provider). Valgrind's core
312 cannot use these syscalls but wrappers have to be provided for them because
313 they are still in use on illumos.
315 #if defined(SOLARIS_OLD_SYSCALLS)
316 #define __NR_open SYS_open
317 #define __NR_link SYS_link
318 #define __NR_unlink SYS_unlink
319 #define __NR_mknod SYS_mknod
320 #define __NR_chmod SYS_chmod
321 #define __NR_chown SYS_chown
322 #define __NR_stat SYS_stat
323 #define __NR_fstat SYS_fstat
324 #define __NR_access SYS_access
325 #define __NR_rmdir SYS_rmdir
326 #define __NR_mkdir SYS_mkdir
327 #define __NR_lstat SYS_lstat
328 #define __NR_symlink SYS_symlink
329 #define __NR_readlink SYS_readlink
330 #define __NR_fchmod SYS_fchmod
331 #define __NR_fchown SYS_fchown
332 #define __NR_lchown SYS_lchown
333 #define __NR_rename SYS_rename
334 #define __NR_stat64 SYS_stat64
335 #define __NR_lstat64 SYS_lstat64
336 #define __NR_fstat64 SYS_fstat64
337 #define __NR_open64 SYS_open64
338 #endif /* SOLARIS_OLD_SYSCALLS */
341 #define __NR_null \
342 VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_FNULL)
343 #define __NR_fgetfp \
344 VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_FGETFP)
345 #define __NR_fsetfp \
346 VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_FSETFP)
348 #define __NR_gethrtime \
349 VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETHRTIME)
350 #define __NR_gethrvtime \
351 VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETHRVTIME)
352 #define __NR_gethrestime \
353 VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETHRESTIME)
354 #define __NR_getlgrp \
355 VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETLGRP)
356 #if defined(SOLARIS_GETHRT_FASTTRAP)
357 #define __NR_gethrt \
358 VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETHRT)
359 #endif /* SOLARIS_GETHRT_FASTTRAP */
360 #if defined(SOLARIS_GETZONEOFFSET_FASTTRAP)
361 #define __NR_getzoneoffset \
362 VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETZONEOFFSET)
363 #endif /* SOLARIS_GETZONEOFFSET_FASTTRAP */
365 #endif /* __VKI_SCNUMS_SOLARIS_H */
367 /*--------------------------------------------------------------------*/
368 /*--- end ---*/
369 /*--------------------------------------------------------------------*/