Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:13:26

0001 
0002 /*--------------------------------------------------------------------*/
0003 /*--- System call numbers for Solaris.        vki-scnums-solaris.h ---*/
0004 /*--------------------------------------------------------------------*/
0005 
0006 /*
0007    This file is part of Valgrind, a dynamic binary instrumentation
0008    framework.
0009 
0010    Copyright (C) 2011-2017 Petr Pavlu
0011       setup@dagobah.cz
0012 
0013    This program is free software; you can redistribute it and/or
0014    modify it under the terms of the GNU General Public License as
0015    published by the Free Software Foundation; either version 2 of the
0016    License, or (at your option) any later version.
0017 
0018    This program is distributed in the hope that it will be useful, but
0019    WITHOUT ANY WARRANTY; without even the implied warranty of
0020    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0021    General Public License for more details.
0022 
0023    You should have received a copy of the GNU General Public License
0024    along with this program; if not, see <http://www.gnu.org/licenses/>.
0025 
0026    The GNU General Public License is contained in the file COPYING.
0027 */
0028 
0029 /* Copyright 2013-2017, Ivo Raisr <ivosh@ivosh.net>. */
0030 
0031 /* Copyright 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
0032 
0033 #ifndef __VKI_SCNUMS_SOLARIS_H
0034 #define __VKI_SCNUMS_SOLARIS_H
0035 
0036 /* Note: Basic information about Solaris syscalls can be found in the kernel
0037    source file uts/common/os/sysent.c.
0038  */
0039 
0040 /* Include sys/syscall.h to get SYS_* constants (and sys/trap.h to get T_*) to
0041    avoid any copyright issues connected with their potential copying out of
0042    the header file.
0043  */
0044 #include <sys/syscall.h>
0045 #include <sys/trap.h>
0046 
0047 /* normal syscall (int $0x91) */
0048 #define VG_SOLARIS_SYSCALL_CLASS_CLASSIC        0
0049 /* fasttrap syscall (int $0xD2) */
0050 #define VG_SOLARIS_SYSCALL_CLASS_FASTTRAP       1
0051 
0052 #define VG_SOLARIS_SYSCALL_CLASS_SHIFT 24
0053 #define VG_SOLARIS_SYSCALL_NUMBER_MASK 0x00FFFFFF
0054 
0055 #define VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(sysno) \
0056    ((VG_SOLARIS_SYSCALL_CLASS_FASTTRAP << VG_SOLARIS_SYSCALL_CLASS_SHIFT) \
0057     | (sysno))
0058 #define VG_SOLARIS_SYSNO_CLASS(sysno) \
0059    ((sysno) >> VG_SOLARIS_SYSCALL_CLASS_SHIFT)
0060 #define VG_SOLARIS_SYSNO_INDEX(sysno) \
0061    ((sysno) & VG_SOLARIS_SYSCALL_NUMBER_MASK)
0062 
0063 #define __NR_exit                       SYS_exit
0064 #if defined(SOLARIS_SPAWN_SYSCALL)
0065 #define __NR_spawn                      SYS_spawn
0066 #endif /* SOLARIS_SPAWN_SYSCALL */
0067 #define __NR_read                       SYS_read
0068 #define __NR_write                      SYS_write
0069 #define __NR_close                      SYS_close
0070 #define __NR_linkat                     SYS_linkat
0071 #define __NR_symlinkat                  SYS_symlinkat
0072 #define __NR_chdir                      SYS_chdir
0073 #define __NR_time                       SYS_time
0074 #define __NR_brk                        SYS_brk
0075 #define __NR_lseek                      SYS_lseek
0076 #define __NR_getpid                     SYS_getpid
0077 #define __NR_mount                      SYS_mount
0078 #define __NR_readlinkat                 SYS_readlinkat
0079 #define __NR_setuid                     SYS_setuid
0080 #define __NR_getuid                     SYS_getuid
0081 #define __NR_stime                      SYS_stime
0082 //#define __NR_pcsample                   SYS_pcsample
0083 #define __NR_alarm                      SYS_alarm
0084 #define __NR_pause                      SYS_pause
0085 #if defined(SOLARIS_FREALPATHAT_SYSCALL)
0086 #define __NR_frealpathat                SYS_frealpathat
0087 #endif /* SOLARIS_FREALPATHAT_SYSCALL */
0088 #define __NR_stty                       SYS_stty
0089 #define __NR_gtty                       SYS_gtty
0090 //#define __NR_nice                       SYS_nice
0091 //#define __NR_statfs                     SYS_statfs
0092 //#define __NR_sync                       SYS_sync
0093 #define __NR_kill                       SYS_kill
0094 //#define __NR_fstatfs                    SYS_fstatfs
0095 #define __NR_pgrpsys                    SYS_pgrpsys
0096 //#define __NR_uucopystr                  SYS_uucopystr
0097 #define __NR_pipe                       SYS_pipe
0098 #define __NR_times                      SYS_times
0099 //#define __NR_profil                     SYS_profil
0100 #define __NR_faccessat                  SYS_faccessat
0101 #define __NR_setgid                     SYS_setgid
0102 #define __NR_getgid                     SYS_getgid
0103 #define __NR_mknodat                    SYS_mknodat
0104 //#define __NR_msgsys                     SYS_msgsys
0105 #define __NR_sysi86                     SYS_sysi86
0106 //#define __NR_acct                       SYS_acct
0107 #define __NR_shmsys                     SYS_shmsys
0108 #define __NR_semsys                     SYS_semsys
0109 #define __NR_ioctl                      SYS_ioctl
0110 //#define __NR_uadmin                     SYS_uadmin
0111 #define __NR_fchownat                   SYS_fchownat
0112 //#define __NR_utssys                     SYS_utssys
0113 #define __NR_fdsync                     SYS_fdsync
0114 #define __NR_execve                     SYS_execve
0115 #define __NR_umask                      SYS_umask
0116 #define __NR_chroot                     SYS_chroot
0117 #define __NR_fcntl                      SYS_fcntl
0118 //#define __NR_ulimit                     SYS_ulimit
0119 #define __NR_renameat                   SYS_renameat
0120 #define __NR_unlinkat                   SYS_unlinkat
0121 #define __NR_fstatat                    SYS_fstatat
0122 #define __NR_fstatat64                  SYS_fstatat64
0123 #define __NR_openat                     SYS_openat
0124 #define __NR_openat64                   SYS_openat64
0125 #define __NR_tasksys                    SYS_tasksys
0126 //#define __NR_acctctl                    SYS_acctctl
0127 //#define __NR_exacctsys                  SYS_exacctsys
0128 #define __NR_getpagesizes               SYS_getpagesizes
0129 //#define __NR_rctlsys                    SYS_rctlsys
0130 //#define __NR_sidsys                     SYS_sidsys
0131 #define __NR_lwp_park                   SYS_lwp_park
0132 #define __NR_sendfilev                  SYS_sendfilev
0133 #if defined(SOLARIS_LWP_NAME_SYSCALL)
0134 #define __NR_lwp_name                   SYS_lwp_name
0135 #endif /* SOLARIS_LWP_NAME_SYSCALL */
0136 #define __NR_getdents                   SYS_getdents
0137 #define __NR_privsys                    SYS_privsys
0138 #define __NR_ucredsys                   SYS_ucredsys
0139 #define __NR_sysfs                      SYS_sysfs
0140 #define __NR_getmsg                     SYS_getmsg
0141 #define __NR_putmsg                     SYS_putmsg
0142 #define __NR_setgroups                  SYS_setgroups
0143 #define __NR_getgroups                  SYS_getgroups
0144 #define __NR_sigprocmask                SYS_sigprocmask
0145 #define __NR_sigsuspend                 SYS_sigsuspend
0146 #define __NR_sigaltstack                SYS_sigaltstack
0147 #define __NR_sigaction                  SYS_sigaction
0148 #define __NR_sigpending                 SYS_sigpending
0149 #define __NR_context                    SYS_context
0150 #define __NR_fchmodat                   SYS_fchmodat
0151 #define __NR_mkdirat                    SYS_mkdirat
0152 #define __NR_statvfs                    SYS_statvfs
0153 #define __NR_fstatvfs                   SYS_fstatvfs
0154 //#define __NR_getloadavg                 SYS_getloadavg
0155 #define __NR_nfssys                     SYS_nfssys
0156 #define __NR_waitid                     SYS_waitid
0157 #define __NR_waitsys                    SYS_waitsys /* = SYS_waitid (historical) */
0158 #define __NR_sigsendsys                 SYS_sigsendsys
0159 //#define __NR_hrtsys                     SYS_hrtsys
0160 #if defined(SOLARIS_UTIMESYS_SYSCALL)
0161 #define __NR_utimesys                   SYS_utimesys
0162 #endif /* SOLARIS_UTIMESYS_SYSCALL */
0163 #if defined(SOLARIS_UTIMENSAT_SYSCALL)
0164 #define __NR_utimensat                  SYS_utimensat
0165 #endif /* SOLARIS_UTIMENSAT_SYSCALL */
0166 #define __NR_sigresend                  SYS_sigresend
0167 #define __NR_priocntlsys                SYS_priocntlsys
0168 #define __NR_pathconf                   SYS_pathconf
0169 //#define __NR_mincore                    SYS_mincore
0170 #define __NR_mmap                       SYS_mmap
0171 #define __NR_mprotect                   SYS_mprotect
0172 #define __NR_munmap                     SYS_munmap
0173 //#define __NR_fpathconf                  SYS_fpathconf
0174 //#define __NR_vfork                      SYS_vfork
0175 #define __NR_fchdir                     SYS_fchdir
0176 #define __NR_readv                      SYS_readv
0177 #define __NR_writev                     SYS_writev
0178 #if defined(SOLARIS_UUIDSYS_SYSCALL)
0179 #define __NR_uuidsys                    SYS_uuidsys
0180 #endif /* SOLARIS_UUIDSYS_SYSCALL */
0181 #define __NR_mmapobj                    SYS_mmapobj
0182 #define __NR_setrlimit                  SYS_setrlimit
0183 #define __NR_getrlimit                  SYS_getrlimit
0184 #define __NR_memcntl                    SYS_memcntl
0185 #define __NR_getpmsg                    SYS_getpmsg
0186 #define __NR_putpmsg                    SYS_putpmsg
0187 #define __NR_uname                      SYS_uname
0188 #define __NR_setegid                    SYS_setegid
0189 #define __NR_sysconfig                  SYS_sysconfig
0190 //#define __NR_adjtime                    SYS_adjtime
0191 #define __NR_systeminfo                 SYS_systeminfo
0192 //#define __NR_sharefs                    SYS_sharefs
0193 #define __NR_seteuid                    SYS_seteuid
0194 #define __NR_forksys                    SYS_forksys
0195 #if defined(SOLARIS_GETRANDOM_SYSCALL)
0196 #define __NR_getrandom                  SYS_getrandom
0197 #endif /* SOLARIS_GETRANDOM_SYSCALL */
0198 #define __NR_sigtimedwait               SYS_sigtimedwait
0199 //#define __NR_lwp_info                   SYS_lwp_info
0200 #define __NR_yield                      SYS_yield
0201 #define __NR_lwp_sema_post              SYS_lwp_sema_post
0202 #define __NR_lwp_sema_trywait           SYS_lwp_sema_trywait
0203 #define __NR_lwp_detach                 SYS_lwp_detach
0204 //#define __NR_corectl                    SYS_corectl
0205 #define __NR_modctl                     SYS_modctl
0206 #define __NR_fchroot                    SYS_fchroot
0207 #if defined(SOLARIS_SYSTEM_STATS_SYSCALL)
0208 #define __NR_system_stats               SYS_system_stats
0209 #endif /* SOLARIS_SYSTEM_STATS_SYSCALL */
0210 //#define __NR_vhangup                    SYS_vhangup
0211 #define __NR_gettimeofday               SYS_gettimeofday
0212 #define __NR_getitimer                  SYS_getitimer
0213 #define __NR_setitimer                  SYS_setitimer
0214 #define __NR_lwp_create                 SYS_lwp_create
0215 #define __NR_lwp_exit                   SYS_lwp_exit
0216 #define __NR_lwp_suspend                SYS_lwp_suspend
0217 #define __NR_lwp_continue               SYS_lwp_continue
0218 #if defined(SOLARIS_LWP_SIGQUEUE_SYSCALL)
0219 #define __NR_lwp_sigqueue               SYS_lwp_sigqueue
0220 #else
0221 #define __NR_lwp_kill                   SYS_lwp_kill
0222 #endif /* SOLARIS_LWP_SIGQUEUE_SYSCALL */
0223 #define __NR_lwp_self                   SYS_lwp_self
0224 #define __NR_lwp_sigmask                SYS_lwp_sigmask
0225 #define __NR_lwp_private                SYS_lwp_private
0226 #define __NR_lwp_wait                   SYS_lwp_wait
0227 #define __NR_lwp_mutex_wakeup           SYS_lwp_mutex_wakeup
0228 #define __NR_lwp_cond_wait              SYS_lwp_cond_wait
0229 #define __NR_lwp_cond_signal            SYS_lwp_cond_signal
0230 #define __NR_lwp_cond_broadcast         SYS_lwp_cond_broadcast
0231 #define __NR_pread                      SYS_pread
0232 #define __NR_pwrite                     SYS_pwrite
0233 #define __NR_llseek                     SYS_llseek
0234 //#define __NR_inst_sync                  SYS_inst_sync
0235 //#define __NR_brand                      SYS_brand
0236 //#define __NR_kaio                       SYS_kaio
0237 //#define __NR_cpc                        SYS_cpc
0238 #define __NR_lgrpsys                    SYS_lgrpsys
0239 #define __NR_rusagesys                  SYS_rusagesys
0240 #define __NR_port                       SYS_port
0241 #define __NR_pollsys                    SYS_pollsys
0242 #define __NR_labelsys                   SYS_labelsys
0243 #define __NR_acl                        SYS_acl
0244 #define __NR_auditsys                   SYS_auditsys
0245 //#define __NR_processor_bind             SYS_processor_bind
0246 //#define __NR_processor_info             SYS_processor_info
0247 #define __NR_p_online                   SYS_p_online
0248 #define __NR_sigqueue                   SYS_sigqueue
0249 #define __NR_clock_gettime              SYS_clock_gettime
0250 #define __NR_clock_settime              SYS_clock_settime
0251 #define __NR_clock_getres               SYS_clock_getres
0252 #define __NR_timer_create               SYS_timer_create
0253 #define __NR_timer_delete               SYS_timer_delete
0254 #define __NR_timer_settime              SYS_timer_settime
0255 #define __NR_timer_gettime              SYS_timer_gettime
0256 #define __NR_timer_getoverrun           SYS_timer_getoverrun
0257 #define __NR_nanosleep                  SYS_nanosleep
0258 #define __NR_facl                       SYS_facl
0259 #define __NR_door                       SYS_door
0260 #define __NR_setreuid                   SYS_setreuid
0261 #define __NR_setregid                   SYS_setregid
0262 //#define __NR_install_utrap              SYS_install_utrap
0263 //#define __NR_signotify                  SYS_signotify
0264 #define __NR_schedctl                   SYS_schedctl
0265 #define __NR_pset                       SYS_pset
0266 //#define SYS_sparc_utrap_install
0267 #define __NR_resolvepath                SYS_resolvepath
0268 #define __NR_lwp_mutex_timedlock        SYS_lwp_mutex_timedlock
0269 #define __NR_lwp_sema_timedwait         SYS_lwp_sema_timedwait
0270 #define __NR_lwp_rwlock_sys             SYS_lwp_rwlock_sys
0271 #define __NR_getdents64                 SYS_getdents64
0272 #define __NR_mmap64                     SYS_mmap64
0273 #define __NR_statvfs64                  SYS_statvfs64
0274 #define __NR_fstatvfs64                 SYS_fstatvfs64
0275 #define __NR_setrlimit64                SYS_setrlimit64
0276 #define __NR_getrlimit64                SYS_getrlimit64
0277 #define __NR_pread64                    SYS_pread64
0278 #define __NR_pwrite64                   SYS_pwrite64
0279 //#define __NR_rpcsys                     SYS_rpcsys
0280 #define __NR_zone                       SYS_zone
0281 //#define __NR_autofssys                  SYS_autofssys
0282 #define __NR_getcwd                     SYS_getcwd
0283 #define __NR_so_socket                  SYS_so_socket
0284 #define __NR_so_socketpair              SYS_so_socketpair
0285 #define __NR_bind                       SYS_bind
0286 #define __NR_listen                     SYS_listen
0287 #define __NR_accept                     SYS_accept
0288 #define __NR_connect                    SYS_connect
0289 #define __NR_shutdown                   SYS_shutdown
0290 #define __NR_recv                       SYS_recv
0291 #define __NR_recvfrom                   SYS_recvfrom
0292 #define __NR_recvmsg                    SYS_recvmsg
0293 #define __NR_send                       SYS_send
0294 #define __NR_sendmsg                    SYS_sendmsg
0295 #define __NR_sendto                     SYS_sendto
0296 #define __NR_getpeername                SYS_getpeername
0297 #define __NR_getsockname                SYS_getsockname
0298 #define __NR_getsockopt                 SYS_getsockopt
0299 #define __NR_setsockopt                 SYS_setsockopt
0300 //#define __NR_sockconfig                 SYS_sockconfig
0301 //#define __NR_ntp_gettime                SYS_ntp_gettime
0302 //#define __NR_ntp_adjtime                SYS_ntp_adjtime
0303 #define __NR_lwp_mutex_unlock           SYS_lwp_mutex_unlock
0304 //#define __NR_lwp_mutex_trylock          SYS_lwp_mutex_trylock
0305 #define __NR_lwp_mutex_register         SYS_lwp_mutex_register
0306 //#define __NR_cladm                      SYS_cladm
0307 #define __NR_uucopy                     SYS_uucopy
0308 #define __NR_umount2                    SYS_umount2
0309 
0310 /* The following syscalls were removed in Solaris 11 (see
0311    https://wikis.oracle.com/display/DTrace/syscall+Provider). Valgrind's core
0312    cannot use these syscalls but wrappers have to be provided for them because
0313    they are still in use on illumos.
0314 */
0315 #if defined(SOLARIS_OLD_SYSCALLS)
0316 #define __NR_open                       SYS_open
0317 #define __NR_link                       SYS_link
0318 #define __NR_unlink                     SYS_unlink
0319 #define __NR_mknod                      SYS_mknod
0320 #define __NR_chmod                      SYS_chmod
0321 #define __NR_chown                      SYS_chown
0322 #define __NR_stat                       SYS_stat
0323 #define __NR_fstat                      SYS_fstat
0324 #define __NR_access                     SYS_access
0325 #define __NR_rmdir                      SYS_rmdir
0326 #define __NR_mkdir                      SYS_mkdir
0327 #define __NR_lstat                      SYS_lstat
0328 #define __NR_symlink                    SYS_symlink
0329 #define __NR_readlink                   SYS_readlink
0330 #define __NR_fchmod                     SYS_fchmod
0331 #define __NR_fchown                     SYS_fchown
0332 #define __NR_lchown                     SYS_lchown
0333 #define __NR_rename                     SYS_rename
0334 #define __NR_stat64                     SYS_stat64
0335 #define __NR_lstat64                    SYS_lstat64
0336 #define __NR_fstat64                    SYS_fstat64
0337 #define __NR_open64                     SYS_open64
0338 #endif /* SOLARIS_OLD_SYSCALLS */
0339 
0340 /*
0341 #define __NR_null \
0342    VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_FNULL)
0343 #define __NR_fgetfp \
0344    VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_FGETFP)
0345 #define __NR_fsetfp \
0346    VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_FSETFP)
0347 */
0348 #define __NR_gethrtime \
0349    VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETHRTIME)
0350 #define __NR_gethrvtime \
0351    VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETHRVTIME)
0352 #define __NR_gethrestime \
0353    VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETHRESTIME)
0354 #define __NR_getlgrp \
0355    VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETLGRP)
0356 #if defined(SOLARIS_GETHRT_FASTTRAP)
0357 #define __NR_gethrt \
0358    VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETHRT)
0359 #endif /* SOLARIS_GETHRT_FASTTRAP */
0360 #if defined(SOLARIS_GETZONEOFFSET_FASTTRAP)
0361 #define __NR_getzoneoffset \
0362    VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(T_GETZONEOFFSET)
0363 #endif /* SOLARIS_GETZONEOFFSET_FASTTRAP */
0364 
0365 #endif /* __VKI_SCNUMS_SOLARIS_H */
0366 
0367 /*--------------------------------------------------------------------*/
0368 /*--- end                                                          ---*/
0369 /*--------------------------------------------------------------------*/