| Server IP : 103.4.122.14 / Your IP : 216.73.216.103 Web Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips System : Linux cwp2.slnet.com.au 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : statewid ( 1251) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/systemtap/tapset/linux/ |
Upload File : |
# This is syscall_table tapset providing namely syscall_name() and syscall_num()
# functions. It uses architecture specific data contained in other arch
# specific tapsets. Helper scripts/dump-syscalls.sh is used to generate those.
function syscall_name(num) {
%( CONFIG_COMPAT == "y" %?
if (@__compat_task)
return __syscall_32_num2name[num]
%)
%( CONFIG_64BIT == "y" %?
return __syscall_64_num2name[num]
%:
return __syscall_32_num2name[num]
%)
}
# Systemtap is benevolent when an associative array is being queried for an
# unexisting key. If we call e.g. __syscall_64_name2num["unexisting_syscall"],
# the result is zero. But at the same time zero is a valid syscall number, so
# we really need to return some other value in this case to indicate that
# syscall with given name doesn't exist. Let's use following
# @return_sanitized macro.
#
# The other way round, when evaluating e.g. __syscall_64_num2name[-123], stap
# is benevolent too - we'll get an empty string. But that is sufficiently
# unique, so we are good at this front.
@define return_sanitized(indexable, key)
%(
if (@key in @indexable)
return @indexable[@key]
else
return -1
%)
function syscall_num(name) {
%( CONFIG_COMPAT == "y" %?
if (@__compat_task)
@return_sanitized(__syscall_32_name2num, name)
%)
%( CONFIG_64BIT == "y" %?
@return_sanitized(__syscall_64_name2num, name)
%:
@return_sanitized(__syscall_32_name2num, name)
%)
}